部署LAMP环境搭建一个网站论坛平台

# 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的后缀名



上传文件


解压

查看


cp -rfv

查看确认

进入MySQL

必须以分号结尾

创建数据库

查看

修改设置discuz数据库

刷新一下

Exit退出
再次进入数据库
查看一下数据库
Show databases;


改权限

进入MySQL查看一下
浙公网安备 33010602011771号