搭建一个网站论坛平台

Posted 葡萄架

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了搭建一个网站论坛平台相关的知识,希望对你有一定的参考价值。

修改主机名

Hostname openstack-001

Hostname

Login

修改本地域名解析

Vi /etc/hosts

最后一行添加

192.168.1.56 openstack-001

Clear

Ping openstack-001

Ls /opt/

 

查看

配置文件

 

Vi dvd.repo

列出仓库内容

 

关闭防火墙

Iptables -F

Iptables -X

Iptables -L查看

修改SELINUX

修改SELINUX

修改enforcing改为disabled

# yum install httpd httpd-devel mariadb-server mariadb-devel php php-mysql php-devel -y

# systemctl start {httpd,mariadb}

# systemctl status {httpd,mariadb}

[root@chandao ~]# systemctl start {httpd,mariadb}
[root@chandao ~]#
[root@chandao ~]# systemctl status {httpd,mariadb}
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-07-22 09:20:29 CST; 2min 13s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 31133 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─31133 /usr/sbin/httpd -DFOREGROUND
           ├─31152 /usr/sbin/httpd -DFOREGROUND
           ├─31153 /usr/sbin/httpd -DFOREGROUND
           ├─31154 /usr/sbin/httpd -DFOREGROUND
           ├─31155 /usr/sbin/httpd -DFOREGROUND
           └─31156 /usr/sbin/httpd -DFOREGROUND

Jul 22 09:20:29 chandao systemd[1]: Starting The Apache HTTP Server...
Jul 22 09:20:29 chandao httpd[31133]: AH00558: httpd: Could not reliably determine the server\'s fully qualified domain name, using 192.168.2.228. Set the \'ServerName\' directive globally to suppress this message
Jul 22 09:20:29 chandao systemd[1]: Started The Apache HTTP Server.

● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-07-22 09:20:33 CST; 2min 9s ago
  Process: 31411 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
  Process: 31134 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 31410 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─31410 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─31583 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/va...

Jul 22 09:20:31 chandao mariadb-prepare-db-dir[31134]: MySQL manual for more instructions.
Jul 22 09:20:31 chandao mariadb-prepare-db-dir[31134]: Please report any problems at http://mariadb.org/jira
Jul 22 09:20:31 chandao mariadb-prepare-db-dir[31134]: The latest information about MariaDB is available at http://mariadb.org/.
Jul 22 09:20:31 chandao mariadb-prepare-db-dir[31134]: You can find additional information about the MySQL part at:
Jul 22 09:20:31 chandao mariadb-prepare-db-dir[31134]: http://dev.mysql.com
Jul 22 09:20:31 chandao mariadb-prepare-db-dir[31134]: Consider joining MariaDB\'s strong and vibrant community:
Jul 22 09:20:31 chandao mariadb-prepare-db-dir[31134]: https://mariadb.org/get-involved/
Jul 22 09:20:31 chandao mysqld_safe[31410]: 190722 09:20:31 mysqld_safe Logging to \'/var/log/mariadb/mariadb.log\'.
Jul 22 09:20:31 chandao mysqld_safe[31410]: 190722 09:20:31 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jul 22 09:20:33 chandao systemd[1]: Started MariaDB database server.
[root@chandao ~]#

 

设置MySQL密码

 

登录

 

Exit退出

查看MySQL的端口号

# ss -tnmlp | grep mysql

查看httpd端口

# ss -tnmlp | grep httpd

# mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.bak

http只能传输文体字段,text,视频或者支持远程

查看是否支持以PHP的后缀名

 

 

上传文件

 

安装unzip(有就不用安)

 

解压

查看

cp -rfv

查看确认

进入MySQL

必须以分号结尾

创建数据库

查看

修改设置discuz数据库

刷新一下

Exit退出

再次进入数据库

查看一下数据库

Show databases;

改权限

进入MySQL查看一下

以上是关于搭建一个网站论坛平台的主要内容,如果未能解决你的问题,请参考以下文章

LNMP平台搭建案例:部署论坛,电影院管理系统

LNMP平台搭建案例:部署论坛,电影院管理系统

Linux基于LAMP架构搭建个人论坛网站

Linux中搭建LAMP平台及论坛服务

LAMP 论坛搭建

菜鸟上----路论坛搭建