Pre-requisites:
make sure EPEL is enabled – see here.
Once that is done just issue:
yum install nginx
and when installed enable the service so it starts with they OS:
[root]# chkconfig nginx Note: Forwarding request to 'systemctl is-enabled nginx.service'. disabled [root]# chkconfig nginx on Note: Forwarding request to 'systemctl enable nginx.service'. Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service. [root]# chkconfig nginx Note: Forwarding request to 'systemctl is-enabled nginx.service'. enabled