• LAMP-PHP安装全步骤


    ---------------------------------------------------安装包下载链接-----------------------------------------------------------------------

    http://pan.baidu.com/s/1hsL4yfM 密码:68nw

    ---------------------------------------------------使用mcrypt模块功能-----------------------------------------------------------------
    1.先安装Libmcrypt
    #tar -zxvf libmcrypt-2.5.8.tar.gz
    #cd libmcrypt-2.5.8
    #./configure
    #make
    #make install 说明:libmcript默认安装在/usr/local
    2、安装mhash
    #tar -zxvf mhash-0.9.9.9.tar.gz
    #cd mhash-0.9.9.9
    #./configure
    #make
    #make install

    3、安装mcrypt
    #tar -zxvf mcrypt-2.6.8.tar.gz
    #cd mcrypt-2.6.8
    #LD_LIBRARY_PATH=/usr/local/lib ./configure
    报错 Cannot find libmysqlclient_r under /usr/local/mysql. Note that the MySQL client library is not bundled anymore
    # cd /usr/local/mysql/lib/mysql/
    #ln -s libmysqlclient.so.20.3.4 libmysqlclient_r.so
    #make
    #make install
    ---------------------------------------------------------------------------------------------------------------------------------------------

    ------------------------------------------------------PHP安装---------------------------------------------------------------------------
    #./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-sockets --with-apxs2=/usr/local/apache/bin/apxs --with-mcrypt --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 --enable-maintainer-ztske
    #make install
    --------------------------------------------------------------------------------------------------------------------------------------------
    --------------------------------------------------------PHP配制文件------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------------------------------------------------

    ------------------------------------------------------apache 和php 结合------------------------------------------------------------
    #vim /etc/httpd/http.conf
    查询/AddType
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .phps
    查找/DirectoryIndex
    index.php
    -------------------------------------------------------------------------------------------------------------------------------------------

    -------------------------------------------------------配制PHP------------------------------------------------------------------------
    #httpd -M 查看使用的模块
    #vim /etc/httpd/httpd.conf
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    ---------------------------------------------------------------------------------------------------------------------------------------------

    ------------------------------------------------------测试PHP---------------------------------------------------------------------------
    phpinfo();
    ?>

    测试与mysql的连接:wq
    <?php
    $conn=mysql_connct(,localhost',root','');
    if ($conn)//
    echo "链接“”;
    else
    echo "shibai";
    ?>
    ------------------------------------------------------------------------------------------------------------------------------------------

    --------------------------------------xcache------------------------------------------------------------------------------------------

    xcache 是 PHP的扩展
    安装方法: #/usr/local/php/bin/phpize 额外安装的扩展都需要运行phpize命令,在扩展文件夹中运行
    报错:Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
    #yum install autoconf -y 安装
    # ./configure --enable-xcache --with-php-config=/usr/local/php/bin/php-config
    #make
    #make install
    Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-zts-20131226/ xcache安装路径
    #mkdir /etc/php.d
    #cp xcache.ini /etc/php.d/
    #vim /etc/php.d/xcache.ini
    zend_extension = /usr/local/php/lib/php/extensions/no-debug-zts-20131226/xcache.so
    --------------------------------------------------------------------------------------------------------------------------------------

  • 相关阅读:
    用于json的 .ashx 小细节
    (转)写让别人能读懂的代码
    Mvc 中ViewBag Model 查找不到解决
    Windows 2008 R2 配置 DNS 实现二级域名
    Windows Server 2008 DNS服务器安装与配置
    【iOS】swift init构造器
    【iOS】OC-UTC日期字符串格式化
    android使用sharesdk的小感
    【iOS】Swift GCD-下
    【iOS】Swift GCD-上
  • 原文地址:https://www.cnblogs.com/baiquan/p/7477075.html
Copyright © 2020-2023  润新知