centos7 安装nginx
程序员文章站
2022-04-30 20:36:20
...
安装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
下载安装包
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=
解决办法:
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教程有兴趣的朋友有所帮助。
上一篇: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resour,该怎么解决
下一篇: 十行代码搞定React图表需求
推荐阅读
-
PHP安装memcached扩展笔记_PHP
-
Nginx 缓存机制 详解之一 缓存管理进程
-
Vagrant环境,laravel5.1中安装laravel Elixir无法成功?
-
如何安装php-fpm模块?
-
OS X EI Capitan安装mcrypt
-
HP笔记本UEFI导致无法安装win7系统的解决方法
-
IIS环境下安装PHP5手记_PHP教程
-
安装ssl证书后报错Caused by: java.io.IOException: DerInputStream.getLength(): lengthTag=109, too big.
-
在Centos 5.2下安装最新的MySQL Proxy
-
PHP网站安装程序制作的原理、步骤、注意事项和示例代码_PHP教程