Manual:Installing MediaWiki on Solaris 11.3

This page covers installing MediaWiki 1.30 (an old, nowadays outdated version) server in a non-global zone (mediawiki) in Solaris 11.3. This document will not cover the installation of Solaris 11.3 and the installation of a zone. In Solaris, most of the applications run separately in Solaris containers or zones.

Zone login edit

# zoneadm list

Login to the non-global zone mediawiki with zlogin:

# zlogin mediawiki

Installation additional software packages edit

In order to be able to install a MediaWiki server you will have to install these 3 packages: apache, mysql and php in the non-global zone mediawiki:

# pkg install apache-24
# pkg install php-56
# pkg install mysql-56

Check if both MySQL and Apache SMF service are disabled:

# svcs svc:/application/database/mysql:version_56
disabled       -             18:42:04         - svc:/application/database/mysql:version_56
# svcs svc:/network/http:apache24
disabled       -             18:29:40         - svc:/network/http:apache24

MySQL root password edit

Before you can use MySQL, you will have to create a password for the root user:

# cd /usr/mysql/5.6/bin
# ./mysqld -u root --password=<fill in your password>
# svcs -av | grep mysql
online         -             18:47:14       870 svc:/application/database/mysql:version_56

Configure Apache server edit

When your mysql SMF service is online, you can start to configure your apache2 webserver. The httpd.conf file is the main configuration file to configure your apache2 webserver. The httpd.conf is located in the /etc/apache2/2.4 directory. In order to fill in the ip address of your MediaWiki non-global zone, insert its IP address after ServerName.

By default, the localhost or will be filled in.

# vi httpd.conf
# If your host doesn't have a registered DNS name, enter its IP address here.

The httpd.conf also contains the web document root directory location. The directory out of which you will serve your documents. Later on, you will have to copy the MediaWiki server files to this location.

By default this DocumentRoot directory is /var/apache2/2.4/htdocs.

DocumentRoot "/var/apache2/2.4/htdocs"
<Directory "/var/apache2/2.4/htdocs">

Enable PHP extensions edit

When your Apache web server httpd.conf file is configured, you can configure PHP and enable the necessary extensions (openssl, mbstring) for PHP and MediaWiki.

# cd /etc/apache2/2.4/samples-conf.d
# cp php5.6.conf /etc/apache2/2.4/conf.d/php5.6.conf

To enable PHP extensions, uncomment the desired lines in the extensions.ini file for and

# cd /etc/php/5.6/conf.d
# vi extensions.ini


If you want to verify if PHP has been successfully configured in the Apache server, you can view a manual.

Download MediaWiki software edit

You can visit the download page here to download MediaWiki. The mediawiki-1.30.0.tar.gz file can then be unpacked and copied into /var/apache2/2.4/htdocs (DocumentRoot Apache server).

In the Solaris 11.3 global zone:

# cp <path download folder>/mediawiki-1.30.0.tar.gz <path mount point mediawiki zone>/rpool/ROOT/var/apache2/2.4/mediawiki-1.30.0.tar.gz

In the Solaris 11.3 non-global zone mediawiki:

# cd /var/apache2/2.4
# mv htdocs htdocs_apache
# gunzip mediawiki-1.30.0.tar.gz
# tar xvf mediawiki-1.30.0.tar
# mv mediawiki-1.30.0 /var/apache2/2.4/htdocs

When the unpacking is done of the MediaWiki media, you can enable the apache SMF service:

# svcadm enable svc:/network/http:apache24
# svcs -av | grep apache
online         -             19:40:58       879 svc:/network/http:apache24

Initial Mediawiki installation edit

Before installing the MediaWiki server via the browser you need to create the data directory in /var/apache2/2.4:

# mkdir /var/apache2/2.4/data
# chgrp webservd data /var/apache2/2.4/data
# chmod g+w /var/apache2/2.4/data

If you now open your browser and fill in the ip address of your non-global zone, you will see the MediaWiki server first page and you can start the installation by clicking set up the wiki:

install screen mediawiki

After the installation a LocalSetting.php file will be created. You will need to download the LocalSetting.php file and copy it to the DocumentRoot of your Apache server. In this case this will be /var/apache2/2.4/htdocs.

After disabling/enabling the apache24 SMF service in your non-global zone mediawiki, you can start using your MediaWiki server:

# svcadm disable apache24
# svcadm enable apache24

JefAdams (talk) 16:23, 12 March 2018 (UTC)