1、关闭防火墙和selinux,便于顺利测试
systemctl stop firewalld
setenforce 0
2、使用yum安装LAMP环境
安装httpd和mariadb数据库:
yum install httpd mariadb-server mariadb
编辑配置文件
vim /etc/httpd/conf/httpd.conf
DocumentRoot “/var/www”
<Directory “/var/www”>
<Directory “/var/www”>
如下图
3、启动httpd服务和mariadb服务永久生效
systemctl enable mariadb
systemctl enable httpd
systemctl start httpd
systemctl start mariadb
4、 .进入数据库创建数据库:mysql -u root –p
直接回车进入
MariaDB [(none)]> CREATE USER wiki
@‘’localhost‘IDENTIFIED BY ‘123’;
MariaDB [(none)]> CREATE DATABASE wikidatabase;
MariaDB [(none)]> GRANT ALL PRI