`

ubuntu 10.04下搭建LAMP环境

 
阅读更多
1.安装apache2.2
wget http://mirrors.hust.edu.cn/apache//httpd/httpd-2.2.29.tar.gz
tar -xzvf httpd-2.2.29.tar.gz
cd httpd-2.2.29
./configure
make && make install

2.安装mysql
sudo apt-get install mysql-server
sudo apt-get install libmysqld-dev (针对 configure: error: Cannot find MySQL header files under yes. 错误)

3.安装php 5.3
安装php前需要先安装libxml2-dev (否则会出现configure: error: xml2-config not found. Please check your libxml2 installation.)
sudo apt-get install libxml2-dev
wget http://cn2.php.net/get/php-5.3.29.tar.gz/from/this/mirror
tar -xzvf php-5.3.29.tar.gz
cd php-5.3.28
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli=mysqlnd
make && make install

4.配置php
cp php.ini-development /usr/local/lib/php.ini
<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics