centos7 安装nginx

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Lepaskan: 2016-07-29 09:11:48
asal
1003 orang telah melayarinya

安装nginx
    下载安装包
        http://nginx.org/en/download.html 下载最新的 nginx-1.9.6.tar.gz
放入 centos 7 /usr/local 中
解压 tar -zxvf nginx-1.9.6.tar.gz
创建nginx目录 mkdir /usr/local/nginx
进入解压目录 cd /usr/local/nginx-1.9.6
安装nginx
   接下来安装,使用--prefix参数指定nginx安装的目录,make、make install安装
        ./configure  $默认安装在/usr/local/nginx   
       
 
     如果有错误提示:./configure: error: the HTTP cache module requires md5 functions
from 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 using
--with-http_ssl_module --with-openssl= options.
解决办法:
yum -y install pcre-devel openssl openssl-devel
./configure --prefix=/usr/local/nginx
    
继续安装
make

make install

        

      nginx的启动命令是:

     /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

     重启

     /usr/local/nginx/sbin/nginx -s  reload 

以上就介绍了centos7 安装nginx,包括了require方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Label berkaitan:
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan