使用lamp搭建Discuz论坛
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-04-08
@ IN SOA ns.wuli.com. root.wuli.com. ( 20090318 28800 14400 3600000 86400) @ IN NS ns.wuli.com. ns IN A 172.16.4.5 www IN CNAME ns.wuli.com. bbs IN CNAME ns.wuli.com. 编辑/etc/resolv.conf中添加如下: [root@localhost ~]# vim /etc/resolv.conf nameserver 172.16.4.5 重启服务: [root@localhost ~]# service named restart Stopping named: [ OK ] Starting named: [ OK ] 测试一下: [root@localhost ~]# nslookup > www.wuli.com Server: 172.16.4.5 Address: 172.16.4.5#53 www.wuli.com canonical name = ns.wuli.com. Name: ns.wuli.com Address: 172.16.4.5 > bbs.wuli.com Server: 172.16.4.5 Address: 172.16.4.5#53 bbs.wuli.com canonical name = ns.wuli.com. Name: ns.wuli.com Address: 172.16.4.5 开启Apache服务: [root@localhost ~]# service httpd start Starting httpd: [ OK ] 编辑如下修改其中的四项: [root@localhost ~]# vim /etc/httpd/conf/httpd.conf KeepAlive On DefaultType application/octet-stream AddDefaultCharset zh-CN Options FollowSymLinks 去掉Indexes 重启服务: [root@localhost ~]# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] 编辑基于名称的虚拟主机的配置: [root@localhost ~]# vim /etc/httpd/conf.d/wuli.conf NameVirtualHost 172.16.4.5 <VirtualHost 172.16.4.5> ServerName www.wuli.com DocumentRoot /var/www/html </VirtualHost> <VirtualHost 172.16.4.5> ServerName bbs.wuli.com DocumentRoot /var/www/html/bbs </VirtualHost> 在/var/www/html/下创建一个bbs的目录: [root@localhost ~]# mkdir /var/www/html/bbs 开启数据库的服务: [root@localhost ~]# service mysqld start 给数据库管理员设置密码: [root@localhost ~]# mysqladmin -u root password 123456 让数据库用户登录: [root@localhost ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 3 to server version: 5.0.22 Type ''help;'' or ''h'' for help. Type ''c'' to clear the buffer. mysql> show databases; -------------------- | Database | -------------------- | information_schema | | mysql | | test | -------------------- 3 rows in set (0.00 sec) 创建新的数据库: mysql> create database bbsdb; Query OK, 1 row affected (0.00 sec) mysql> grant all on bbsdb.* to bbsuser@localhost identified by "123456"; Query OK, 0 rows affected (0.00 sec) 重启数据库服务: [root@localhost ~]# service mysqld restart Stopping MySQL: [ OK ] Starting MySQL: [ OK ] 将Discuz!_6.0.0_SC_GBK.zip 导入到root家目录 |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于使用lamp搭建Discuz论坛的所有评论