Installation location:/usr/local/nginx?
: http://nginx.org/en/download.html
--------------------------------------------------------------------------------------------------------------- ---------
Installation Prerequisites
Before installing Nginx, you need to ensure that the system has g++, GCC, Openssl-devel, Pcre-devel, and Zlib-devel software installed. Installation must be software:
[[email protected]/] #yum install gcc-c++
[[email protected]/] #yum-y install zlib zlib-devel OpenSSL openssl--devel pcre pcre-devel
Check the system installation Nginx:
[Email protected] local]# find-name Nginx
./nginx
./nginx/sbin/nginx
./nginx-1.2.6/objs/nginx
Uninstall the original Nginx
[email protected]/]# Yum remove Nginx
--------------------------------------------------------------------------------------------------------------- --------
Installation
Upload the installation package file to/usr/local to do the following:
[Email protected] nginx]# tar-zxv-f nginx-1.2.6.tar.gz
[[Email protected] nginx]# CD nginx-version number
[Email protected] nginx]#./configure
[[email protected] nginx]# make
[[email protected] nginx]# make install
In accordance with the above command, Nginx will be installed by default in the/usr/local/nginx directory
--------------------------------------------------------------------------------------------------------------- -------
Start
#方法1
[Email protected] nginx-1.2.6]#/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf
#方法2
[Email protected] nginx-1.2.6]# Cd/usr/local/nginx/sbin
[Email protected] sbin]#./nginx
--------------------------------------------------------------------------------------------------------------- ---
Stop it
#查询nginx主进程号?
Ps-ef | grep nginx
#停止进程?
Kill-quit main process number?
#快速停止?
Kill-term main process number?
#强制停止?
Pkill-9 Nginx
--------------------------------------------------------------------------------------------------------------- -----------
Test
#测试端口?
Netstat–na|grep 80
#浏览器中测试?
Http://ip:80
JEECG Server + Linux + nginx installation