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

转载于:https://www.cnblogs.com/baiquan/p/7477075.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值