mysql实现bbs论坛_BBS论坛的搭建

8d3dbd924b36a7114552b5b49c698eb0.png

BBS论坛的搭建准备工作:

Linux , Discuz_X2_SC_UTF8.zip(提供下载),SecureCRT(可用可不用)

行动开始:

将redhat上含有Package的disc挂载到/mnt下

mount /dev/sr0 /mnt

强制删除本身带有的rhel-source.repo

rm -rf  /etc/yum.repos.d/rhel-source.repo

cd /etc/yum.repos.d

在 /etc/yum.repos.d下新建文件

touch source.repo

vi source.repo

进入编辑界面

输入:

[base]

name=base

baseurl=file:///mnt

enabled=1

gpgcheck=0

存盘退出

然后查看vsftpd是否安装

/etc/init.d/vsftpd restart

如果未安装

yum install vsftpd

然后重启vsftpd

/etc/init.d/vsftpd restart

进入ftp

cd /var/ftp/

关闭防火墙

方法1:

/etc/init.d/iptables stop

方法2:

输入setup,进入图形化界面,手动关闭防火墙。

采用yum的方式的安装,yum的配置成本地源。

yum install mysql-server httpd php php-mysql

[root@xian1 html]# /etc/init.d/mysqld start    启动Mysql数据库

[root@xian1 html]# mysqladmin -u root password 123456      给mysql数据库添加一个密码。

[root@xian1 html]# mysql -uroot -p123456      进入数据库

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 3

Server version: 5.1.47 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;      查看所有数据库,注意语句要以;号结尾。

+--------------------+

| Database           |

+--------------------+

| information_schema |

| mysql              |

| test               |

+--------------------+

3 rows in set (0.00 sec)

mysql> create database base;      创建一个新的数据库,论坛创建的数据库参考规定的。

Query OK, 1 row affected (0.00 sec)

mysql> show databases;     再次查看数据库,已经显示出刚才新建的数据库。

+--------------------+

| Database           |

+--------------------+

| information_schema |

| mysql              |

| test               |

| ultrax              |

+--------------------+

4 rows in set (0.00 sec)

mysql> quit     退出

Bye

接下来启动apache

[root@xian1 html]# /etc/init.d/httpd start      如果启动成功,那么浏览器打开输入http://IP

就可以看到redhat的页面,我这里写的IP就是你的服务器的IP地址。

注意关闭防火墙 /etc/init.d/iptables stop

apache 的默认网站存放的地址是/var/www/html/ 目录

rz上传Discuz_X2_SC_UTF8.zip压缩文件

将Discuz_X2_SC_UTF8.zip放在该/var/www/html下

然后解包 unzip Discuz_X2_SC_GBK.zip

然后浏览器里面输入http://IP/upload/install/

如果打不开

1、可能是开了代理

2、尝试下输入reboot重启虚拟机(注意重启后,不要忘了输入/etc/init.d/mysqld start 和 /etc/init.d/httpd start)

3、注意自己的数据库名一定要和在/etc/yum.repos.d/source.repo中输入的一致

根据提示来安装软件包。

跳转提示文件权限有问题,那么修改。

cedd8ed11097f1df4a718de8bfdf27f9.png

[root@xian1 html]# cd /var/www/html/upload/

[root@xian1 upload]# chmod 777/var/www/html/* -R -R意思就是递归

再次刷新后,BBS论坛就此搭建成功:

2f3a8608bb499b0cc28f0e46bf2db847.png

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值