基本配置
安装web服务器:httpd-2.X.X
1.解压缩
[code] #./configure --sysconfdir=/etc/ --enable-ssl --enable-modules
#make;make install[/code]
2.启动服务
[code] #/usr/local/apache2/bin/apachectl start[/code]
3. 测试
[code] #links http://localhost
#lynx http://localhost
默认网站目录/usr/local/apache2/htdocs/index.html
netstat -tul |grep 80[/code]
安装Mysql
1.解压缩
[code]#./configure --sysconfdir=/etc
#.make ;make install
#cp /usr/local/share/mysql/my-large.cnf /etc/my.cnf[/code]
2.初始化
[code]#useradd -d /usr/local/var mysql
#su - mysql
$/usr/local/bin/mysql_install_db[/code]
3.启动服务器
[code]$/usr/local/bin/mysqld_safe[/code]
4.用/usr/local/bin/mysql登录测试
安装php
1.解压缩后
[code]#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local
#make ; make install
#cp php.ini-dist /usr/local/lib/php.ini[/code]
2.编辑apache配置文件/etc/httpd.conf,增加
[code]AddType application/x-httpd-php .php .phtml[/code]
3.编写测试网页/usr/local/apache2/htdocs/test.php
4.访问测试网页
[code]# links http://localhost/test.php[/code]