一.关闭防火墙以及SElinux
systemctl stop firewalld.service
setenforce 0
二.使用yum安装httpd和mysql数据库:
yum install httpd mariadb-server mariadb
vim /etc/httpd/conf/httpd.conf
修改配置项如下:
DocumentRoot "/var/www"
<Directory "/var/www">
<Directory "/var/www">
启动httpd服务和mariadb服务:
systemctl enable mariadb
systemctl enable httpd
systemctl start httpd
systemctl start mariadb
进入数据库创建数据库:
mysql -u root -p
CREATE USER `medaiawiki`@`%` IDENTIFIED BY '123';
CREATE DATABASE medaiawikidb;
GRANT ALL PRIVILEGES ON wikidb.* TO `medaiawiki`@`%`;
FLUSH PRIVILEGES;
show databases;
SHOW GRANTS FOR `medaiawiki`@`%`;
5,安装php7以及扩展
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php70w php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring php70w-pecl-redis php70w-pecl-memcached php70w-deve
配置mediawiki:
cd
wget http://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.0.tar.gz
tar xvf /home/mediawiki-1.31.0.tar.gz
mv mediawiki-1.31.0/ /var/www
cd /var/www
ln -s mediawiki-1.31.0/ mediawiki
chown -R apache:apache /var/www/mediawiki-1.31.0
systemctl restart httpd
二、开始安装MediaMewiki
打开浏览器http://IP/mediawiki/index.php ,开始初始化配置
1.选择设置
2.语言设置:
3.:选择数据库类型以及配置
4.设置数据库名称,与你在数据库添加一致:
5.安装
.