Centos6.5安装Nginx的教程 先安装nginx依赖的库pcre
来源:互联网 发布:条形码生成器软件下载 编辑:程序博客网 时间:2024/05/21 22:39
1、安装nginx依赖的库pcre
地址:http://sourceforge.net/projects/pcre/
2、解压pcre
zip解压方式:unzip pcre-xxx
tar解压方式:tar -xzvf pcre-xxx
3、运行configure
cd prce-xxx
./configure
如果运行出错:You need a C compiler for C support
则需要安装C 编译环境:yum install -y gcc gcc-c
4、安装和编译prce
make make install
5、解压nginx
tar -xzvf nginx-xxx
6、运行configure
cd nginx-xxx
./configure
如果运行出错:./configure: error: the HTTP gzip module requires the zliblibrary.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib= path option.
则需要安装zlib库:yum install zlib-devel
7、安装nginx
make make install
8、启动nginx
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
启动出错:/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
解决办法:ldd /usr/local/nginx/sbin/nginx ===== 查看链接库是否正常
linux-vdso.so.1 = (0x00007fff1e3ff000)
libpthread.so.0 = /lib64/libpthread.so.0 (0x0000003ea5800000)
libcrypt.so.1 = /lib64/libcrypt.so.1 (0x0000003eb0400000)
libpcre.so.1 = not found
libz.so.1 = /lib64/libz.so.1 (0x0000003ea6800000)
libc.so.6 = /lib64/libc.so.6 (0x0000003ea5000000)
/lib64/ld-linux-x86-64.so.2 (0x0000003ea4c00000)
libfreebl3.so = /lib64/libfreebl3.so (0x0000003eb1000000)
libdl.so.2 = /lib64/libdl.so.2 (0x0000003ea5400000)
9、ln -s libpcre.so.0.0.1 libpcre.so.1
10、再次启动nginx
./usr/local/nginx/sbin/nginx
11、ps -ef | grep nginx
查看nginx是否启动成功
- Centos6.5安装Nginx的教程 先安装nginx依赖的库pcre
- nginx依赖模块pcre、zlib、openssl 安装
- 安装nginx前的pcre中报错
- ubuntu安装nginx依赖库zlib,pcre,openssl
- ubuntu下安装nginx依赖库zlib,pcre,openssl
- 安装Nginx时遇到的pcre库问题
- Centos6 下的 nginx 安装
- centos6 下nginx的安装
- CentOS6.5编译安装Nginx的方法
- CentOS6.5编译安装Nginx的方法
- Centos6.5安装最新版本nginx教程
- 安装nginx 需要检查的依赖库
- centos6.5 nginx 安装
- CentOS6.5 Nginx安装
- Centos6.5 安装Nginx
- CentOS6.5 安装 Nginx
- CentOS6.5安装nginx
- centos6.5安装nginx
- 基于MAVEN的spring的task 和qz 两种方式
- bootstrap框架下下拉框select搜索功能
- oracle backspace 出现^H
- JavaScript对象创建方法
- Aliyun linux5.7 64位 安装 jdk1.7
- Centos6.5安装Nginx的教程 先安装nginx依赖的库pcre
- httpd+nfs 简单的文件系统共享
- python的time和datetime模块 之 时间形式互转
- servlet 一个simple web project
- Greenland'sMeltwater May Fertilize Fjords with Phosphorus
- aoj2249(最短路)
- node 学习的一些资料收集
- 重构--第一个案例
- 朴素贝叶斯