nginx 安装
2015-12-28 14:34
531 查看
下载nginx(nginx-1.2.9.tar.g) openssl-1.0.2e.tar.gz ,zlib-1.2.8.tar.gz, pcre(pcre-8.31.tar.gz)
安装openssl-1.0.2e.tar.gz ,zlib-1.2.8.tar.gz
安装前 在线安装gcc、openssl-devel、pcre-devel、zlib-devel
#yum -y install gcc openssl-devel pcre-devel zlib-devel
安装pcre
#tar zxvf pcre-8.31.tar.gz
#cd pcre-8.31
#./congigure
#make
#make install
问题:
libtool: compile: unrecognized option `-DHAVE_CONFIG_H'
libtool: compile: Try `libtool --help' for more information.
make[1]: *** [pcrecpp.lo] Error 1
make[1]: Leaving directory `/home/guangbo/work/pcre-8.12'
make: *** [all] Error 2
缺少gcc-c++和libtool,也就是c++编译包
解决方法:需要先安装libtool和gcc-c++
#yum -y install libtool
#yum -y install gcc-c++
之后重新配置,编译,安装
./configure --prefix=/usr/local/nginx(安装目录不能和加压目录放在一起) --with-http_realip_module --with-http_sub_module --with-http_flv_module --with-http_dav_module --with-http_gzip_static_module --with-http_stub_status_module
--with-http_addition_module --with-pcre=/usr/local/pcre-8.31 --with-openssl=/usr/local/openssl-1.0.2e --with-zlib=/usr/local/zlib-1.2.8
启动:
/usr/local/nginx/sbin/nginx
重启:
/usr/local/nginx/sbin/nginx -s
reload
问题:
make[1]: *** [objs/nginx] Error 1
当用高版本pcre和nginx的时候一直出现这个问题,后换成低版本就可以
安装openssl-1.0.2e.tar.gz ,zlib-1.2.8.tar.gz
安装前 在线安装gcc、openssl-devel、pcre-devel、zlib-devel
#yum -y install gcc openssl-devel pcre-devel zlib-devel
安装pcre
#tar zxvf pcre-8.31.tar.gz
#cd pcre-8.31
#./congigure
#make
#make install
问题:
libtool: compile: unrecognized option `-DHAVE_CONFIG_H'
libtool: compile: Try `libtool --help' for more information.
make[1]: *** [pcrecpp.lo] Error 1
make[1]: Leaving directory `/home/guangbo/work/pcre-8.12'
make: *** [all] Error 2
缺少gcc-c++和libtool,也就是c++编译包
解决方法:需要先安装libtool和gcc-c++
#yum -y install libtool
#yum -y install gcc-c++
之后重新配置,编译,安装
./configure --prefix=/usr/local/nginx(安装目录不能和加压目录放在一起) --with-http_realip_module --with-http_sub_module --with-http_flv_module --with-http_dav_module --with-http_gzip_static_module --with-http_stub_status_module
--with-http_addition_module --with-pcre=/usr/local/pcre-8.31 --with-openssl=/usr/local/openssl-1.0.2e --with-zlib=/usr/local/zlib-1.2.8
启动:
/usr/local/nginx/sbin/nginx
重启:
/usr/local/nginx/sbin/nginx -s
reload
问题:
make[1]: *** [objs/nginx] Error 1
当用高版本pcre和nginx的时候一直出现这个问题,后换成低版本就可以
相关文章推荐
- 使用log_format为Nginx服务器设置更详细的日志格式
- 解决nginx打开php文件总是显示下载框的问题
- Ubuntu安装nginx、php
- centos7系统nginx下phalcon环境搭建
- 删:[CentOS 7] 安装nginx
- thinkPHP在apache和IIS,nginx下的伪静态配置
- 如何解决nginx上传大文件的限制
- 查看 PHP apache nginx mysql 是如何编译的
- wordpress nginx 屏蔽后台密码破解 xmlrpc.php
- 利用Nginx的上传模块和上传进度模块实现网页上传文件
- nginx制作个人dns定向解析
- 搭建nginx+uwsgi+django环境
- nginx 负载均衡、用数据库存储Session,来实现多站点共享Session[转]
- 自动化管理工具Saltstack之nginx部署(12)
- 配置Nginx 1.8支持PHP 5.6
- 让Apache 和nginx支持跨域訪问
- Centos-6.7下Nginx-1.8.0安装过程详解
- Nginx对某个文件夹或整个站点进行登录认证的方法
- Linux-000-ubutun编译安装nginx
- Linux-001-nginx index 中文乱码