CentOs6.5下配置nginx
来源:互联网 发布:log4j.xml sql 编辑:程序博客网 时间:2024/05/16 11:29
下载最新版本Nginx 网址http://nginx.org/en/download.html
wget http://nginx.org/download/nginx-0.8.53.tar.gz
解压下载下好的源码包
tar -zxvf nginx-0.8.53.tar.gz
进入解压出的源码文件夹
cd nginx-0.8.53
配置nginx
./configure --prefix=/opt/nginx --with-http_stub_status_module
解释: --prefix 为安装路径,--with-为需要安装的模块,具体可以运行./configure --help 查看有效模块
编译并安装 nginx
make && make install
-------------------------------------
安装提示:
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
解决办法:
从上面的提示可以看出,需要安装PCRE库
可以从下面下载,我一开始下载了一个,不过还是不行,后来下一个版本高的,就可以了!
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
解压下载下好的源码包
tar -zxvf pcre-8.34.tar.gz
进入解压出的源码文件夹
cd pcre-8.34
执行:
./configure
make
make install
-------------------------------------
启动 nginx
/opt/nginx/sbin/nginx
-------------------------------------
提示:
/opt/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
解决方法:
ldd /opt/nginx/sbin/nginx =====>查看链接库是否正常
linux-vdso.so.1 => (0x00007fff25dff000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f549c495000)
libpcre.so.1 => not found ======>没找到对应库
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f549c0b4000)
libz.so.1 => /lib64/libz.so.1 (0x00007f549be9e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f549bb0a000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f549b892000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f549b68e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f549c6d2000)
ln -s libpcre.so.0.0.1 libpcre.so.1
-------------------------------------
再次启动 nginx
/opt/nginx/sbin/nginx
查看nginx是否正常启动
ps -ef |grep nginx
wget http://nginx.org/download/nginx-0.8.53.tar.gz
解压下载下好的源码包
tar -zxvf nginx-0.8.53.tar.gz
进入解压出的源码文件夹
cd nginx-0.8.53
配置nginx
./configure --prefix=/opt/nginx --with-http_stub_status_module
解释: --prefix 为安装路径,--with-为需要安装的模块,具体可以运行./configure --help 查看有效模块
编译并安装 nginx
make && make install
-------------------------------------
安装提示:
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
解决办法:
从上面的提示可以看出,需要安装PCRE库
可以从下面下载,我一开始下载了一个,不过还是不行,后来下一个版本高的,就可以了!
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
解压下载下好的源码包
tar -zxvf pcre-8.34.tar.gz
进入解压出的源码文件夹
cd pcre-8.34
执行:
./configure
make
make install
-------------------------------------
启动 nginx
/opt/nginx/sbin/nginx
-------------------------------------
提示:
/opt/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
解决方法:
ldd /opt/nginx/sbin/nginx =====>查看链接库是否正常
linux-vdso.so.1 => (0x00007fff25dff000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f549c495000)
libpcre.so.1 => not found ======>没找到对应库
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f549c0b4000)
libz.so.1 => /lib64/libz.so.1 (0x00007f549be9e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f549bb0a000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f549b892000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f549b68e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f549c6d2000)
ln -s libpcre.so.0.0.1 libpcre.so.1
-------------------------------------
再次启动 nginx
/opt/nginx/sbin/nginx
查看nginx是否正常启动
ps -ef |grep nginx
0 0
- CentOs6.5下配置nginx
- centos6.5下配置django+uwsgi+nginx
- centOS6.5下安装Nginx配置
- CentOS6.5下nginx的安装与配置
- CentOS6.3下安装配置Nginx
- CentOS6.4下,Nginx安装与配置
- CentOS6.5下安装Nginx
- centos6.5下安装nginx
- CentOS6.5下安装Nginx
- centos6.5下安装nginx
- NGINX+php+mysql centos6.5配置
- centOS6 nginx环境配置
- CentOS6.4 配置nginx
- centos6.8配置nginx
- centos6.8配置nginx
- 【Nginx】centos6.5下安装lnmp环境
- Linux下,安装nginx,centos6.5
- Centos6.5下nginx编译安装
- 黑盒设计测试用例方法
- 白盒测试实例--逻辑覆盖测试
- 白盒测试实例--集成测试的概念
- springmvc处理流程
- wxpythom入门
- CentOs6.5下配置nginx
- 关于UIEdgeInsetsMake
- UVa 694 - The Collatz Sequence
- 起先在女儿的房间里玩得不亦乐乎
- python读取xml放入dict字典中
- NAND flash和NOR flash的区别详解
- 去除浏览器首页的方法(hao123,2345...)
- ORA-01589错误的解决方法
- 我开博的目的——写在技术贴之前。