标签:zip curses engine line use with sockets max 开机
【安装Nginx】 #先安装如下包 yum install gcc gcc-c++ kernel-devel yum -y install pcre-devel openssl openssl-devel #解压nginx-1.12.0.tar.gz 然后进入目录 ./configure --prefix=/usr/local/nginx --with-http_stub_status_module make && make install 【安装MySQL】 #先安装如下包: yum -y install make gcc-c++ cmake bison-devel ncurses-devel #解压mysql-5.6.14.tar.gz 然后进入目录 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DSYSCONFDIR=/etc -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci make && make install 【安装PHP】 #先安装如下包: yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers #解压php-7.1.6.tar.gz 然后进入目录 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --enable-mbstring --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pear --enable-sockets --with-freetype-dir=/usr --enable-gd-native-ttf --with-zlib --with-libxml-dir=/usr --with-xmlrpc --enable-zip --enable-fpm --enable-xml --enable-sockets --with-gd --with-zlib --with-iconv --enable-zip --with-freetype-dir=/usr/lib/ --enable-soap --enable-pcntl --enable-cli --with-curl make && make install
$ /usr/local/server/nginx/sbin/nginx #启动Nginx $ /usr/local/server/nginx/sbin/nginx -s stop #断开Nginx $ /usr/local/server/nginx/sbin/nginx -s reload #重启Nginx $ ps -ef | grep nginx 或者 ps -A | grep -i nginx #查看是否成功启动nginx
(1)index index.html index.htm; 改为: index index.html index.htm index.php; (2)#location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} 改为: location ~ \.php$ { # root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
location /qgzs_apiv2/app/ { index index.php; if (!-e $request_filename) { rewrite ^/qgzs_apiv2/app/(.*)$/qgzs_apiv2/app/index.php/$1 last; break; } } location ~ .+\.php($|/) { set $script $uri; set $path_info "/"; if ($uri ~ "^(.+\.php)(/.+)") { set $script $1; set $path_info $2; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php?IF_REWRITE=1; include fastcgi_params; fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root/$script; fastcgi_param SCRIPT_NAME $script; }
$ cd /usr/local/php/etc $ cp php-fpm.conf.default php-fpm.conf 然后,vim php-fpm.conf 编辑配置文件: ① 去掉 pid = run/php-fpm.pid 前面的分号 ② 修改user和group的用户为当前用户 ③ pm.max_children = 50 pm.start_servers = 20 pm.min_spare_servers = 5 pm.max_spare_servers = 35
标签:zip curses engine line use with sockets max 开机
原文地址:http://www.cnblogs.com/renxing123/p/7137375.html