Installing webapps

From Gentoo Linux Wiki

Jump to: navigation, search

Contents

[edit] Prerequesites

First of all you need an application server. Here is list of HTTP servers you can find in portage:

  • net-www/apache -- HTTP server for applications written in PHP, Perl, etc.
  • www-servers/tomcat -- Simple servlet container for Java Applications
  • www-servers/jboss -- J2EE server
  • net-zope/zope -- Application server for Python apps

Also you will need one of the following databases.

[edit] MediaWiki

Alternative article about mediawiki installation: MediaWiki

[edit] Installation

I'm using php5 and mysql4.

# emerge -avt imagemagic
# echo "<www-apps/mediawiki-1.6 ~x86" >> /etc/portage/package.keywords
# emerge -avt mediawiki

Now you can access your wikis via url http://localhost/mediawiki/index.php. First of all you need to configure mediawiki. I think it is not very difficult ;)

[edit] Customizing URL

It's a good idea to have access to wiki pages across more pretty url like http://localhost/wiki/Some_Page (see Links section), or even http://localhost/Some_Page. To do so you need to put into your htdocs folder file .htaccess with following content

RewriteEngine on
RewriteOptions MaxRedirects=15
RewriteRule ^$ /wiki/Main_Page [R] 
RewriteRule ^wiki/?(.*)$ /mediawiki/index.php/$1 [L,QSA]

And do not forget to tell apache to look into .htaccess file by setting AllowOverrides All in files /etc/apache/httpd.conf and /etc/apache/vhosts/00_default_vhost.conf

Now you just need to tell MediaWiki to generate pritty urls. Open LocalSettings.php in your favourite editor and change it

$wgArticlePath="/wiki/$1"

[edit] Links

[edit] Authors

Personal tools