🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
1.先安装make yum -y install gcc automake autoconf libtool make 2安装gcc yum install gcc gcc-c++ 一般我们都需要先装pcre, zlib,前者为了重写rewrite,后者为了gzip压缩。 3选定源码目录 cd /usr/local/src 4.安装PCRE库 cd /usr/local/src wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.tar.gz tar -zxvf pcre-8.37.tar.gz cd pcre-8.34 ./configure make make install 5安装zlib库 cd /usr/local/src wget http://zlib.net/zlib-1.2.11.tar.gz tar -zxvf zlib-1.2.11.tar.gz cd zlib-1.2.11 ./configure make make install 6安装ssl(某些vps默认没装ssl) cd /usr/local/src wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz tar -zxvf openssl-1.0.1t.tar.gz 7安装nginx ./configure --sbin-path=/usr/local/nginx/nginx \ --conf-path=/usr/local/nginx/nginx.conf \ --pid-path=/usr/local/nginx/nginx.pid \ --with-http_ssl_module \ --with-pcre=/usr/local/src/pcre-8.42 \ --with-zlib=/usr/local/src/zlib-1.2.11 \ --with-openssl=/usr/local/src/openssl-1.0.1t make make install 8.启动nginx 查看端口占用: netstat -ano|grep 80 启动 ./nginx