title: Linux 搭建Discuz论坛
Welcome to Fofade's Blog!
这里是Linux 搭建论坛的一些命令记录
命令摘记:
-
下载文件:Discuz
-
安装环境:PHP Apache2 Mariadb(类MySQL)PHP-XML
-
测试环境:浏览器查看tomcat页面是否正常,并简易编写一个PHP页面测试
-
数据库操作:
- 创建用户
$ create user 'name'@'statu' identified by 'psw';
- 创建数据库
$ create database databasename;
- 数据库授权
$ grant all on databasename.* to user@localhost; $ grant all on * to user@localhost identified by 'psw' with grant option;
- 删除用户
$ drop user username;
- 查看数据库
$ show database;
- 查看用户
$ select host,user from mysql.user;
-
解压Discuz:
$ unzip Discuz.zip
- 打包upload文件夹:
$ tar czvf upload.tar.gz *
- 用权限拷贝打包文件进入/var/www/html/目录下:
$ sudo cp upload.tar.gz /var/www/html/
- 解压该文件:
$ sudo tar xzvf upload.tar.gz
- 返回上级目录:
$ cd ../
- 加权:
$ sudo chmod a+w -R html/ # 实际应用中不建议使用该方式加权,此处仅处于方便
- 浏览器访问:
$ 127.0.0.1:80/index.html
- 安装:按提示安装
- 删除文件:最后,删除/var/www/html/install/index.html :
$ sudo rm /var/www/html/install/index.html