初识linux之LAMP~论坛~

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 �Chlocalhost
#set password for ‘root’@’localhost’ = password(‘zhangxiaocen’);
#flush privileges;
#http://www.b.com/phpMyAdmin/

wKioL1MsRRyA0kcjAAFrANq9_VM271.jpg


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';

wKiom1MsRLixaoxOAARjU71cvCQ810.jpg


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 �Chlocalhost
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', '');

wKioL1MsRzjguc7gAAQj6roS_8c362.jpg

4、安装phpwind

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

wKioL1MsSGSxW50aAAIaZqkvWh4134.jpg

你可能感兴趣的:(linux,虚拟主机)