1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| cd /lnmp/src tar -jxvf php-7.0.7.tar.bz2 cd php-7.0.7 ./configure --prefix=/usr/local/php7 --with-config-filepath=/usr/local/php7/etc --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mysqlnd --with-mysql-sock=/usr/local/mysql/mysql.sock --with-gd --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-mcrypt --with-curl --with-jpeg-dir --with-freetype-dir --with-pdo-mysql=/usr/local/mysql/ make make install cp php.ini-production /usr/local/php7/etc/ rm -rf /etc/php.ini ln -s /usr/local/php7/etc/php.ini /etc/php.ini cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf vi /usr/local/php7/etc/php-fpm.d/www.conf user = www group = www vim /usr/local/php7/etc/php-fpm.conf pid = run/php-fpm.pid 设置 php-fpm开机启动 cp /lnmp/src/php-7.0.7/sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm chmod +x /etc/rc.d/init.d/php-fpm chkconfig php-fpm on vi /usr/local/php7/etc/php.ini 这里暂时不给禁用 找到:disable_functions = 修改为:disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname
找到:;date.timezone = 修改为:date.timezone = PRC 找到:expose_php = On 修改为:expose_php = OFF 找到:short_open_tag = Off 修改为:short_open_tag = ON
vi /usr/local/nginx/conf/nginx.conf 修改/usr/local/nginx/conf/nginx.conf 配置文件,需做如下修改
|