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
  • 相关阅读:
    学习html5 中的canvas(一)
    js中的width问题
    css3中我们不知道的一些属性
    css3的渐变效果
    校园商铺-6店铺编辑列表和列表功能-1店铺信息编辑之Dao层开发
    校园商铺-4店铺注册功能模块-14前后端联调技巧细化与总结
    校园商铺-4店铺注册功能模块-13前后端联调验证整体模块功能
    校园商铺-4店铺注册功能模块-12引入kaptcha实现验证码
    11-接下来如何做
    10-K最近邻算法
  • 原文地址:https://www.cnblogs.com/aallenn/p/6700618.html
Copyright © 2011-2022 走看看