Chinaunix首页 | 论坛 | 博客
  • 博客访问: 692614
  • 博文数量: 139
  • 博客积分: 7607
  • 博客等级: 少将
  • 技术积分: 1964
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-11 23:43
个人简介

...

文章分类

全部博文(139)

文章存档

2012年(53)

2011年(4)

2010年(29)

2009年(10)

2008年(33)

2007年(10)

分类: LINUX

2007-11-19 22:14:47

一.安装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
阅读(1048) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~