Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1413668
  • 博文数量: 269
  • 博客积分: 3602
  • 博客等级: 中校
  • 技术积分: 4536
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:13
文章分类

全部博文(269)

文章存档

2014年(8)

2013年(139)

2012年(122)

分类: 系统运维

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

阅读(1030) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~