一.安装Apache
1.解压缩后
#./configure --sysconfdir=/etc --enable-ssl --enable-modules
#make;make install
2.启动服务
#/usr/local/apache2/bin/apachectl start
3.测试访问效果
#elinks
默认网站首页目录/usr/local/apache2/htdocs/index.html
二.安装mysql
1.解压缩后
#./configure --sysconfdir=/etc
#make;make install
#cp /usr/local/share/mysql/my-large.cnf /etc/my.cnf
2.初始化数据库
#useradd -d /usr/local/var mysql
#su - mysql
$/usr/local/bin/mysql_install_db
3.启动服务器
$/usr/local/bin/mysql_safe
4.用/usr/local/bin/mysql登录测试
/**********************************************************
###
在解压mysql5.0.22 原代码包后
cd mysql5.0.22
./configure
--prefix=/usr/local/mysql --localstatedir=/var/lib/mysql
--with-charset=gbk --with-extral-charsets=all --syconfigdir=/etc
--enable-thread-safe-client
然后 root权限下安装
make WITH_CHARSET=gbk WITH_XCHARSET=all install clean
make install
cp /mysql5.0.22/support-files/my-medium.cnf /etc/my.cnf
bin/mysql_install_db
###
************************************************************/
三.安装php
1.解压缩后运行
#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local
#make;make install
#cp php.ini-dist /usr/local/lib/php.ini
2.编辑apache配置文件/etc/httpd.conf,增加
AddType application/x-httpd-php .php .phtml
3.编写测试页面/usr/local/apache2/htdocs/test.php
4.访问测试页面
#elinks
收尾工作:
1.让apache自动启动
#echo "/usr/local/apache2/bin/apachectl start" >>/etc/rc.local
2.让mysql数据库服务器自动启动
#cp /usr/local/share/mysql/mysql.server /etc/init.d/mysqld
#chkconfig mysqld on
阅读(1080) | 评论(0) | 转发(0) |