安裝nginx /usr/local/nginx/sbin/nginx -c /usr/local/nginx/sbin/nginx -s
以上就介紹了centos7 安裝nginx,包含了require方面的內容,希望對PHP教學有興趣的朋友有幫助。
下載安裝包
http://nginx.org/en/download.html 下載最新的nginx-1.9.6.tar.gz
放入centos 7 /usr/local 中
-xgin -cginzx .6.tar.gz
創建nginx目錄mkdir /usr/local/nginx
進入解壓縮目錄cd /usr/local/nginx-1.9.6
安裝nginx
接下來安裝,使用--prefix參數指定nginx安裝的目錄,make、make install安裝
./configure $預設安裝
./configure $預設安裝於/usr/local/nginx
的提示unctionsfrom OpenSSL library. You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by by 完成者 - %--withuso--withus; openssl=
解決方法:
yum -y install pcre-devel openssl openssl-devel
./configure --prefix=/usr/local/nginx
nginx
的啟動指令為: