Installing webapps
From Gentoo Linux Wiki
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.
- dev-db/mysql
- Oracle -- The most powerful database
- dev-db/postgresql -- bonus link: HOWTO Configure Postgresql
- dev-db/hsqldb -- DB written in 100% pure Java code
[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
- Apache2 Install
- http://meta.wikimedia.org/wiki/Make_non-ugly_URLs
- HOWTO Apache2 and Tomcat5
- HOWTO Linux Virtual Hosting Server
- Tomcat Gentoo ebuild
- JBoss without packaged jars
