CentOS7安裝nginx指令碼install-nginx.sh記錄
阿新 • • 發佈:2018-12-13
備份:
#!/bin/bash echo "start" echo "install gcc gcc-c++" yum install -y gcc gcc-c++ echo "get into /usr/local" cd /usr/local echo "download pcre-8.36" wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.tar.gz tar -zxvf pcre-8.36.tar.gz cd pcre-8.36 ./configure make && make install echo "download openssl-1.0.1j" wget http://www.openssl.org/source/openssl-1.0.1j.tar.gz tar -zxvf openssl-1.0.1j.tar.gz cd openssl-1.0.1j ./config make && make install echo "download zlib-1.2.11" 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 echo "download nginx-1.8.0" wget http://nginx.org/download/nginx-1.8.0.tar.gz tar -zxvf nginx-1.8.0.tar.gz cd nginx-1.8.0 ./configure --user=nobody --group=nobody --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_gzip_static_module --with-http_realip_module --with-http_sub_module --with-http_ssl_module --with-pcre=/usr/local/pcre-8.33 --with-zlib=/usr/local/zlib-1.2.11 --with-openssl=/usr/local/openssl-1.0.1j make && make install mkdir logs echo "install path: /usr/local" echo "end"