<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 325,  comments - 25,  trackbacks - 0

    一、安裝相關依賴庫

        yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel curl curl-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers pcre pcre-devel

    二、解壓php包

    tar -zxvf php-5.6.3.tar.gz

    cd php-5.6.3

    export LD_LIBRARY_PATH=/usr/local/libgd/lib

    三、編譯安裝

    ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysql-sock=/usr/local/mysql/mysql.sock  --with-apxs2=/usr/local/apache/bin/apxs --with-gd --with-jpeg-dir --with-png-dir --enable-mbstring --enable-xml --enable-fpm --with-freetype-dir --with-mcrypt --with-mhash --with-libxml-dir --with-zlib-dir

    make

    make install

    四、配置php

    cp php.ini-production /usr/local/php/etc/php.ini #復制php配置文件到安裝目錄

    ln -s /usr/local/php/etc/php.ini /etc/php.ini #添加軟鏈接到 /etc目錄
    rm -rf /etc/php.ini #刪除系統自帶配置文件

    vi /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

    #列出PHP可以禁用的函數,如果某些程序需要用到這個函數,可以刪除,取消禁用。

    找到:;date.timezone =

    修改為:date.timezone = PRC #設置時區

    找到:expose_php = On

    修改為:expose_php = Off #禁止顯示php版本的信息

    找到:short_open_tag = Off

    修改為:short_open_tag = ON #支持php短標簽

    :wq! 保存

     

     

    cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf #拷貝模板文件為php-fpm配置文件

    ln -s /usr/local/php/etc/php-fpm.conf /etc/php-fpm.conf #添加軟連接到 /etc目錄

    vi /usr/local/php/etc/php-fpm.conf #編輯

    user = www #設置php-fpm運行賬號為www

    group = www #設置php-fpm運行組為www

    pid = run/php-fpm.pid #取消前面的分號

    :wq! #保存退出

     

    cp /home/php-5.6.3/sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm #拷貝php-fpm到啟動目錄
    chmod +x /etc/rc.d/init.d/php-fpm #添加執行權限
    chkconfig php-fpm on #設置開機啟動

    編輯apache配置文件httpd.conf,以apache支持php
    # vim /etc/httpd/httpd.conf
    添加如下

     

     AddType application/x-httpd-php .php .phtml
    定位至DirectoryIndex index.html
     
    修改為:
    DirectoryIndex index.php index.html
    添加index.php為默認主頁

    重新啟動apache

    五、測試

    在/usr/local/apache/htdocs目錄下建一個test.php或test.phtml的文件,內容如下示:

    <</FONT>

    ?

    php

    phpinfo();

    ?

    >

    :wq! #保存退出

    posted on 2016-03-10 15:38 長春語林科技 閱讀(144) 評論(0)  編輯  收藏 所屬分類: linux
    <2016年3月>
    282912345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

     

    長春語林科技歡迎您!

    常用鏈接

    留言簿(6)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    相冊

    收藏夾

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲av片不卡无码久久| 亚洲视频在线观看地址| 色窝窝亚洲av网| 日本xxwwxxww在线视频免费| 亚洲va久久久久| av免费不卡国产观看| 亚洲毛片一级带毛片基地| 18禁男女爽爽爽午夜网站免费| 91亚洲精品视频| 91精品国产免费久久久久久青草| 亚洲成人动漫在线观看| 无码国产精品一区二区免费式直播 | 免费视频爱爱太爽了| 亚洲13又紧又嫩又水多| 日韩视频在线免费| 青娱乐在线视频免费观看| 国产aⅴ无码专区亚洲av麻豆 | 猫咪免费观看人成网站在线| 亚洲精品线路一在线观看| 天堂在线免费观看| 亚洲黄色一级毛片| 日韩视频免费在线| 国产伦精品一区二区免费| 亚洲国产精久久久久久久| 91视频国产免费| 成人久久久观看免费毛片| 亚洲国产二区三区久久| 在线免费观看毛片网站| a毛片成人免费全部播放| 久久亚洲sm情趣捆绑调教| 四虎成人免费网站在线| 美女无遮挡拍拍拍免费视频| 亚洲黄色三级视频| 免费人成视频在线观看不卡| 蜜桃视频在线观看免费视频网站WWW| 91丁香亚洲综合社区| 亚洲日韩在线中文字幕第一页| **一级一级毛片免费观看| 国产精品亚洲专区无码牛牛| 亚洲av激情无码专区在线播放| 免费无码又爽又刺激高潮 |