linux 安装nginx
2016-06-20 15:48
417 查看
linux下面运行nginx 需要依赖三个jar 包,分别是,版本自己选定
openssl-fips-2.0.2.tar.gz
zlib-1.2.7.tar.gz
pcre-8.21.tar.gz
nginx-1.2.6.tar.gz
安装的时候,我先安装的openssl-fips-2.0.2.tar.gz,在安装zlib-1.2.7.tar.gz,发现出现了一个错误,具体错误忘记了
后来好像是说按zlib 要先安装pcre
我又先安装了pcre,在安装过程中需要用到gcc ,和c++
yum gcc 、 yum -y install gcc-c++
1.[root@localhost home]# tar zxvf pcre-8.10.tar.gz //解压缩
2.[root@localhost home]# cd pcre-8.10 //切换到该目录下
3.[root@localhost pcre-8.10]#./configure //配置
4.[root@localhost pcre-8.10]#make
5.[root@localhost pcre-8.10]#make install //安装
用以上方法全部安装完成之后,检查nginx 是否安装成功
cd /usr/local/nginx/sbin
./nginx -t
出现如下错误
./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
解决方法:ln -s /usr/local/lib/libpcre.so.1 /lib64
在检查,安装成功
openssl-fips-2.0.2.tar.gz
zlib-1.2.7.tar.gz
pcre-8.21.tar.gz
nginx-1.2.6.tar.gz
安装的时候,我先安装的openssl-fips-2.0.2.tar.gz,在安装zlib-1.2.7.tar.gz,发现出现了一个错误,具体错误忘记了
后来好像是说按zlib 要先安装pcre
我又先安装了pcre,在安装过程中需要用到gcc ,和c++
yum gcc 、 yum -y install gcc-c++
下面列举一个安装方法
1.[root@localhost home]# tar zxvf pcre-8.10.tar.gz //解压缩2.[root@localhost home]# cd pcre-8.10 //切换到该目录下
3.[root@localhost pcre-8.10]#./configure //配置
4.[root@localhost pcre-8.10]#make
5.[root@localhost pcre-8.10]#make install //安装
用以上方法全部安装完成之后,检查nginx 是否安装成功
cd /usr/local/nginx/sbin
./nginx -t
出现如下错误
./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
解决方法:ln -s /usr/local/lib/libpcre.so.1 /lib64
在检查,安装成功
相关文章推荐
- centos 6.5下安装mysql+nginx+redmine 3.1.0 笔记
- 四:深入Nginx之事件和连接 (之一)
- centos7 服务器安装nginx,mysql,php
- 使用nginx lua实现网站统计中的数据收集
- Linux系统安装Nginx教程
- Nginx负载均衡配置实例详解
- 玩玩负载均衡---在window与linux下配置nginx
- Fastdfs与Nginx的整合
- Fastdfs与Nginx的整合
- 三:深入理解Nginx的模块化 (结合源码详解)
- CentOS6.5使用yum命令方便快捷安装Nginx
- 使用Nginx+FFMPEG搭建HLS直播转码服务器
- nginx 安装
- nginx 安装
- nginx 负载均衡,多站点共享Session
- Centos6.5源码编译安装nginx
- 如何调用Sphinx
- nginx图片服务器nginx.conf配置
- nginx常用命令
- 【 Linux 】lvs-dr模型实现HA,后端Nginx、PHP、MySQL分离 搭建wordpress站点