centos7下nginx的编译安装
2016-09-21 10:25
573 查看
1.软件包准备,注意版本号,不要尝试新版本,新的版本我这里make的时候会出错
nginx-1.10.1.tar.gz
openssl-1.0.1t.tar.gz
pcre-8.39.tar.bz2
zlib128.zip
点击下载所需压缩包
解压上面的软件包到指定目录
我这里统一解压到了我的用户目录新建的live文件夹下
/home/webrtc/live/
2.操作系统我这里采用的centos7
//安装pcre-devel,否则会make出错
->yum install pcre-devel
//进入到ngnix解压后的源码目录
->cd home/username/live/nginx_解压目录
//配置nginx
->./configure --prefix=/usr/local/nginx --with-pcre=/home/webrtc/live/pcre --with-zlib=/home/webrtc/live/zlib --with-openssl=/home/webrtc/live/openssl
–with-pcre是指需要pcre库,/path/to/your/pcre/是指的pcre源代码路径,其他的同理。
其中–prefix是指定你执行make install后nginx的安装目录(不是你解压的nginx源码目录),
3.->make
4.->make install
5.执行下面的命令看到进程出现,证明安装成功了
[root@localhost conf]# ps -ef | grep nginx
root 60091 1 0 23:13 ? 00:00:00 nginx: master process ./nginx
nobody 60092 60091 0 23:13 ? 00:00:00 nginx: worker process
root 60291 18983 0 23:19 pts/1 00:00:00 grep --color=auto nginx
nginx-1.10.1.tar.gz
openssl-1.0.1t.tar.gz
pcre-8.39.tar.bz2
zlib128.zip
点击下载所需压缩包
解压上面的软件包到指定目录
我这里统一解压到了我的用户目录新建的live文件夹下
/home/webrtc/live/
2.操作系统我这里采用的centos7
//安装pcre-devel,否则会make出错
->yum install pcre-devel
//进入到ngnix解压后的源码目录
->cd home/username/live/nginx_解压目录
//配置nginx
->./configure --prefix=/usr/local/nginx --with-pcre=/home/webrtc/live/pcre --with-zlib=/home/webrtc/live/zlib --with-openssl=/home/webrtc/live/openssl
–with-pcre是指需要pcre库,/path/to/your/pcre/是指的pcre源代码路径,其他的同理。
其中–prefix是指定你执行make install后nginx的安装目录(不是你解压的nginx源码目录),
3.->make
4.->make install
5.执行下面的命令看到进程出现,证明安装成功了
[root@localhost conf]# ps -ef | grep nginx
root 60091 1 0 23:13 ? 00:00:00 nginx: master process ./nginx
nobody 60092 60091 0 23:13 ? 00:00:00 nginx: worker process
root 60291 18983 0 23:19 pts/1 00:00:00 grep --color=auto nginx
相关文章推荐
- 在CentOS 7下编译安装Nginx+PHP+MySQL环境
- centos7下编译安装nginx并实现日志轮替
- CentOS7下编译安装 nginx1.12.0
- Centos7下编译安装配置Nginx+PHP+MySql环境
- CentOS 7下编译安装 nginx1.9.14
- CentOS7下编译安装 nginx1.12.0
- centos7下nginx编译安装
- centos7下编译安装nginx
- centos7下编译安装nginx
- 在CentOS 7下编译安装Nginx+PHP+MySQL环境
- CentOS 7下编译安装 nginx1.9.14
- centOS7下编译安装nginx-1.12.2+php-7.1.9
- CentOS 7下编译安装Nginx 1.11.10教程
- 编译安装LNMP Centos 6.5 x64 + Nginx1.6.0 + PHP5.5.13 + Mysql5.6.19
- centos下编译安装nginx|configure参数对照列表
- CentOS 编译安装Nginx1.0.12+MySQL5.5.21+PHP5.3.10
- centos 编译安装 nginx
- CentOS 6.3 编译安装 配置 nginx server php mysql c gcc g++ c++等
- CentOS 6.3 编译安装Nginx 1.2.4
- CentOS源码编译安装Nginx和tcp_proxy module