centos7搭建mediawiki

安装环境


安装准备的软件及安装环境:

1. 系统版本CentOS Linux release 7.5.1804 (Core)

2.软件版本:
(1)httpd-2.4.6-80.el7.centos.1.x86_64 ;

 (2)Server version: 10.2.19-MariaDB MariaDB Server

 (3)PHP 7.1.23

 (4)Windows-server-2008R2 AD域控制器

3. 使用yum安装LAMP环境,关闭防火墙和selinux,便于顺利测试:

systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld

配置MariaDB yum源安装Http和MariaDB:

vim /etc/yum.repos.d/Mariadb.repo(空文件里输入)

[mariadb]
name = MariaDB
baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.2/centos7-amd64
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1

yum clean all
yum makecache all

安装httpd和mariadb数据库:

yum install httpd mariadb-server mariadb

vim /etc/httpd/conf/httpd.conf

DocumentRoot "/var/www"

启动httpd服务和mariadb服务

systemctl enable mariadb
systemctl enable httpd
systemctl start httpd
systemctl start mariadb

进入数据库创建数据库:mysql -u root -p

MariaDB [(none)]> CREATE USER 'wiki'@'localhost' IDENTIFIED BY '123';

MariaDB [(none)]> CREATE DATABASE wikidatabase;

MariaDB [(none)]> GRANT ALL PRIVILEGES ON wikidatabase.* TO 'wiki'@'localhost';

MariaDB [(none)]> FLUSH PRIVILEGES;

MariaDB [(none)]> show databases;

MariaDB [(none)]> SHOW GRANTS FOR 'wiki'@'localhost';

安装PHP7.0

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install -y php71w-fpm php71w-opcache php71w-cli php71w-gd php71w-imap php71w-mysqlnd php71w-mbstring php71w-mcrypt php71w-pdo php71w-pecl-apcu php71w-pecl-mongodb php71w-pecl-redis php71w-pgsql php71w-xml php71w-xmlrpc php71w-devel mod_php71w php71w-ldap

配置mediawiki

cd /home
wget http://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.0.tar.gz

cd /var/www
tar -zxf /home/mediawiki-1.31.0.tar.gz
ln -s mediawiki-1.31.0/ mediawiki
chown -R apache:apache /var/www/mediawiki-1.31.0
systemctl restart httpd

安装mediawiki


打开浏览器输入http://ip地址/mediawiki/index.php 开始初始化设置

一.选择语言版本字库版本

二.选择数据库类型,这里选择MySQL

三.设置数据库名称和资料库名称

        四.选择数据库引擎为InnoDB

 五.设置全局名称和添加管理员

六.开始安装mediawiki

你可能感兴趣的:(centos7搭建mediawiki)