docker搭建mediawiki

一、安装docker(centos7.5)

yum –y update

yum install -y yum-utils device-mapper-persistent-data lvm2

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum makecache fast

yum -y install docker-ce

systemctl start docker && systemctl enable docker

配置加速器

二、拉镜像

docker pull mediawiki:1.31.1

docker pull mysql:5.7

docker run -itd -p 3306:3306 --name wiki-mysql -e MYSQL_ROOT_PASSWORD=123456 --restart=always --restart=on-failure:1 --oom-score-adj -1000 --privileged=true --log-opt max-size=10m --log-opt max-file=1 mysql:5.7

docker run -itd --name mywiki -p 8080:80 --privileged=true --restart=always --link wiki-mysql:mysql mediawiki:1.31.1

mysql> create database wikidb;

mysql> create user 'wikiuser'@'192.168.1.%' identified by '123456';

mysql> grant all privileges on wikidb.* to 'wikiuser'@'192.168.1.%' with grant option;

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)


访问页面进行安装ip:8080

选择数据库引擎:show variables like '%storage_engine%';

帮助链接:

http://docs.xiz.im/697076

https://hub.docker.com/r/ubcctlt/mediawiki

https://hub.docker.com/_/mediawiki

https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki/zh

推荐阅读更多精彩内容