Ubuntu 16.04源码编译安装Nginx 1.10.0
在Ubuntu 16.04源码编译安装Nginx 1.10.0 过程记录。
一、下载相关的依赖库
pcre 下载地址 http://120.52.73.43/jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.tar.gz
openssl 下载地址 https://www.openssl.org/source/openssl-1.0.2h.tar.gz
zlib 下载地址 http://zlib.net/zlib-1.2.8.tar.gz
nginx 下载地址 http://nginx.org/download/nginx-1.10.0.tar.gz
二、解压相关依赖库源码包
cd /tmp tar -zxf nginx-1.10.0.tar.gz tar -zxf pcre-8.38.tar.gz tar -zxf zlib-1.2.8.tar.gz tar -zxf openssl-1.0.2h.tar.gz
三、编译安装Nginx
cd /tmp/nginx-1.10.0 ./configure --prefix=/usr/local/nginx --pid-path=/usr/local/nginx/logs/nginx.pid --error-log-path=/usr/local/nginx/logs/error.log --http-log-path=/usr/local/nginx/logs/access.log --with-http_ssl_module --with-pcre=/tmp/pcre-8.38 --with-zlib=/tmp/zlib-1.2.8 --with-openssl=/tmp/openssl-1.0.2h
四、执行make和make install 安装
make && sudo make install
五、验证nginx是否安装成功
/usr/local/nginx/sbin/nginx -v
执行结果:nginx version: nginx/1.10.0
六、启动nginx
/usr/local/nginx/sbin/nginx
浏览器访问localhost:
更多Nginx相关教程见以下内容:
Nginx 的详细介绍:请点这里
Nginx 的下载地址:请点这里
相关推荐
瓜牛呱呱 2020-11-12
柳木木的IT 2020-11-04
yifouhu 2020-11-02
lei0 2020-11-02
源码zanqunet 2020-10-28
源码zanqunet 2020-10-26
一叶梧桐 2020-10-14
码代码的陈同学 2020-10-14
lukezhong 2020-10-14
lzzyok 2020-10-10
anchongnanzi 2020-09-21
clh0 2020-09-18
changcongying 2020-09-17
星辰大海的路上 2020-09-13
abfdada 2020-08-26
mzy000 2020-08-24
shenlanse 2020-08-18
zhujiangtaotaise 2020-08-18
xiemanR 2020-08-17