系统相关
首页 > 系统相关> > Linux中搭建midiawiki

Linux中搭建midiawiki

作者:互联网

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

  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域控制器

  1. 使用yum安装LAMP环境,关闭防火墙和selinux,便于顺利测试:
    systemctl stop firewalld 关闭防火墙
    setenforce 0 关闭Linux防火墙
    [外链图片转存失败(img-YG0Eu86y-1566214103599)(http://www.icode9.com/i/li/?n=1&i=images/blog/201908/18/14b9048e07c2d26006cbbf97e91c2d49.png?,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)]
    配置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
[外链图片转存失败(img-IlHeqquB-1566214103601)(http://www.icode9.com/i/li/?n=1&i=images/blog/201908/18/81f8a36684bc7cb6c3f172b00ee4b206.png?,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)][外链图片转存失败(img-eIFFFOdK-1566214103606)(http://www.icode9.com/i/li/?n=1&i=images/blog/201908/18/49592960d6eb0f9e77add4ee9a50b097.png?,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)]
yum clean all
yum makecache all
[外链图片转存失败(img-OxYGOoSD-1566214103607)(http://www.icode9.com/i/li/?n=1&i=images/blog/201908/18/76d2890dd96563c6716bbe031ebc12f4.png?,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)]

安装httpd和mariadb数据库:
yum install httpd mariadb-server mariadb
编辑vim /etc/httpd/conf/httpd.conf
[外链图片转存失败(img-W4mjmpbQ-1566214103608)(http://www.icode9.com/i/li/?n=1&i=images/blog/201908/18/24348f6a0368b1c89e1d06cff3a81ea5.png?,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)]
DocumentRoot “/var/www”
<Directory “/var/www”>
<Directory “/var/www”>

启动httpd服务和mariadb服务
systemctl enable mariadb
systemctl enable httpd
systemctl start httpd
systemctl start mariadb[外链图片转存失败(img-XA3bGw2D-1566214103608)(http://www.icode9.com/i/li/?n=1&i=images/blog/201908/18/b45863c789c40ffea92b020fbbbdf6c5.png?,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)]
进入数据库创建数据库: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


标签:10,mediawiki,midiawiki,yum,php71w,https,Linux,MariaDB,搭建
来源: https://blog.csdn.net/weixin_45545517/article/details/99753212