Installing MediaWiki on SLES 9
From CoolSolutionsWiki
This page provides details on how to install MediaWiki on SUSE Linux Enterprise Server 9
This page is part of the MediaWiki knowledge set.
Contents |
Set up a Base System
Before you continue, you must need to have a system with SUSE Linux Enterprise Server 9 installed, including the latest patches, and a network card configured with an IP address.
This system will serve as your base platform for the rest of the instructions in this document.
Configure the Foundation Applications for MediaWiki
MediaWiki is a LAMP application. That means it requires:
- Apache2
- MySQL
- PHP4
The SUSE Linux setup tool "YaST" is probably the best tool for installing these.
Steps to Configure LAMP for MediaWiki
Note: The following steps apply to SUSE Linux Enterprise Server 9 and earlier. In newer versions of SUSE Linux and SUSE Linux Enterprise Server, YaST may have a MediaWiki package available that does the whole install and configuration of MediaWiki.
Install LAMP Packages
SUSE Linux makes it easy to install Apache, MySQL and PHP. Follow these steps to do so:
- Start YaST
- In YaST's Software optionns, start the Software Management module.
- In the Software Management module, use the Search field to add
- Apache2
- Apache2-mod_auth_mysql
- Apache2-example-pages
- This package is optional, but helps you test and troubleshoot by creating a demo Apache page
- Apache2-mod_php4
- Apache2-prefork
- mysql
- mysql-client
- mysql-shared
- php4
- php4-exif
- php4-gd
- This is necessary for working with thumbnails
- php4-gettext
- php4-ldap
- php4-mysql
- php4-session
- Once you have selected all of the packages above, click Accept to commplete the install.
- YaST will automatically determine several additional packages that are needed to support the packages you chose to install.
Configure MySQL
Create the MySQL Install Database
- Open a Terminal
- Become the root user by using
# su
and entering the root user password - Use the following command to start configuring MySQL
# mysql_install_db --user=mysql
- Per the instructions, be sure to set a password for the root user on your database, by running the following commands. Note the password, as it will be needed during the wiki installation later.
# /usr/bin/mysqladmin -u root password 'new-password'
# /usr/bin/mysqladmin -u root -h hostname password 'new-password'
- Per the instructions, be sure to set a password for the root user on your database, by running the following commands. Note the password, as it will be needed during the wiki installation later.
- Close the Terminal window
Create "mysql" Group
- Start Yast
- In YaST, select Security and Users on the left-side navigation
- In Security and Users, start the Edit and create group module
- In the Edit and create group module, create a group named mysql
- Add the following as members of the new mysql group:
- daemon
- mysql
- root
- Click Accept to save the group and close the creation dialog for the new group
- Click Finish to finalize all changes to your system's groups
Grant Required File System Permissions
- Open a Terminal
- Become the root user by using
# su
and entering the root user password - Use the following command to set the group owner of /var/lib/mysql to the new mysql group
chown -Rv mysql /var/lib/mysql
- Use the following command to grant file system rights to the new mysql group
chmod -Rv 774 /var/lib/mysql
- Close the Terminal window
Increase Available Memory for PHP
- Become root and open your favorite editor
- Edit /etc/php.ini
- Find memory_limit = 8M in the file and change it to memory_limit = 20M
Note: This step is normally automated by the MediaWiki configuration script. However, it is helpful to have some familiarity with the php.ini file
Start the Apache and MySQL Daemons
Now you need to start the Apache2 daemon, and set it to automatically run every time it the server starts.
- Start Yast
- Select System in the left hand panel.
- Start the Run Level module in the right-hand panel
- Note: Later versions of YaST call this "System Services"
- Click the Expert Mode radio button
- Select the apache2 Service
- Click the Set/Reset Button and select Enable This Service
- Click the Start/Start/Refresh Button and select Start Now
- Select the mysql Service
- Click the Set/Reset Button and select Enable This Service
- Click the Start/Start/Refresh Button and select Start Now
Installing MediaWiki
Note: Some versions of SUSE Linux include MediaWiki as an optional component that can be installed from YaST.
- Download the latest version of MediaWiki from SourceForge.net
- You need MediaWiki 1.51 or newer to use Novell eDirectory for authentication
- Note: Starting with MediaWiki 1.7, php5 is required. The release notes suggest sticking with 1.6.x for php4. --Fowlerdm 10:46, 18 September 2006 (MDT)
- Open a Terminal
- Become the root user by using
# su
and entering the root user password - Extract tar.gz file by running
# tar -xvzf {path to downloaded MediaWiki file}/mediawiki-*tar.gz -C /srv/www/htdocs- Tar will expand the contents of this compressed file into a folder called mediawiki-1.5.6 (or whatever the version number is)
- Rename the extracted directory to "wiki"
mv /srv/www/htdocs/mediawiki-1.5.* /srv/www/htdocs/wiki
- Change permissions on the wiki folder
chmod a+w /srv/www/htdocs/wiki/config
- This allows the MediaWiki application to create and update its configuration files.
- Close the Terminal window
Configure the Wiki
- Open a a browser to http://127.0.0.1/wiki/config
- The MediaWiki configuration tool will open and check the environment
Checking environment... PHP 4.3.4: ok PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title) Have XML / Latin1-UTF-8 conversion support. PHP's memory_limit is 8M. If this is too low, installation may fail! Attempting to raise limit to 20M... ok. No zlib support. Neither Turck MMCache nor eAccelerator are installed, can't use object caching functions Found GNU diff3: /usr/bin/diff3. Couldn't find GD library or ImageMagick; image thumbnailing disabled. Installation directory: /srv/www/htdocs/wiki Script URI path: /wiki
- Notice the "image thumbnailing disabled" error. You can fix this by adding either the GD Libraries or ImageMagick via Yast.
Parameters Required by MediaWiki
The MediaWiki setup needs the following information:
- Site Name
- Note: Cannot have special charactors or punctuation
- Sysop's account name and password
- Database Configuration
- Database name
- DB usersname
- DB password
- Superuser account (MySQL superuser)
- Superuser password (MySQL superuser password)
Example
- Site Name: MyKillerWiki
- Sysop: Admin-Dude
- Password: N0b0dyL1k3sM3
- Database name: MyWikiDB
- DB usersname: WikiUser
- DB password: LetMeIn
- Superuser account: root'
- Superuser password: 'MySQLROOT_P4ssw0rd'
Note: Some users have reported the following error when trying to perform the installation with the SQL Server Host set to localhost:
- Attempting to connect to database server as root...failed with error [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13).
If this occurs, try setting the SQL Server Host' to 127.0.0.1 instead.
ERIN: WE NEED TO NOTE WHAT BUTTON TO CLICK TO GIVE THIS SECTION A SENSE OF COMPLETION.
Copy LocalSettings.php
Copy the LocalSettings.php file from /srv/www/htdocs/wiki/config to /srv/www/htdocs/wiki using this commandcp /srv/www/htdocs/wiki/config/LocalSettings.php /srv/www/htdocs/wiki
Use Your Wiki
- On the server:
- Open a browser to http://127.0.0.1/wiki
- From any machine:
- Open a browser to http://<machine's IP or DNS address>/wiki
See Also
Setting Up Apache/MySQL/PHPon SUSE Linux
- Installing Apache, PHP, and MySQL on SUSE Linux Professional provides step-by-step instructions on how to install and configure Apache PHP and MySQL.
- If you choose to follow this document, be sure to install all of the packages that are listed below.
- Note: you do not need to install PHPmyAdmin.
- Running MediaWiki on SuSE Linux 9.3 is Another relevant document that may help you get started.
