Use the dpkg command to see if the software you need is installed dpkg-l | grep zlib; Which Nginx
View Port NETSTAT-TUNPL | grep 6379
wget http://nginx.org/download/nginx-1.12.0.tar.gz
TAR-ZXVF nginx-1.12.0.tar.gz
CD nginx-1.12.0
./configure
sudo make && sudo make install
Sudo/usr/local/nginx/sbin/nginx [-c/usr/local/nginx/conf/nginx.conf] profile does not write automatically loads the configuration under the installation directory
./configure:error:the HTTP Rewrite module requires the PCRE Library.sudo apt-GetInstall Libpcre3 libpcre3-Dev./configure:error:the HTTP gzip module requires the zlib library.sudo apt-GetInstall zlib1g-Dev Configuration Summary+usingSystem PCRE Library+ OpenSSL Library isNot used+usingSystem zlib Library 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"
issues and configuration information that may be encountered
wget http://cn2.php.net/distributions/php-5.6.30.tar.gz
Tar zxvf php-5.6.30.tar.gz
CD php-5.6.30/
./configure--enable-fpm--with-fpm-user=www-data--with-fpm-group=www-data--with-mysql--with-mysqli-- With-pdo-mysql--enable-mbstring--with-iconv--with-mcrypt--with-mhash--with-openssl--with-curl--with-zlib-- Enable-zip--disable-fileinfo--enable-opcache--with-gd--with-jpeg-dir--with-png-dir
sudo apt-get install Libxml2-dev
sudo apt-get install Libssl-dev
sudo apt-get install Libmcrypt-dev
sudo make && sudo make install
Installing Shared extensions:/usr/local/lib/php/extensions/no-debug-non-zts-20131226/Installing PHP CLI binary:/usr/local/bin/Installing PHP CLI man page:/usr/local/php/man/man1/Installing PHP FPM binary:/usr/local/sbin/installing PHP FPM config:/usr/local/etc/Installing PHP FPM man page:/usr/local/php/man/man8/Installing PHP FPM Status page:/usr/local/php/php/fpm/Installing PHP CGI binary:/usr/local/bin/Installing PHP CGI man page:/usr/local/php/man/man1/Installing build Environment:/usr/local/lib/php/build/Installing header files:/usr/local/include/php/Installing helper Programs:/usr/local/bin/program:phpize program:php-configinstalling Mans Pages:/usr/local/php/man/man1/page:phpize.1page:php-config.1Installing PEAR Environment:/usr/local/lib/php/
Path Information
/usr/local/etc$ sudo cp php-fpm.conf.default php-fpm.conf
Configure php-fpm.conf
PID = run/php-fpm.pid//This must go to the previous; comments removed (502 errors are not removed from the beginning)
Configure nginx.conf
Location ~. *\. (PHP|PHP5)? $
{
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename/var/www/$fastcgi _script_name; (later in the root directory + script path)
}
wget http://download.redis.io/releases/redis-3.2.8.tar.gz
Tar zxvf redis-3.2.8.tar.gz
CD redis-3.2.8/
sudo make
CD src/
Make install Prefix=/usr/local/redis
The executable file was copied to/usr/local/redis/etc in the/usr/local/redis/bin configuration file
Modify Redis.conf
Daemonize Yes background run
wget https://pecl.php.net/get/redis-3.1.2.tgz
Tar zxvf redis-3.1.2.tgz
CD REDIS-3.1.2/
Sudo/usr/local/bin/phpize
Cannot find autoconf. Please check your autoconf installation and the
$PHP _autoconf environment variable. Then, rerun the this script. sudo apt-get install autoconf
./configure--with-php-config=/usr/local/bin/php-config
Make && make install
Add full path in extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/redis.so//config file
Firewall Http://blog.163.com/[email protected]/blog/static/128659465201361791541665/
ubuntu16.4 LNMP Environment Construction