Install and configure mediawiki in Gentoo Linux

Source: Internet
Author: User
Tags imagemagick spl mediawiki

 

This article describes how to build a mediawiki site in Gentoo Linux. mediawiki is a wiki encyclopedia website similar to wikipedia.org.

Each step is a real operation record. In theory, Gentoo Linux can be installed by following this step. If it is original, please indicate the source.

The configurations of other Linux versions are the same.

All the following commands starting with # Are the commands to be executed



1. Environment Description

# Uname-
Linux df53l 2.6.28-gentoo-r5 #1 SMP Tue Jun 16 18:58:24 CST 2009 i686 Intel (r) Pentium (r) Dual CPU e2160 @ 1.80 GHz genuineintel GNU/Linux

# Emerge-PV Apache

[Ebuild R] www-servers/Apache-2.2.11 use = "SSL
-Debug-doc-LDAP (-SELinux) -SNI-static-suexec-threads "Authorization =" actions alias auth_basic authentication n_dbm authn_default authn_file authentication using Autoindex cache Dav authentication dav_lock deflate dir disk_cache env expires ext_filter file_cache Filter include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir UserTrack vhost_alias

 

# Emerge-VP PHP

[Ebuild R] Dev-lang/php-5.2.9-r2 use = "apache2 berkdb Bzip2 cgi cli crypt force-CGI-redirect GD gdbm iconv MySQL ncurses nls pcre Readline reflection session spl ssl suhosin Unicode XML zlib
......

 

# Emerge-VP mediawiki

[Ebuild R] www-apps/mediawiki-1.14.0 use = "ImageMagick MySQL ocamlopt vhosts
-Math-Postgres "0 KB

 

# Emerge-VP MySQL

[Ebuild R] Dev-DB/mysql-5.0.70-r1 use = "berkdb Perl SSL
-Big-tables-cluster-debugging-embedded-extraengine-Latin1-max-idx-128-minimal (-SELinux)-static "0 KB

 

2. Install software

# Echo "Dev-lang/PHP apache2 PCRE session spl xml MySQL and either GD suhosin CGI for CE-CGI-redirect">/etc/portage/package. Use


# Echo "www-apps/mediawiki ImageMagick MySQL vhosts">/etc/portage/package. Use

# Echo "www-servers/Apache SSL">
/Etc/portage/package. Use

# Echo "Dev-DB/MySQL berkdb Perl SSL">
 
/Etc/portage/package. Use

# Emerge-PV www-servers/Apache Dev-lang/PHP www-apps/mediawiki Dev-DB/MySQL

 

3. Configure Apache



# Webapp-config-I-H mediawiki 1.14.0

Check/var/www/mediawiki
Whether the directory is generated.

 

# Vim/etc/apache2/httpd. conf

Add the following content

# For mediawiki
Listen 8867.
<Directory/var/www/mediawiki>
Php5-cgi. php addhandler
Options + indexes + execcgi + followsymlinks
Directoryindex index. php
AllowOverride limit
</Directory>

 

# Vim/etc/apache2/vhosts. d/mediawiki-vhost.conf

Add the following content

Namevirtualhost*: 8867
<Virtualhost *: 8867>
Servername "myserver.mydomain.com"
DocumentRoot "/var/www/mediawiki/htdocs"
<Directory "/var/www/mediawiki/htdocs">
Php5-cgi. php addhandler
Directoryindex index. php
AllowOverride all
Order allow, deny
Allow from all
</Directory>
</Virtualhost>

 

# Vim/etc/apache2/modules. d/php5-cgi.conf

Add the following content

# Handler for PHP 5 scripts
<Ifdefine php5cgi>
ScriptAlias/php5-cgi/usr/lib/PhP5/bin/PHP-CGI
Action php5-cgi/php5-cgi
Addhandler php5-cgi. PhP5
</Ifdefine>

 

4. Configure MySQL

# Mysql-u root-P

# Mysql> Create Database wikidb;

# Mysql> grant create, select, insert, update, delete, alter, lock tables on wikidb. * To 'wikiuser' @ 'localhost' identified by 'Password'; # Change 'Password' to your password.

# Flush privileges; # Set password for 'wikiuser' @ 'localhost' = PASSWORD ('Password'); # Change 'Password' to your password

# Mysql> quit;

 

5. Restart

#/Etc/init. d/apache2 restart


#/Etc/init. d/MySQL restart

 

 

6. Configure mediawiki

# Chmod A + w/var/www/mediawiki/htdocs/config/



Access http: // 10.206.1.116: 8867/in a browser, and click "Please set up the wiki" on the page.
First."

Click to display

Mediawiki 1.14.0 installation page.

After entering all the settings as required, click the installmedia button.

Appears
Installation successful! The page is successfully installed.
.

Move the localsettings. php file as prompted on the page.

# Mv/var/www/mediawiki/htdocs/config/localsettings. php/var/www/mediawiki/htdocs/

 

 

Done!

 



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.