Help:Installation

From lensowiki
(Redirected from Help:Installing)
Jump to: navigation, search

 

See also : Newcomers guide to installing on Windows or if you prefer IIS 6 try Installing MediaWiki on Windows Server 2003 SP1 or if you want step-by-step instruction try streamlined Windows Install Guide

MediaWiki can be difficult to install for the average computer user with little experience with server-based software. Most users who wish to use wiki software may benefit more from using a free wiki host (see a list of wiki hosts on Wikibooks). This page guides you through the process of installation.

Preparation

Minimum system requirements

The recommended minimum settings is 256MB of RAM for a single-computer website, although this will not suffice for a busy public site. Some users have reported running MediaWiki on computers as low as 48MB of RAM.

Prerequisites

Before you can install MediaWiki, there are four prerequisite components you must install. When you install these, remember to read the associated documentation. If your website is hosted for you, contact the server administrators or hosting company to ensure these are installed.

  1. An Apache web server, available at the official download page.
  2. A recent version of PHP, the programming language in which MediaWiki is written. This is available from the official download page.
    • Some Linux servers may also require the equivalent MySQL package and PHP session management package; see the documentation for the operating system.
    • If your Apache server has the Hardened PHP patch, you may need to edit several variables in your /etc/php.ini file if you wish to have Wiki pages with large amounts of content. In particular, consider the settings for varfilter.max_value_length, hphp.post.max_value_length, and hphp.request.max_value_length. The default settings may limit your pages to less than 10k or 64k in size.
  3. A MySQL database server, which will be used to store all the text and data. This is available from the official download page.
    • Although there is experimental support for some other databases, this is preliminary and undocumented. MySQL is recommended over other databases.
  4. MediaWiki itself, which is available from the official download page. Development versions are available from the Sourceforge.net project page.

Uploading to the server

Download and uncompress

Download MediaWiki to your local computer and uncompress the files, so that you can see the files and folders. This is usually done with software such as WinZip or 7-Zip on Windows. On Linux, you can untar the file using this command:

tar -xvzf mediawiki-*.tar.gz

Upload

Upload the files to a public directory (usually public_html/wiki) using an FTP client such as FileZilla. If you are using a Unix server and have access to the httpd.conf, make a Symbolic link.

Change the permission settings for the "config" subdirectory so that it is writable by the webserver. If you are using FileZilla, right-click on the directory, select "attributes...", and check "Write" under "Owner". If it prompts you for a number instead or you are using a command-line interface, use 755 (Use 777 on Linux). Alternately, you may be able to change permissions using a "control panel" provided by your web host.

Depending on the server configuration, in some cases you have to check all boxes (777) in Filezilla, to be able to run the install-script of Mediawiki.

Troubleshooting

  • Case: If you are using a different FTP client than FileZilla, be sure to configure the client to not force uppercase or lowercase filenames on the webserver. MediaWiki filenames are case-sensitive.
  • Incomplete uploads: The pack includes a lot of files, spread over dozens of directories. Be careful when uploading. If the transfer is interrupted, you might have missing or incomplete files. You may have to retry your upload several times, especially if you have an unreliable connection.
  • Internal error: If your webserver produces a "500 Internal Error" at the beginning of the install process, you may need to change the permissions on the config folder to 755.
  • SELinux: Linux distributions which supports SELinux ('Security Extensions') are becoming more widespread. On such systems, PHP scripts will still be unable to write to the config directory, after you have set the normal file permissions. You will also need to use the 'chcon' command to change the SELinux file type. Gallery install documentation describes this.
  • If you are running the Mediawiki software on a free site that requires banners or prefix advertising, this may cause MediaWiki not to work, and appear to only generate empty pages beyond the banner advertising. A fix for this will need to be done in the future. In the interim the only option is to find a paid hosting site. This may be considered a bug, and is being reported.

Installation

Create a MySQL database

The MySQL database server stores the text and data of your wiki.

  • If you know the root password for your database, (the password for the user called "root") the MediaWiki setup script can automatically create a database and an account to access it.
  • If you don't know the root password for your MySQL server, for example if you don't have the password because you are using a shared host, you need to create a MySQL database and a user before installing MediaWiki. You can do this using various control panels such as PhpMyAdmin, which are often available from shared hosts, or you may be able to use ssh to login to your host and type the commands into a MySQL prompt. See the corresponding documentation. Alternatively, contact your host provider to have them create an account for you.

1. Download and install MySQL 5.0. It should put itself in /usr/local/mysql
2. Check and see if the database server is running ("/usr/local/mysql/bin/mysqladmin status"), If not, sudo /usr/local/mysql/bin/safe_mysqld &.
(For Fedora Core 5, use /usr/bin/mysqld_safe)
3. Set a password for the "root" account on your database server. /usr/local/mysql/bin/mysqladmin -u root password yourpassword
4. Set up a user in MySQL for your Wiki--do this in your terminal: /usr/local/mysql/bin/mysql -u root -p mysql
5. This starts up the MySQL command line client. Now, do this in the client:

create database wiki;
grant create, select, insert, update, delete, lock tables on wiki.* to wiki@localhost identified by 'password';
\q


Run the installation script

Use your browser to visit the wiki directory on your webserver to run the installation script. If you installed into public_html/wiki, this will probably be something similar to http://www.yourdomain.com/wiki. Depending on how you uploaded the files, you may need to visit http://www.yourdomain.com/wiki/config instead. Follow the installation instructions on the installation script page. Refer to the following table if you're uncertain what to enter.

Field Explanation
Database name The name of the MySQL database you created (see #Create a MySQL database)
Note: If you run mysql using a different socket file (e.g. mysql on localhost, using --socket=/tmp/mysocketfile), set the database name to:"localhost:/tmp/mysocketfile".
Database username The username used for accessing your wiki MySQL database.
Database password The user password for accessing your wiki MySQL database.
Database table prefix An optional prefix to prepend to the name of every table that will be created within your wiki database. If you plan to have several wikis, you might want use the prefix "w1" so that all the tables associated with your first wiki will have "w1_" prepended. This allows you to install multiple wikis using the same databases by making the name unique. For example the generic name "archive" becomes "w1_archive", so that it is possible to add another database with the same table names.
Root password The root database password, if you have it. If you don't have this password, leave it as it is. If you have the password, you can skip the above stages of creating the database since MediaWiki will be able to do this for itself.

Click the "Install!" button.

If you are using a hosting service, note that the database name and database username may have an extra prefix (normally the userid given by your hosting provider). For example, if you have created a database named db01 with username u01 and your userid is ocom (given by your hosting provider), you should enter the database name and database username as ocom_db01 and ocom_u01 respectively.

Configuration

Local settings

After setup, a file called LocalSettings.php is created in the "config" directory. This file contains all the information needed by MediaWiki to run. If it does not find the file in the main folder, it will launch the installation script to create a new one in the "config" directory.

  1. Move this file to the main wiki directory (if you installed MediaWiki to public_html/wiki, move it there). Do not leave a copy in the config folder, as this poses a severe security risk.
  2. Delete the entire "config" directory.

Advanced configuration

For help with more advanced technical configuration, see Help:Configuration and Help:Administration.

For a brief overview that addresses the empty help pages and text and layout modification, see Help:Installation-Software_Configuration.

Uninstallation

Removing MediaWiki entirely can be accomplished in two steps: removing the directory where MediaWiki was installed, and dropping the MediaWiki database from MySQL.

For example, if you installed MediaWiki to /var/www/mediawiki-xyz, you might do

rm -r /var/www/mediawiki-xyz

Then, using the mysql utility to interactively connect to MySQL as a user with adequate permissions, you would issue the following command at the mysql> prompt:

DROP DATABASE wikidb;

(If you needed to retain some tables, you could also drop just some of the tables individually. See this MediaWiki-L message for details.)

See also

External Links

  • Lopez, Daniel Sams Teach Yourself Apache 2 in 24 Hours. Excellent easy to use book, the 3rd chapter, which explains how to install Apache, can be viewed on Amazon.com here (must register with Amazon first to view pages)
  • An outdated explanation of how to install, configure, and get Apache 1.3, MySQL 3, PHP 4 running under Windows XP in less than 30 minutes. (This document is significantly out of date, having been updated October 5, 2003, but is otherwise well written!) For example, as of January 1, 2006:
    1. It references Apache 1.3, Apache 2.0 is current. The syntax it suggests for httpd.conf prevents Apache from restarting.
    2. It references PHP 4. PHP 5.1 is current.
    3. It references MySQL 3.23. MySQL 5.x is current.
  • Life Hacker has instructions for installing MediaWiki on Windows XP.
  • A compact step-by-step guide to configure WAMP + MediaWiki is also available.

For Windows XP, I think you may want to point users to a site similar to XAMPP for Windows. This appears to cover the basic requirements of Apache, PHP and MySQL.

http://www.fayeunrauphotography.com/ kjøp cialis 520853 http://www.primetermites.com/ ジェネリックバイアグラ 5575 http://www.witch-ring.com/Generic-Viagra/ Comprando viagra sfnjy http://www.flweaver.com/ online Cialis kmt http://www.blogdemoteros.com/ tadalafil 5271