| 安裝包: nginx-1.13.7.tar.gz
 openssl-1.1.0g.tar.gz
 pcre-8.41.tar.gz
 zlib-1.2.11.tar.gz 新建文件夾:nginx 注:我沒有新建nginx的時(shí)候,運(yùn)行make命令的時(shí)候,報(bào)了如下error。新建nginx后沒有報(bào)錯(cuò)   將安裝包全部解壓到nginx目錄下 cd nginx-1.13.7 sudo ./configure --prefix=/usr/local/nginx --with-http_realip_module --with-http_addition_module --with-http_gzip_static_module --with-http_secure_link_module --with-http_stub_status_module --with-stream --with-pcre=/home/qinghuan/share/nginx/pcre-8.41 --with-zlib=/home/qinghuan/share/nginx/zlib-1.2.11 --with-openssl=/home/qinghuan/share/nginx/openssl-1.1.0g 注:紅色部分為自己的路徑 sudo make sudo make install 執(zhí)行到make時(shí),報(bào)錯(cuò):WARNING:'aclocal-1.15' is missing on your system.  解決方法: ./configure --docdir=/usr/share/doc/automake-1.15 sudo make sudo make install 執(zhí)行命令./configure后,報(bào)錯(cuò):Autoconf 2.65 or better is required 
 解決方法: wget http://ftp./gnu/autoconf/autoconf-2.68.tar.gz tar xzf autoconf-2.68.tar.gz cd autoconf-2.68 ./configure sudo make sudo make install 運(yùn)行到./configure時(shí),報(bào)錯(cuò):configure: error: no acceptable m4 could be found in $PATH  解決方法: wget -O m4-1.4.9.tar.gz http://ftp./gnu/m4/m4-1.4.9.tar.gz tar -zvxf m4-1.4.9.tar.gz cd m4-1.4.9 ./configure sudo make sudo make install 此時(shí)沒有報(bào)錯(cuò)了,再依次倒序安裝上面的安裝包。 安裝完畢后,在/usr/local下有nginx目錄,進(jìn)入nginx目錄 執(zhí)行:sudo ./sbin/nginx -c ./conf/nginx.conf 在本地物理機(jī)的瀏覽器中輸入ip地址,有如下顯示:   
 
 | 
|  | 
來(lái)自: 新進(jìn)小設(shè)計(jì) > 《待分類》