Loading...
 
Skip to main content

History: RecipeMultiTiki

Preview of version: 16

How to Host Multiple Tikiwiki's on a Single ))RedHat(( System.

by George Geller

General instructions for installing multiple tikis on a single server are at InstallVirtualHosting.

Here I show one way to install multiple tikis on a ))RedHat(( Linux server
when you have root access. I assume that you already have apache, php
and mysql all working on your system. If you installed the correct
))RedHat(( packages and didn't change the configuration files too much,
these programs should be working. I've had success with this approach
on ))RedHat8,RedHat(( 9 and Yellow Dog 3.0.

In this example I go through the steps to create threee working tikis on
my machine and give a few pointers in the process. I will be
specific, rather than general, concrete, rather than abstract. If
your setup is different you'll have to adapt the instructions.

I illustrate how to set up three tikis: public.wikiplanet.com,
member.wikiplanet.com and staff.wikiplanet.com.

Each tiki instance will need a seperate database in mysql. Tiki also
needs a mysql user that has the correct permissions to manipulate the
databases. The names of the databases don't matter to mysql, but I
have adopted a convention where I always use a prefix of tiki_ for the
database name. So for my three tikis, the corresponding databases
will be: tiki_public, tiki_member and tiki_staff. I create a single
mysql user, 'tiki', that will have access to all tiki databases.

The commands I issue as root are:
Copy to clipboard
# mysqladmin -uroot -p create tiki_public # mysqladmin -uroot -p create tiki_member # mysqladmin -uroot -p create tiki_staff
Then I run mysql to set up the 'tiki' user with the correct permissions
Copy to clipboard
# mysql -uroot -p mysql> USE mysql; mysql> GRANT USAGE ON * . * TO "tiki"@"localhost" IDENTIFIED BY "password"; mysql> GRANT ALL PRIVILEGES ON `tiki_public` . * TO "tiki"@"localhost"; mysql> REVOKE GRANT OPTION ON `tiki_public` . * FROM "tiki"@"localhost"; mysql> GRANT ALL PRIVILEGES ON `tiki_member` . * TO "tiki"@"localhost"; mysql> REVOKE GRANT OPTION ON `tiki_member` . * FROM "tiki"@"localhost"; mysql> GRANT ALL PRIVILEGES ON `tiki_staff` . * TO "tiki"@"localhost"; mysql> REVOKE GRANT OPTION ON `tiki_staff` . * FROM "tiki"@"localhost"; mysql> exit

Next I edit /etc/httpd/conf/httpd.conf so that apache will know where to look for the tikis.
I changed ))DocumentRoot(( to /www because I am a lazy typist. By default is /var/www/html.
There are two lines in httpd.conf that you will need to change:
))DocumentRoot(( "/www"
and 25 lines further down:
<Directory "/www">
You can change them, or you leave them and adjust the rest of these instructions accordingly.

Further down, find the line with ))NameVirtualHost(( and change it to:
))NameVirtualHost(( *:80

At the end of the httpd.conf, add stanzas for your three tikis:

Copy to clipboard
<VirtualHost *:80> ServerAdmin webmaster@wikiplanet.com DocumentRoot /www/public.wikiplanet.com ServerName public.wikiplanet.com ErrorLog logs/public.wikiplanet.com-error_log CustomLog logs/public.wikiplanet.com-access_log common </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@wikiplanet.com DocumentRoot /www/member.wikiplanet.com ServerName member.wikiplanet.com ErrorLog logs/member.wikiplanet.com-error_log CustomLog logs/member.wikiplanet.com-access_log common </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@wikiplanet.com DocumentRoot /www/staff.wikiplanet.com ServerName staff.wikiplanet.com ErrorLog logs/staff.wikiplanet.com-error_log CustomLog logs/staff.wikiplanet.com-access_log common </VirtualHost>

Restart your web server.

Copy to clipboard
# apachectl graceful

Don't worry about the warnings that the directories don't exist, we're going to make them next.

Get a distribution of Tikiwiki from sourceforge.net. Unpack it and make the soft links.
I used tikiwiki-1.8.RC2.tar.bz2.

Copy to clipboard
# cd /www # tar -xvjf tikiwiki-1.8.RC2.tar.bz2 # ln -s tikiwiki-1.8.RC2 public.wikiplanet.com # ln -s tikiwiki-1.8.RC2 member.wikiplanet.com # ln -s tikiwiki-1.8.RC2 staff.wikiplanet.com


Now you need to edit tiki's db/local.php.

Copy to clipboard
# cd /www/tikiwiki-1.8.RC2/db

Edit local.php. Mine reads:

Copy to clipboard
<?php $host_tiki="localhost"; $user_tiki="tiki"; $pass_tiki="secret"; $db_tiki = 'mysql'; $dbversion_tiki="1.8"; if ($_SERVER["HTTP_HOST"] == "public.wikiplanet.com") { $dbs_tiki = "tiki_public"; $tikidomain = "public.wikiplanet.com"; } elseif ($_SERVER["HTTP_HOST"] == "member.wikiplanet.com") { $dbs_tiki = "tiki_member"; $tikidomain = "member.wikiplanet.com"; } elseif ($_SERVER["HTTP_HOST"] == "staff.wikiplanet.com") { $dbs_tiki = "tiki_staff"; $tikidomain = "staff.wikiplanet.com"; } else { // default case, your choice is to block or open to a default domain } ?>

Set up the files and directories for tiki:

Copy to clipboard
# cd /www/tikiwiki-1.8.RC2 # ./setup.sh apache apache 02755 public.wikiplanet.com member.wikiplanet.com staff.wikiplanet.com # chown apache:apache *.php .


Next we need to point our browser to the new wikis. You must have dns working correctly, or you can edit /etc/hosts. In my case dns works, so I point Mozilla to: http://public.wikiplanet.com/tiki-install.php and run the install script. Do not choose to "remove" tiki-install.php yet! Repeat the procedure for the other two tiki's: member and staff. In the final case, "remove" the install script.

That's all. Login to the tikis as admin and configure them.

Feel free to edit this page or add comments. - George Geller

History

Advanced
Information Version
george.geller Update to Tikiwiki-1.10 36
View
george.geller 35
View
george.geller Don't chage document root. 34
View
george.geller Update for Fedora Core 3 33
View
Michael Davey ))RedHat(( breaking the page - parser bug 32
View
george.geller Change comments regarding MultiTiki19 31
View
george.geller 30
View
george.geller 29
View
Xavi (as xavidp - admin) AkiraMultiTiki reference included 28
View
george.geller 27
View
george.geller Refer to RecipeMultiTiki2 26
View
george.geller 25
View
george.geller Use .vh files 24
View
SEWilco Moved favicon detail to WikiShortcutIcon 23
View
SEWilco 22
View
SEWilco Structure adjusted, added table of contents 21
View
SEWilco Show how favicon.ico can be redirected 20
View
george.geller 17
View
george.geller 16
View