Manual:Running MediaWiki on Slackware Linux
The content of this page has not been verified. Instructions written in this page have not been verified to be correct. If there are any inaccuracies, please drop a note at the support desk. |
It has been suggested that this page or section be merged with Manual:Installing MediaWiki.(Discuss) |
Warning: no promises of security are made in this guide. It was intended to be run on an offline workstation.
Settings
[edit]For this guide, I will make the following assumptions about names, directories, and the like, but you will want to make some of them different:
- name - The wiki needs a name; this example is called vicuna.
- database - It also needs a database, which will also be called vicuna in this example.
- passwords - There are several passwords involved, most importantly the password for the wiki database, and the initial administrator account you'll create when running the configuration page.
- directory - The directory where the wiki will be installed. In this example, it's /var/wiki.
Configuration of Apache
[edit]At a minimum, the webserver must access your wiki on demand. There are better and more complex ways of setting it up, but this will suffice. In /etc/httpd/httpd.conf, in the section:
IfModule mod_alias.c
, add the following line:
Alias /wiki/ /var/wiki
Replace /var/wiki
with the directory you've chosen.
Apache will not be configured to use PHP by default, so you may need to do the following.
- Edit
/etc/httpd/httpd.conf
by uncommenting the line:#Include /etc/httpd/mod_php.conf
- Edit
/etc/httpd/httpd.conf
by adding:index.php
to the lineDirectoryIndex index.html
- Edit
/etc/httpd/mod_php.conf
by adding:.phtml
to the line<FilesMatch \.(php|phtml)$>
- Make sure Apache is set to run at startup:
chmod +x /etc/rc.d/rc.httpd
- Test your httpd.conf syntax:
apachectl -t
- Restart/Start Apache:
/etc/rc.d/rc.httpd restart
.
Configuration of MySQL
[edit]Perform the following commands as root.
- Copy one of the MySQL configuration files in /etc to my.cnf:
cp /etc/my-medium.cnf /etc/my.cnf
- Initialize the MySQL databases (only necessary once per system, but harmless):
su mysql -c mysql_install_db
- Set the Mysql server to start at boot:
chmod +x /etc/rc.d/rc.mysqld
- Set ownership of the files in /var/lib/mysql/:
chown -R mysql:mysql /var/lib/mysql
- Start the MySQL daemon:
/etc/rc.d/rc.mysqld start
- Secure your Installation with the script provided:
mysql_secure_installation
You'll be prompted for a root mysql password. (This and all other mysql user passwords are completely independent from the system passwords so don't confuse them!)
Follow the prompts and choose the most secure options that suit your situation.