下载discuz

在浏览期中  download.comsenz.com/DiscuzX/3.2

复制Discuz X3.2 SC GBK.的链接

创建跟目录

mkdir /data/123

cd /data/123

wget 粘贴链接

解压Discuz

unzip Discuz_X3.2_SC_GBK.zip

mv upload/* ./

删去多余的目录

rm -rf reade/ utility/ upload/ Discuz_X3.2_SC_GBK.zip

配置虚拟主机,

打开Apache主配置文件

vim /usr/local/apache2/conf/httpd.conf

找到

# Virtual hosts

#Include conf/extra/httpd-vhosts.conf

删去# 打开虚拟主机配置

# Virtual hosts

Include conf/extra/httpd-vhosts.conf

打开虚拟主机配置文件

vim /usr/local/apache2/conf/extra/httpd-vhosts.conf

<VirtualHost *:80>

ServerAdmin webmaster@dummy-host.example.com

DocumentRoot "/usr/local/apache2/docs/dummy-host.example.com"

ServerName dummy-host.example.com

ServerAlias www.dummy-host.example.com

ErrorLog "logs/dummy-host.example.com-error_log"

CustomLog "logs/dummy-host.example.com-access_log" common

</VirtualHost>

改为

<VirtualHost *:80>

DocumentRoot "/data/123"

ServerName123.com

ServerAlias 456.com

#   ErrorLog "logs/dummy-host.example.com-error_log"

#   CustomLog "logs/dummy-host.example.com-access_log" common

</VirtualHost>

检查配置文件有没有错误

/usr/local/apache2/bin/apachectl -t

配置hosts

在真机中搜c:\windows\system32\drivers\etc

在hosts 的文件中加上

192.168.23.135 123.com

192.168.23.135 456.com

启动80端口

/usr/local/apache2/bin/apachectl start

查Apache是那个用户执行的

ps aux |grep http

root     19714  0.0  0.9  29164  9876 ?        Ss   02:18   0:00 /usr/local/apache2/bin/httpd -k start

daemon   19715  0.0  0.9  29164  9332 ?        S    02:18   0:00 /usr/local/apache2/bin/httpd -k start

daemon   19716  0.0  0.9  29468  9444 ?        S    02:18   0:00 /usr/local/apache2/bin/httpd -k start

daemon   19717  0.0  0.8  29164  8852 ?        S    02:18   0:00 /usr/local/apache2/bin/httpd -k start

daemon   19718  0.0  0.8  29164  8852 ?        S    02:18   0:00 /usr/local/apache2/bin/httpd -k start

daemon   19719  0.0  0.8  29164  8852 ?        S    02:18   0:00 /usr/local/apache2/bin/httpd -k start

是daemon用户并将权限改为

chown -R daemon config data uc_client/data uc_server/data

配置mysql

/usr/local/mysql/bin/mysql

创建数据库

mysql> create database discuz;

创建人

mysql> grant all on discuz.* to 'aming'@'localhost' identified by '123456';

用户aming   密码123456