Before we start you should make sure your openssl is updated. Run
rpm -q openssl
and if this reports version
1.0.1e and less than
you are vulnerable to heartbleed. One of the biggest security issues. Read
Update openssl on Red Hat before you continue. We also need
1.0.1 or higher to install Nginx.
First of you can check if Nginx is available on your system by running
yum info nginx. It should now show you the available package with its version
included, in my case
Version : 1.0.15. If it's not available or if you get an
old version like me (the latest one is currently
1.6.2) then you need to add
there official repo to yum. Create and open
your favorite editor and add the config below.
[nginx] name=nginx repo baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/ gpgcheck=0 enabled=1
If you run
yum info nginx again you should now get
Version : 1.6.2 or later.
Then install it with
yum install nginx.