nginx的安装
nginx依赖于zlib,pcre和openssl库
安装方法:1. 通过源代码安装 zlib的下载地址 http://www.zlib.net/
pcre的下载地址 http://www.pcre.org/
openssl的下载地址 https://www.openssl.org
安装方法既是普通的configure & make & make install
2. 通过apt安装 apt-get install zlib1g-dev
apt-get install libpcre3-dev
apt-get install libssl-dev-
下载nginx的源代码 wget http://nginx.org/download/nginx-1.4.2.tar.gz
nginx的配置 ./configure –prefix=/usr/local/nginx,如果通过源码安装
则还需要指定依赖库的路径 -
启动nginx
- 执行/usr/local/nginx/sbin/nginx
- 验证nginx执行: ps -ef | grep nginx
-
验证nginx
ubuntu内网安装 web查看 http://localhost
cloud服务器安装 查询得到公网ip
web查看 http://xxx.xxx.xxx.xxx