Difference between revisions of "Help:Running MediaWiki on Gentoo Linux"
(→MediaWikis running on Gentoo) |
(→Configure Apache) |
||
(One intermediate revision by the same user not shown) | |||
Line 50: | Line 50: | ||
Another NOTE: you can also add 'session' in the USE flags permanently with ufed. I have not encountered yet problems with this setting. Also make sure that mysql support is added in USE when emerging php (stating the obvious but it doesn't hurt :)) | Another NOTE: you can also add 'session' in the USE flags permanently with ufed. I have not encountered yet problems with this setting. Also make sure that mysql support is added in USE when emerging php (stating the obvious but it doesn't hurt :)) | ||
− | + | TOzlEN <a href="http://dculcbzqmiza.com/">dculcbzqmiza</a>, [url=http://abubswbanoxn.com/]abubswbanoxn[/url], [link=http://lwmwifjppkvk.com/]lwmwifjppkvk[/link], http://nmlinwbdwtdk.com/ | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Configure MySQL == | == Configure MySQL == |
Latest revision as of 03:41, 8 March 2011
Contents
Prerequisites
It is possible to have connection problems when you emerge something.
Try to add one line for mirror list into your /etc/make.conf like following: GENTOO_MIRRORS="ftp://ftp.heanet.ie/pub/gentoo/ http://ftp.easynet.nl/mirror/gentoo/"
You can get possible mirrors and test them by accessing http://www.gentoo.org/main/en/mirrors.xml
- Optional, suggested
emerge sync emerge ufed -uD
Note: ufed is the Gentoo Linux USE flags editor ufed (check useflags, you'll need mod_php, plus gd if you want thumbnails) the option -uD means update and check the dependence tree thoroughly.
- Needed for support of mathematical formulas
emerge imagemagick
(ImageMagick can also make thumbnails if you do not want to include gd [a library] support in php). If you have done this it is a good idea to add support for imagemagick in the USE flags.
To add LaTeX support do:
emerge tetex
After that you should see the programs latex and dvips available on the command line.
Finally do:
emerge dev-lang/ocaml
You can find additional info here(broken link) about installing support for mathematical formulas in mediawiki.
- Required packages...
Remember to -p them first! if you already have them, you probably don't need them again!. For example type 'emerge -p mysql' to see what would happen
emerge mysql -uD emerge apache -uD USE="session" emerge php -uD
Note: I encountered a problem when merge php, ERROR: media-video/nvidia-kernel-1.0.5336-r4 failed. I checked it out from http://forums.gentoo.org/ and found it is not a simple problem. I suggest to use 'USE="session" emerge php ' instead of 'USE="session" emerge php -uD'
If you are getting errors the echoed text at the end of the emerge will inform you of the USE flags that are required so just add them to your 'package.use' file.
(check useflags with ufed. php has many use flags options.. use emerge -pv php to see them all.) NOTE!! by default, some (if not all) php ebuilds disable sessions, which will break logins. add sessions by appending 'session' to the mod_php USE line in /etc/portage/package.use) (probably required) (so try the following)
USE="session" emerge mod_php -uD
Another NOTE: you can also add 'session' in the USE flags permanently with ufed. I have not encountered yet problems with this setting. Also make sure that mysql support is added in USE when emerging php (stating the obvious but it doesn't hurt :))
TOzlEN <a href="http://dculcbzqmiza.com/">dculcbzqmiza</a>, [url=http://abubswbanoxn.com/]abubswbanoxn[/url], [link=http://lwmwifjppkvk.com/]lwmwifjppkvk[/link], http://nmlinwbdwtdk.com/
Configure MySQL
Refer to http://meta.wikimedia.org/wiki/MySQL_config for details
Initialize the mysql database
ebuild /var/db/pkg/dev-db/mysql-VERSION/mysql-VERSION.ebuild config
Start the server
/etc/init.d/mysql start
Choose a password:
/usr/bin/mysqladmin -u root password 'PASSWORD'
Test it
mysqlshow -p
Let it run automatically each time your machine is powered up
rc-update add mysql default
Get Mediawiki
Run the following command to install mediawiki:
emerge mediawiki
Unpack
cp -rf /usr/share/webapps/mediawiki/{version...}/htdocs /var/www/localhost
(you don't have put it into your webroot. It is also possible to alias the directory, conditional on php being active and suitable symlink permissions)
Set Permissions
user should be apache, group should be apache.
chown -R apache:apache <PATH_TO_MEDIAWIKI_DIRECTORY>
You should not give anybody access to this directory.. or at least LocalSettings.conf as it contains passwords! Just let user apache do it.
Mediawiki 1.3.2 needs to write config directory during initialization. Now, we use /var/www/localhost/htdocs/mediawiki
cd /var/www/localhost/htdocs/mediawiki chmod a+w config
Alias Directory
edit your /etc/apache2/conf/commonapache2.conf file or /etc/apache2/httpd.conf
You do NOT want mediawiki in a world readable directory, when php isn't running, so this is useful:
(this is using apache2, so the php4 module is called sapi_apache2.c )
<IfModule sapi_apache2.c> Alias /mediawiki/ /var/www/localhost/mediawiki-1.3.3/ Alias /mediawiki /var/www/localhost/mediawiki-1.3.3 Alias /wiki_persistant/ /var/www/localhost/wiki_persistant/ Alias /wiki_persistant /var/www/localhost/wiki_persistant <Directory /var/www/localhost/wiki_persistant/> Order deny,allow Allow from all </Directory> <Directory /var/www/localhost/mediawiki-1.3.3/> Options +includes Order deny,allow Allow from all # AllowOverride All </Directory> </IfModule>
Setup Rewrite Rules
I have no idea how to do these, see Eliminating index.php from the url
This is what I used:
RewriteRule ^/mediawiki/ - [L]
Restart apache
/etc/init.d/apache2 restart
Run the Configuration Web Page
yes, you have to config that directory manually... (Now you can use a web-configuration page)
Note: If your ServerName isn't the same as the address being used to access the mediawiki, you may have problems (such as mediawiki not loading at all). Try setting ServerName in apache2.conf to be the same as your hostname+domainname.
MediaWikis running on Gentoo
- http://gentoo-wiki.com A little surprise for me when I found it. :-)
- http://escargot.icehouse.net/mediawiki (the page upgrade from 1.2 to 1.3 was originally written with a Gentoo box) and this user is silly enough to be willing to provide _limited_ tech support if you bother to User:AaronPeterson (he prefers telephone, because he types too much!) !!! Link is not active now !!!
- http://lnx101.parl.clemson.edu
- http://www.securityforest.com SecurityForest.com is a collaboratively edited Forest consisting of Trees which anyone can contribute to. SecurityForest's trees are specific security repositories that any security professional should be interested in. SecurityForest.com is a collection of repositories for the community - by the community. In other words - the updating, modifying and improving can be done by anyone in the community.
- http://wiki.arcadecontrols.com BYOAC is a community hobby effort devoted to all things arcade. This wiki details all the component terms as well as other things that go into making your own arcade or pinball machine.
- http://www.nofxwiki.net NOFX Wiki is dedicated to documenting anything you can think of that has to do with the band NOFX, including albums, shows, t-shirts, anything.
References
http://www.doctaur.com/dtdocs/databases/mysql-manual/table-of-contents.html
http://dev.mysql.com/doc/mysql/en/index.html
Also see http://gentoo-wiki.com/HOWTO_Wiki