lamp配置,比较乱

lamp配置,比较乱

//emacs
apt-get install emacs21
//APACHE
apt-get install wget;
cd /usr/local/src;
wget http://sunsite.tus.ac.jp/pub/apache/httpd/apache_1.3.34.tar.gz;
tar xvfz apache_1.3.34.tar.gz;
cd apache_1.3.34;
./configure  --prefix=/usr/local/apache --enable-module=proxy --enable-module=rewrite   --enable-module=so;
make ;
make install;
//mysql
apt-get install mysql-client-4.1 mysql-common-4.1 mysql-server-4.1 libmysqlclient14-dev

//libxml2
cd /usr/local/src;
wget http://xmlsoft.org/sources/libxml2-2.6.23.tar.gz;
tar xvfz libxml2-2.6.23.tar.gz;
cd libxml2-2.6.23;
./configure;
make;
make install;
http://nchc.dl.sourceforge.net/sourceforge/libpng/zlib-1.2.3.tar.gz
http://keihanna.dl.sourceforge.net/sourceforge/re2c/re2c-0.10.1.tar.gz
//PHP
cd /usr/local/src;
wget http://jp2.php.net/get/php-5.1.2.tar.gz/from/cn.php.net/mirror;
tar xvfz php-5.1.2.tar.gz;
cd php-5.1.2;
./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/lib --with-mysql --with-pear --with-zlib --enable-pdo --enable-module=so --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex
make;
make install;
cp php.ini-dist /usr/local/lib/php.ini
接下来就是修改/usr/local/apache2/conf/httpd.conf。
LoadModule php5_module modules/libphp5.so #这一行php5安装的时候就应该已经自动添加上了。
添加下面的两行:
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
根据需要修改ServerName,docmentroot等参数。
记得修改AddDefaultCharset这一行,要不显示中文时就是乱码。
AddDefaultCharset GB2312
然后重启apache:
/usr/local/apache/bin/apachectl restart
在/home/www/sample/htdocs中添加index.php文件。(如果修改了DocumentRoot就不是这个路径)。
phpinfo();
?>
然后浏览器中输入:
http://localhost/index.php
应该可以显示系统的配置信息了吧。
 
安装pdo没有问题,但是安装pdo_mysql时出现了错误,所以我用了一点乱来的招数,把检查错误的文件的下面部分删掉了,呵呵,结果还真的可以,我也是在外国老那学来的!
if test "x$is_it_shared" = "x" && test "x$3" != "xtrue"; then
    AC_MSG_ERROR([
You've configured extension $1, which depends on extension $2,
but you've either not enabled $2, or have disabled it.
])
  fi
 

你可能感兴趣的:(Linux)