리눅스 공부
nginx 설치하기
KyeomKim
2014. 9. 5. 11:36
Step One—Add Nginx Repository
To add the CentOS 7 Nginx yum repository, open terminal and use the following command:
nginx-release-centos-7-0.el7.ngx.noarch.rpm
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
Step Two—Install Nginx
Now that the Nginx repository is installed on your server, install Nginx using the followingyum
command:
sudo yum install nginx
After you answer yes to the prompt, Nginx will finish installing on your virtual private server (VPS).
Step Three—Start Nginx
Nginx does not start on its own. To get Nginx running, type:
sudo systemctl start nginx.service
You can do a spot check right away to verify that everything went as planned by visiting your server's public IP address in your web browser (see the note under the next heading to find out what your public IP address is if you do not have this information already):
http://server_domain_name_or_IP/