准备工作:
关闭防火墙、selinux,保证连接不受影响
service iptables stop
# chkconfig iptables off # iptables -F
1.首先准备搭建环境
安装httpd、PHP、PHP-server、MysqL-server。
yum install httpd PHP PHP-server MysqL-server
开启MysqL、httpd服务 # service MysqLd start 对myuser用户进行授权 # MysqL> grant select,insert,update on *.* to 'myuser'@'172.16.%.%' identified by '123456'; # service MysqLd restart # service httpd start
2.创建虚拟主机
在httpd片段配置文件(/etc/httpd/conf.d/) 下创建虚拟主机virhosts.conf
创建虚拟主机中目录
mkdir -pv /myweb/vhosts/vh1
ip addr add 172.16.12.12/16 dev eth0 label eth0:0
(若要永久生效选择写入配置文件) 将本地论坛、博客及PHPMyAdmin应用程序上传至/myweb/vhosts/vh1目录下 ![](http://i2.51cto.com/images/blog/201805/05/a276a12a5d947ec5e7235901be6747a8.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=) 首先解压Discuz_X3.2_SC_GBK.zip # unzip Discuz_X3.2_SC_GBK.zip # mv Discuz_X3.2_SC_GBK/upload/ bbs/ 重启httpd服务 # service httpd restart 打开浏览器输入172.16.12.12/bbs安装论坛
按照提示进行安装和设置!
安装PHPmyadmin
tar xf PHPMyAdmin-3.5.4-all-languages.tar.gz
# cp -a PHPMyAdmin-3.5.4-all-languages/config.sample.inc.PHP PHPMyAdmin-3.5.4-all-languages/config.PHP # mv PHPMyAdmin-3.5.4-all-languages pma 访问“172.16.12.12/pma”进行安装
安装博客 上传PHPwind_v8.7_GBK.zip文件 解压缩文件 # unzip PHPwind_v8.7_GBK.zip # mv PHPwind_GBK_8.7/upload PHPwind 访问“172.16.12.12/PHPwind”进行安装原文链接:https://www.f2er.com/centos/374379.html