zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    27. Remove Element
    列表变成字典
    1. Two Sum
    CVPR2019:What and How Well You Performed? A Multitask Learning Approach to Action Quality Assessment
    959. Regions Cut By Slashes
    118. Pascal's Triangle
    loj3117 IOI2017 接线 wiring 题解
    题解 NOI2019 序列
    题解 省选联考2020 组合数问题
    题解 Educational Codeforces Round 90 (Rated for Div. 2) (CF1373)
  • 原文地址:https://www.cnblogs.com/aallenn/p/6700618.html
Copyright © 2011-2022 走看看