0、创建虚拟主机;

# vim /etc/httpd24/extra/httpd-vhosts.conf
<VirtualHost *:80>
        ServerName www.b.com
        DocumentRoot "/www/htdoc/"
</VirtualHost>
<VirtualHost *:80>
        ServerName www.a.com
        DocumentRoot "/www/htdoc2/"
</VirtualHost>
<VirtualHost *:80>
        ServerName www.c.com
        DocumentRoot "/www/htdoc3/"
</VirtualHost>
<VirtualHost *:80>
        ServerName www.d.com
        DocumentRoot "/www/htdoc4/"
</VirtualHost>


1、安装phpMyAdmin

#Unzip phpMyAdmin-3.5.8-all-languages.zip
# mv phpMyAdmin-3.5.8-all-languages  /www/htdoc/phpMyAdmin
# cp config.sample.inc.php config.inc.php
# mysql -uroot -pzhangxiaocen –hlocalhost
#set password for ‘root’@’localhost’ = password(‘zhangxiaocen’);
#flush privileges;
#http://www.b.com/phpMyAdmin/

初识linux之LAMP~论坛~_虚拟主机


2、 安装Discuz_X2.5_SC_GBK


# unzip Discuz_X2.5_SC_GBK.zip
# mv upload    /www/htdoc3/bbs 
# chown -R daemon:daemon  ./* 
#mysql>create database discuz;
#grant all on discuz.* to discuz@'localhost' identified by '111111';

初识linux之LAMP~论坛~_linux_02


3、安装wordpress

#Unzip  wordpress-3.0.5-zh_CN.zip
# mv wordpress /www/htdoc2/mybbs
# cp wp-config-sample.php wp-config.php
#chmod  a+x wp-config.php
# vim wp-config.php
# mysql -uroot -pzhangxiaocen –hlocalhost
mysql> create database wpdb
18 define('DB_NAME', 'wpdb');
                                         
21 define('DB_USER', 'root');
                                         
24 define('DB_PASSWORD', 'zhangxiaocen');
27 define('DB_HOST', 'localhost');
                                          
30 define('DB_CHARSET', 'utf8');
                                          
33 define('DB_COLLATE', '');

初识linux之LAMP~论坛~_linux_03

4、安装phpwind

# unzip phpwind_GBK_8.7.zip
# cd phpwind_GBK_8.7
# mv upload /www/htdoc4/phpwind
# mkdir  /www/htdoc4
# chmod -R p_w_upload/
# chmod -R 777 data/
# chmod -R 777 html/
# mysql -uroot -pzhangxiaocen –hlocalhost
mysql> create database phpwind
    -> ;
Query OK, 1 row affected (0.00 sec)

初识linux之LAMP~论坛~_虚拟主机_04