2018-06-05 21:25:55
Ubuntu
Linux GP 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
下载最新Linxu
//官网 nginx.org最新稳定版
wget -c http://nginx.org/download/nginx-1.14.0.tar.gz
//解压并进入
tar -zxvf nginx-1.14.0.tar.gz
cd nginx-1.14.0/
//尝试生成配置
./configure --prefix=/usr/local/nginx
//checking for OS
// + Linux 4.15.0-22-generic x86_64
//checking for C compiler ... not found
//./configure: error: C compiler cc is not found
sudo apt-get install build-essential
//再次configure
./configure --prefix=/usr/local/nginx
//./configure: error: the HTTP rewrite module requires the PCRE library.
//You can either disable the module by using --without-http_rewrite_module
//option, or install the PCRE library into the system, or build the PCRE library
//statically from the source with nginx by using --with-pcre=<path> option.
//nginx 路由重写需要prce库
sudo apt-get install libpcre3 libpcre3-dev
//再次configure
./configure --prefix=/usr/local/nginx
//./configure: error: the HTTP gzip module requires the zlib library.
//You can either disable the module by using --without-http_gzip_module
//option, or install the zlib library into the system, or build the zlib library
//statically from the source with nginx by using --with-zlib=<path> option.
./configure --prefix=/usr/local/nginx --without-http_gzip_module
//Configuration summary
// + using system PCRE library
// + OpenSSL library is not used
// + zlib library is not used
// nginx path prefix: "/usr/local/nginx"
// nginx binary file: "/usr/local/nginx/sbin/nginx"
// nginx modules path: "/usr/local/nginx/modules"
// nginx configuration prefix: "/usr/local/nginx/conf"
// nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
// nginx pid file: "/usr/local/nginx/logs/nginx.pid"
// nginx error log file: "/usr/local/nginx/logs/error.log"
// nginx http access log file: "/usr/local/nginx/logs/access.log"
// nginx http client request body temporary files: "client_body_temp"
// nginx http proxy temporary files: "proxy_temp"
// nginx http fastcgi temporary files: "fastcgi_temp"
// nginx http uwsgi temporary files: "uwsgi_temp"
// nginx http scgi temporary files: "scgi_temp"
//可以生成配置但是有的常用库没有安
sudo apt-get install openssl
sudo apt-get install zlib1g-dev
./configure --prefix=/usr/local/nginx --without-http_gzip_module
sudo make
sudo make install
nginx 安装结束
安装PHP
转载于:https://www.cnblogs.com/8000cabbage/p/9142244.html