• PHP5.4.36 RHEL6.5 源码编译安装


    php 的配置
    (一) 、编译 PHP 的安装包---此处为 5.4.36 版本的 php
    [root@server1 ~]# yum install libxml2-devel net-snmp-devel curl-devel libpng-devel libjpeg-devel freetype-devel gmp-devel openldap-devel
    [root@server1 php-5.4.36]# ./configure 
    --prefix=/usr/local/lnmp/php 
    --with-config-file-path=/usr/local/lnmp/php/etc 
    --with-mysql=/usr/local/lnmp/mysql/ 
    --with-mysqli=/usr/local/lnmp/mysql/bin/mysql_config 
    --with-openssl --with-snmp --with-gd --with-zlib 
    --with-curl --with-libxml-dir --with-png-dir 
    --with-jpeg-dir --with-freetype-dir --without-pear 
    --with-gettext --with-gmp --enable-inline-optimization 
    --enable-soap --enable-ftp --enable-sockets --enable-mbstring 
    --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --with-mhash
    [root@server1 php-5.4.36]# make && make install
    (二) 、启动 PHP
    [root@server1 ~]# cp /root/php-5.4.36/php.ini-production /usr/local/lnmp/php/etc/php.ini
    [root@server1 ~]# cp /root/php-5.4.36/sapi/fpm/init.d.php-fpm /etc/init.d/fpm
    [root@server1 ~]# chmod +x /etc/init.d/fpm
    [root@server1 etc]# cd /usr/local/lnmp/php/etc/
    [root@server1~]# cp php-fpm.conf.default php-fpm.conf
    [root@server1 ~]# vim /usr/local/lnmp/php/etc/php-fpm.conf
    
    25 pid = run/php-fpm.pid
    
    [root@server1 ~]# vim /usr/local/lnmp/php/etc/php.ini
    
    909 date.timezone = Asia/Shanghai
    
    [root@server1 ~]# /etc/init.d/fpm start
    [root@server1 ~]# vim /usr/local/lnmp/nginx/html/index.php
    
    
    
    
    [root@server1 ~]# vim /usr/local/lnmp/nginx/conf/nginx.conf
    49 location / {
    50 root html;
    51 index index.php index.html index.htm;
    52 }
    71 location ~ .php$ {
    72 root html;
    73 fastcgi_pass 127.0.0.1:9000;
    74 fastcgi_index index.php;
    75 # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_scrip
    t_name;
    76 include fastcgi.conf;
    77 }
    @@@@@@
    [root@server1 ~]# ll /usr/local/lnmp/nginx/conf/fastcgi.conf
    -rw-r--r-- 1 root root 1034 Jan 13 16:06 /usr/local/lnmp/nginx/conf/fastcgi.conf
    [root@server1 ~]# nginx -s reload
  • 相关阅读:
    ORACLE-游标数
    Hibernate-原生SQL查询
    超链接无效
    首页统计脚本
    About_datebase
    PHP的学习--cookie和session--来自copy_02
    终于懂浏览器里面的cookies和session了
    About-PHP-02
    php链接数据库
    PHP 操作MySQL———来自copy
  • 原文地址:https://www.cnblogs.com/aallenn/p/6700618.html
Copyright © 2020-2023  润新知