分类: 系统运维
2013-05-09 10:36:27
1.httpd-2.2.3.tar.gz
gunzip < httpd-2.2.3.tar.gz |tar -xvf -
cd httpd-2.2.3
./configure
make
make install
启动:/usr/local/apache2/bin/apachectl start
2.mysql-5.0.22.tar.gz
groupadd mysql
useradd -g mysql mysql
gunzip < mysql-5.0.22.tar.gz |tar -xvf -
cd mysql-5.0.22
./configure --prefix=/usr/local/mysql --with-charset=gb2312
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db --user=mysql //用来安装数据库文件
chown -R root
chown -R mysql var
chgrp -R mysql
启动 bin/mysqld_safe --user=mysql &
3.php-5.2.0.tar.gz
gunzip < php-5.2.0.tar.gz |tar -xvf -
cd php-5.2.0
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql
--with-apxs2=/usr/local/apache/bin/apxs --enable-track-vars
--enable-force-cgi-redirect
--with-config-file-path=/usr/local/apache/conf
make
make install
cp php.ini-dist /usr/local/apache/lib/php.ini
编辑
php.ini文件:
查找:
;default_charset = "iso-8859-1"
在这行下面加一行
default_charset = "gb2312"
# 编辑
apache的 httpd.conf文件:
查找:
DirectoryIndex index.html
在后头介入 index.php 让apache也能打开默认首页为php的文件。
查找:
#AddType application/x-tar .tgz
在下面介入
AddType application/x-httpd-php .php
重启apache