How to install mediawiki on centos 6

How to install mediawiki on centos 6

Links to below you maybe likes:
How to install php7 on centos 6
How to install and configure redmine on centos 6
How to owncloud 9 install ssl certificate centos 7
How To Install the BIND DNS Server on CentOS 6
KeepAlived IP Failover on CentOS & Red Hat

How to install mediawiki on centos 6
To require

  • nginx
  • php
  • MySQL

Step 1: To update and install epel repo, ntpd
#yum update -y
#yum install -y epel-release
#yum install -y ntp
#chkconfig ntpd on
#service ntpd start

Step 2: To install the dependencies

#yum install gd sendmail gcc pcre yum-utils wget

Step 3: To install php7 for nginx remi centos 6

Step 4: To install ImageMagick

#yum install php-mbstring php-fpm php-devel php-mysql php-pear ImageMagick ImageMagick-devel --enablerepo=remi-php70
#pecl install imagick
#echo "" > /etc/php.d/
Step 5: To enable module php-mbstring for nginx

#find / -name
The result

#vim /etc/php.ini
The result
; Dynamic Extensions ;
; If you wish to have an extension loaded automatically, use the following
; syntax:
mbstring.language = all
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = UTF-8
mbstring.substitute_character = none
mbstring.func_overload = 0
mbstring.strict_detection = Off

Step 6: To install and create account in mysql

#yum install mysql-server
mysql -u root -p
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'password';
Step 7: To download mediawiki
#cd /usr/share/nginx
#wget -qO- | tar xvz

Step 8: To install and configure nginx for mediawiki

#yum install nginx 

To configure nginx for mediawiki

server {
    listen 8080;
    root /usr/share/nginx/mediawiki;
    index index.php index.html index.htm;
    autoindex off;
    client_max_body_size 5m;
    client_body_timeout 60;
    location / {
        try_files $uri $uri/ =404;
    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    location ~ \.php$ {
        root /usr/share/nginx/mediawiki;
        try_files $uri =404;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include /etc/nginx/fastcgi_params;
    location ^~ /maintenance/ {
        return 403;
        location /mw-config {
                return 403;
    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        try_files $uri /index.php;
        expires max;
        log_not_found off;
  location = /_.gif {
        expires max;
    location ^~ /cache/ {
        deny all;
To restart services and auto startup the system.
#service nginx start
#chkconfig nginx on
#service mysql start
#chkconfig mysql on
#service php-fpm start

To iptables firewall allow port 80 and 443 on server mediawiki.
To type http://ip-address on brower
The after install the done, then you download  LocalSettings.php file to copy to  /mediawiki folder.

In some error during install, the solved problem:
No package imagemagick available.
  * Maybe you meant: ImageMagick
No package tex available.
No package scribunto available
LocalSettings.php not found.


Popular posts from this blog

zimbra some services are not running [Solve problem]

Bash script list all IP addresses connected to Server

How to install php7 on centos 6