Sorry but any assistance gratefully accepted. I am very new to this and trying to set up a number of wikis on the one site. All of them will deal with the same topic they are just in different languages. I have been playing around with it for a while but seem to just keep breaking it. I also found this article but I am having some problems following it.
How do I create a small wiki farm?
After copying the mediawiki source tree in /opt/mediawiki/ you need to run something like: mkdir .../wiki cd .../wiki mkdir images ln -s /opt/mediawiki/languages /opt/mediawiki/maintenance \ /opt/mediawiki/skins /opt/mediawiki/redirect.php . cp -a /opt/mediawiki/config/ . chown www-data: config/ cp /opt/mediawiki/index.php index.php Then add /opt/mediawiki to the commands which set the include_path in config/index.php and add something like this to the main index.php: ini_set( "include_path", "/opt/mediawiki:." ); # line added require_once( 'includes/Defines.php' ); # this line used to include './includes/Defines.php' * make sure your webserver can read from /opt/mediawiki
What I have done so far.
Mkdir mediawiki //Placed all the mediawiki files into this directory
Created directories for French Danish Spanish German
Using root directory for English
Created symbolic links for all files and directories in /mediawiki in each language based directory Ran the installation process for each language based wiki and moved LocalSettings.php For each wiki I am using a separate database as when I tried to use one database with prefixes it did not work - It would not show appropriate languages for each wiki but got stuck on one.
The only settings that different in each of the wiki's is basically the languagecode and databasename. I have tried moving nearly all the settings from the LocalSettings.php to a CommonSettings.php file and calling it with an include_once statement but this just seems to break things also.
Can anyone give me some very simple instructions on how to do this.
Thanks
Laurie
Don't use the root directory for English - use separate folders for each wiki installation. I host about 50 wikis on the same server, some with their own domain names, some under a common name.
wikis.site.com/wiki1 wikis.site.com/wiki2 wikis.site.com/wiki3 wikis.site.com/wiki4
All under /var/www/wikis: ./wiki1 ./wiki2 ./wiki3 and so on.
Sites with a different domain I keep separate: /var/www/site1 /var/www/site2 etc...
Just copy the wiki software into each folder and set it up as usual. The main trick is to prevent session mixing, since the same user can access a wiki on the same domain. Just add a line to LocalSettings here:
$wgSitename = "YourWikiName"; ini_set("session.name", "{$wgSitename}Session"); // Added line
That allows a user to save their login on each wiki, even when it is in the same domain.
Here's my whole process for creating a brand new wiki (Fedora Core 4 - pretty much the same for Mandrake too, except you don't need paths for useradd and service commands)
ssh to server su cd /var/www/wikis mkdir newwiki cd newwiki cp -R /home/mhart/mediawiki-1.5.x/* ./ chmod a+w config mysql -p (enter password) mysql> create database newwikidb; mysql> grant all privileges on newwikidb.* to 'newwiki_user'@'localhost' identified by 'newwiki_password'; mysql> quit
Then I browse to the site: mysite.com/newwiki and run the setup. Then...
cp config/LocalSettings.php ./ chmod a-w config vi LocalSettings.php then find the $wgSiteName and add the line I showed above (ini_set) :wq (write and quit)
cd .. (now I'm in /var/www/wikis) /usr/sbin/useradd -d /var/www/wikis/newwiki newwiki passwd newwiki (enter password twice) chown -R newwiki newwiki chgrp -R apache newwiki vi /etc/vsftpd/chroot_list (to add that user to the chroot list for FTP access - I already configured vsftpd for chrooting) :wq
Then I create a backup cron job for the user - my default mediawiki install has a mysql\ folder in for database backup:
crontab -e 50 23 * * * /home/mhart/backup.sh /var/www/wikis/newwiki/mysql newwikidb newwiki (parameters are path for backup, database name, owner name) :wq
And I'm done - takes me five minutes :-)
If the wiki is on a different website, I use Apache vhosting:
vi /etc/httpd/conf/httpd.conf (find the virtual hosting stuff) <VirtualHost 111.222.33.44> ServerName whatever.com DocumentRoot /var/www/whatever TransferLog /var/www/whatever/logs </VirtualHost> :wq
Then restart Apache:
/sbin/service httpd restart
An extra 90 seconds :-)
- MHart
----- Original Message ----- From: "Laurie Lewis" ldlewis@swiftdsl.com.au To: mediawiki-l@Wikimedia.org Sent: Wednesday, December 14, 2005 6:47 PM Subject: [Mediawiki-l] Small Wiki Farm
Sorry but any assistance gratefully accepted. I am very new to this and trying to set up a number of wikis on the one site. All of them will deal with the same topic they are just in different languages. I have been playing around with it for a while but seem to just keep breaking it. I also found this article but I am having some problems following it.
How do I create a small wiki farm?
After copying the mediawiki source tree in /opt/mediawiki/ you need to run something like: mkdir .../wiki cd .../wiki mkdir images ln -s /opt/mediawiki/languages /opt/mediawiki/maintenance \ /opt/mediawiki/skins /opt/mediawiki/redirect.php . cp -a /opt/mediawiki/config/ . chown www-data: config/ cp /opt/mediawiki/index.php index.php Then add /opt/mediawiki to the commands which set the include_path in config/index.php and add something like this to the main index.php: ini_set( "include_path", "/opt/mediawiki:." ); # line added require_once( 'includes/Defines.php' ); # this line used to include './includes/Defines.php'
- make sure your webserver can read from /opt/mediawiki
What I have done so far.
Mkdir mediawiki //Placed all the mediawiki files into this directory
Created directories for French Danish Spanish German
Using root directory for English
Created symbolic links for all files and directories in /mediawiki in each language based directory Ran the installation process for each language based wiki and moved LocalSettings.php For each wiki I am using a separate database as when I tried to use one database with prefixes it did not work - It would not show appropriate languages for each wiki but got stuck on one.
The only settings that different in each of the wiki's is basically the languagecode and databasename. I have tried moving nearly all the settings from the LocalSettings.php to a CommonSettings.php file and calling it with an include_once statement but this just seems to break things also.
Can anyone give me some very simple instructions on how to do this.
Thanks
Laurie
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Ok, I have set up the wiki as a test to begin with before I begin transferring the real site across to correct all my mistakes. All wiki's will be in the same domain just using different directories.
I have been able to move all the settings from LocalSettings.php to CommonSettings.php except for the LanguageCode for each configuration. That way I only have to change one file for all the wiki's and never touch the LocalSettings.php again for individual wiki's.
I have also setup one database using language prefixes for all the different language versions. (Done for backup ease).
Works fine to here.
I have added the line indicated below re session mixing but have some concerns as all the wiki's will have the same name - will that cause problems?
I would also like a common userbase across all the wiki's. Since I am using prefixes to differentiate the wiki's can I create a table "Users" and point all wiki's to it???? How???
Also want to have a common images directory but will begin to read up on that now - unless anyone want to tell me how to do it??
Thanks
Laurie
-----Original Message----- From: mediawiki-l-bounces@Wikimedia.org [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of MHart Sent: Friday, 16 December 2005 3:25 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Small Wiki Farm
Don't use the root directory for English - use separate folders for each
wiki installation. I host about 50 wikis on the same server, some with their own domain names, some under a common name.
wikis.site.com/wiki1 wikis.site.com/wiki2 wikis.site.com/wiki3 wikis.site.com/wiki4
All under /var/www/wikis: ./wiki1 ./wiki2 ./wiki3 and so on.
Sites with a different domain I keep separate: /var/www/site1 /var/www/site2 etc...
Just copy the wiki software into each folder and set it up as usual. The
main trick is to prevent session mixing, since the same user can access a wiki on the same domain. Just add a line to LocalSettings here:
$wgSitename = "YourWikiName"; ini_set("session.name", "{$wgSitename}Session"); // Added line
That allows a user to save their login on each wiki, even when it is in the same domain.
Here's my whole process for creating a brand new wiki (Fedora Core 4 - pretty much the same for Mandrake too, except you don't need paths for useradd and service commands)
ssh to server su cd /var/www/wikis mkdir newwiki cd newwiki cp -R /home/mhart/mediawiki-1.5.x/* ./ chmod a+w config mysql -p (enter password) mysql> create database newwikidb; mysql> grant all privileges on newwikidb.* to 'newwiki_user'@'localhost'
identified by 'newwiki_password'; mysql> quit
Then I browse to the site: mysite.com/newwiki and run the setup. Then...
cp config/LocalSettings.php ./ chmod a-w config vi LocalSettings.php then find the $wgSiteName and add the line I showed above (ini_set) :wq (write and quit)
cd .. (now I'm in /var/www/wikis) /usr/sbin/useradd -d /var/www/wikis/newwiki newwiki passwd newwiki (enter password twice) chown -R newwiki newwiki chgrp -R apache newwiki vi /etc/vsftpd/chroot_list (to add that user to the chroot list for FTP
access - I already configured vsftpd for chrooting) :wq
Then I create a backup cron job for the user - my default mediawiki install has a mysql\ folder in for database backup:
crontab -e 50 23 * * * /home/mhart/backup.sh /var/www/wikis/newwiki/mysql newwikidb
newwiki (parameters are path for backup, database name, owner name) :wq
And I'm done - takes me five minutes :-)
If the wiki is on a different website, I use Apache vhosting:
vi /etc/httpd/conf/httpd.conf (find the virtual hosting stuff) <VirtualHost 111.222.33.44> ServerName whatever.com DocumentRoot /var/www/whatever TransferLog /var/www/whatever/logs </VirtualHost> :wq
Then restart Apache:
/sbin/service httpd restart
An extra 90 seconds :-)
- MHart
----- Original Message ----- From: "Laurie Lewis" ldlewis@swiftdsl.com.au To: mediawiki-l@Wikimedia.org Sent: Wednesday, December 14, 2005 6:47 PM Subject: [Mediawiki-l] Small Wiki Farm
Sorry but any assistance gratefully accepted. I am very new to this
and
trying to set up a number of wikis on the one site. All of them will deal with the same topic they are just in different languages. I have been playing around with it for a while but seem to just keep breaking it. I also found this article but I am having some problems following it.
How do I create a small wiki farm?
After copying the mediawiki source tree in /opt/mediawiki/ you need to run something like: mkdir .../wiki cd .../wiki mkdir images ln -s /opt/mediawiki/languages /opt/mediawiki/maintenance \ /opt/mediawiki/skins /opt/mediawiki/redirect.php . cp -a /opt/mediawiki/config/ . chown www-data: config/ cp /opt/mediawiki/index.php index.php Then add /opt/mediawiki to the commands which set the include_path in config/index.php and add something like this to the main index.php: ini_set( "include_path", "/opt/mediawiki:." ); # line added require_once( 'includes/Defines.php' ); # this line used to include './includes/Defines.php'
- make sure your webserver can read from /opt/mediawiki
What I have done so far.
Mkdir mediawiki //Placed all the mediawiki files into this directory
Created directories for French Danish Spanish German
Using root directory for English
Created symbolic links for all files and directories in /mediawiki in each language based directory Ran the installation process for each language based wiki and moved LocalSettings.php For each wiki I am using a separate database as when I tried to use
one
database with prefixes it did not work - It would not show
appropriate
languages for each wiki but got stuck on one.
The only settings that different in each of the wiki's is basically
the
languagecode and databasename. I have tried moving nearly all the settings from the LocalSettings.php to a CommonSettings.php file and calling it with an include_once statement but this just seems to break things also.
Can anyone give me some very simple instructions on how to do this.
Thanks
Laurie
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org