1.下载nginx包
wget http://nginx.org/download/nginx-1.10.2.tar.gz
2.下载组件包
wget http://www.openssl.org/source/openssl-fips-2.0.10.tar.gz
wget http://zlib.net/zlib-1.2.11.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
3.openssl安装
tar zxvf openssl-fips-2.0.10.tar.gz
cd openssl-fips-2.0.10
./config && make && make install
4安装c++环境 opt install -y gcc gcc-c++
5.pcre安装
tar zxvf pcre-8.40.tar.gz
cd pcre-8.40
./configure && make && make install
6. zlib安装
tar zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure && make && make install
7. nginx安装
tar zxvf nginx-1.10.2.tar.gz
cd nginx-1.10.2
./configure && make && make install
扫描二维码关注公众号,回复:
10942412 查看本文章
8. 启动Nginx
先找一下nginx安装到什么位置上了
cd /usr/local/nginx/sbin
./nginx
进入Linux系统的图形界面,打开浏览器输入localhost会看到下图,说明nginx启动成功