Upgrading Nginx to the latest version on Ubuntu servers

Writing this post after a long long time almost a gap of around 1+ year.

Nginx – I have been a big fan of nginx since the time I came to know about it. Have written many blogs about the same in the past. Most of the apps deployed by me are on Nginx.

Its always good to have nginx upgraded to the latest version. Below are the steps for the same

First of all check the existing version of nginx using

nginx -v

Now take the back of the existing nginx

sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.1.1.19.backup

Now Stop the service

sudo service nginx stop or /etc/init.d/nginx stop

Install dependencies (might not be required)

sudo aptitude install python-software-properties

Add the repository for the stable version of Nginx

sudo add-apt-repository ppa:nginx/stable

Now update and upgrade

sudo aptitude update
sudo aptitude safe-upgrade

Once done. start nginx

sudo service nginx restart or /etc/init.d/nginx start

Again check the version (For confirmation)

nginx -v

Voila!! its done. Njoy safe and secure web apps.

Please post your comments in case you face any issues in upgrading nginx.

Be Sociable, Share!

Install / Upgrade to OpenSSH 6.6p on Ubuntu 12.04 and 13.10

Hey all,

Had to upgrade OpenSSH to 6.6p for PCI Compliance. Found that 12.04 does not support OpenSSH 6.6p via direct upgrade. So Had to do it manually. After some research found that it can be done easily with 3-4 steps

1) Download portable version of OpenSSH from

wget http://mirror.aarnet.edu.au/pub/OpenBSD/OpenSSH/portable/openssh-6.6p1.tar.gz

2) Run the following command

tar -xvf openssh-6.6p1.tar.gz
cd openssh-6.6p1
./configure –prefix=/usr –sysconfdir=/etc/ssh \
–with-md5-passwords –with-privsep-path=/var/lib/sshd

3) make install

4) Check Version using

sshd -V

you should see it as OpenSSH_6.6p1

If you do not see it restart your sshd service and check again.

Do comment for any questions.

Njoi

Be Sociable, Share!

Solve vulnerability in OpenSSL 1.0.1 Upgrade OpenSSL on Ubuntu

The OpenSSL project has recently announced a security vulnerability in OpenSSL affecting versions 1.0.1 and 1.0.2 (CVE-2014-0160).

Users who are using Ubuntu specifically 12.04 LTS and having openssl version 1.0.1 needs to upgrade to 1.0.1g

First of all find out how to see if your website is vulnerable or not.

Go to http://filippo.io/Heartbleed/ type in your domain and see the result.

If you see that your website is Vulnerable check the Open ssl version using the command below

openssl version -v

IF it is 1.0.1 or 1.0.1a….f You need to upgrade it to 1.0.1g

Below the single command line to compiling and install the last openssl version.

curl https://www.openssl.org/source/openssl-1.0.1g.tar.gz | tar xz && cd openssl-1.0.1g && sudo ./config && sudo make && sudo make install

Replace old openssl binary file by the new one via a symlink.

sudo ln -sf /usr/local/ssl/bin/openssl `which openssl`

Thats all

Now run the command to check the version again and you will see the new version of openssl

OpenSSL 1.0.1g

Hope this helps. If you face any issue please feel free to comment.

Be Sociable, Share!

Install DevKit on Windows 7 (64-bit)

Hey all

Finally got some time to update the blog. Recently I was configuring a rails app on windows 7 machine (ah! I know now no one uses windows for development but it was a requirement :( ) and I had to install json gem.

As soon as I did gem install json I got a weird error.

ERROR: Error installing json:
The ‘json’ native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit from ‘http://rubyinstaller.org/downloads’ and follow the instructions at ‘http://github.com/oneclick/rubyinstaller/wiki/Development-Kit’

Then I went and downloaded DevKit-4.5.0-20100819-1536-sfx.exe. Extracted it to C:\DevKit. And then from the command prompt I executed the following commands.

ruby dk.rb init

The command above will create a config.yml file where you need to verify where you ruby is installed and set it accordingly if there is any change.

ruby dk.rb review

The command above will show you the path where its pointing to.

ruby dk.rb install

The command above will install devkit.

Thats all!! Now again try gem install json and woo it works!!

Hope this helps.

Thanks

Be Sociable, Share!

Solve uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) in Rails 2.3.8

Hi all

If you get stuck with this strange error of uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) don’t worry.

Just follow the steps below :-

gem update –system 1.5.3

once its installed successfully do gem list and see if you have any other versions of rubygems-update already installed. If so remove all the others apart from 1.5.3

Once you do that run the following command

update_rubygems

The above command will show that 1.5.3 is installed. Do confirm the same by checking the gem version gem -v

Hope this helps. In case you have any query related to this do post a comment and I will get back ASAP

Njoi

Be Sociable, Share!

Old release source.list for Ubuntu 8.10

Hi all

As such Ubuntu 8.10 is no longer used but incase you need to use it and you are facing issues with updating the same the problem lies in sources.list file which resides under /etc/apt/sources.list

Keep a backup of the old file and than replace the content of the old one to the one below.

deb http://old-releases.ubuntu.com/ubuntu/ intrepid main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ intrepid universe
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid universe
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates universe
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu/ intrepid multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid-updates multiverse

## Uncomment the following two lines to add software from the ‘backports’
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://old-releases.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical’s
## ‘partner’ repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
# deb http://archive.canonical.com/ubuntu intrepid partner
# deb-src http://archive.canonical.com/ubuntu intrepid partner

#deb http://security.ubuntu.com/ubuntu intrepid-security main restricted
#deb-src http://security.ubuntu.com/ubuntu intrepid-security main restricted
#deb http://security.ubuntu.com/ubuntu intrepid-security universe
#deb-src http://security.ubuntu.com/ubuntu intrepid-security universe
#deb http://security.ubuntu.com/ubuntu intrepid-security multiverse
#deb-src http://security.ubuntu.com/ubuntu intrepid-security multive

Now try apt-get update and it should work. Let me know if you still face issues.

Njoi

Be Sociable, Share!
1 2 3 26