http://wiki.nginx.org/Install
Nginx yum install( CentOS6 )
1) nginx 에서 제공해주는 저장소 등록
$ rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
Retrieving http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
warning: /var/tmp/rpm-tmp.U4wAT5: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
Preparing... ########################################### [100%]
1:nginx-release-centos ########################################### [100%]
$ ll /etc/yum.repos.d/
-rw-r--r-- 1 root root 113 Oct 14 2011 nginx.repo
$ yum repolist
nginx nginx repo 56
===================================================================================================
CentOS 5.x :
wget http://nginx.org/packages/centos/5/noarch/RPMS/nginx-release-centos-5-0.el5.ngx.noarch.rpm
rpm -Uvh nginx-release-centos-5-0.el5.ngx.noarch.rpm
CentOS 6.x :
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
rpm -Uvh nginx-release-centos-6-0.el6.ngx.noarch.rpm
===================================================================================================
2) yum install
$ yum install nginx
=================================================================================================================
Package Arch Version Repository Size
=================================================================================================================
Installing:
nginx x86_64 1.6.0-1.el6.ngx nginx 335 k
3) conf 설정파일
$ vi /etc/nginx/nginx.conf
$ vi /etc/nginx/conf.d/default.conf
4) Nginx 실행 및 명령어
$ /etc/init.d/nginx
Usage: nginx {start|stop|restart|condrestart|try-restart|force-reload|upgrade|reload|status|help|configtest}
$ /etc/init.d/nginx start
Starting nginx: [ OK ]
$ ps aux | grep nginx
root 30106 0.0 0.0 45040 1124 ? Ss 14:52 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 30107 0.0 0.0 45412 1732 ? S 14:52 0:00 nginx: worker process
※ 소스설치
소스파일 다운로드 : http://nginx.org/en/download.html
컴파일 옵션 참조 : http://wiki.nginx.org/InstallOptions