These are a brief set of instructions on how to add a Tiki based domain to a previously installed Tiki based service using MySQL. This document assumes knowledge of MySQL, BIND, and Apache configuration.
First we must edit the
local.php file (excerpt below), at
/var/www/tiki.skybuilders.com/db/, to add domain detection
for wiki.informationphilosopher.com, our example for this document - make sure to add the DNS and Apache require counterparts pointing at the Tiki server.
% emacs db/local.php
} elseif ($_SERVER["HTTP_HOST"] == "wiki.informationphilosopher.com") {
$host_tiki="localhost";
$user_tiki="wiki_info_com";
$pass_tiki="53rv1c35";
$dbs_tiki="wiki_info_com";
$tikidomain = 'wiki.informationphilosopher.com';
}
Create the virtual host DB, wiki_info_com. Admin password required.
* NB: user and database names in MySQL cannot exceed 15 charachters.
% mysqladmin -u mysql_dba -p create wiki_info_com
Enter MySQL shell as admin. Admin password required.
% mysql -u mysql_dba -p
Create the user, wiki_info_com (same name as the database by our own convention), by use of the GRANT SQL command.
mysql> GRANT ALL PRIVILEGES ON *.* TO wiki_info_com@localhost IDENTIFIED BY
'53rv1c35' WITH GRANT OPTION;
Leave the MySQL shell.
mysql> \q
Navigate to the instance of tiki.sql script.
% cd /var/www/tiki.skybuilders.com/db
Populate the DB with tables. wiki_info_com password required.
% mysql -u wiki_info_com wiki_info_com -p < tiki.sql
A few more tweaks - getting a template base.
% cd /var/www/tiki.skybuilders.com/templates_c/
% mkdir wiki.informationphilosopher.com
% cd wiki.informationphilosopher.com
% cp -r ../tiki.skybuilders.com/* .
% chown -R apache:skyapp /var/www/tiki.skybuilders.com
Temporarily rename the tiki-install.php script at /var/www/tiki.skybuilders.com/. (This script is usually renamed from tiki-install.php to tiki-install.done after being run during the initial installation of the Tiki software. This is done so that a hacker does not rerun this script and destroy your existing database.)
% mv tiki-install.done tiki-install.php
Run the tiki-install.php script from your browser: http://wiki.informationphilosopher.com/tiki-install.php You will login as the tiki admin, using 'admin' 'admin'. Be sure to change the password as soon as you log in.
And name it back to tiki-install.done so it does not get re-run.
% mv tiki-install.php tiki-install.done
You will then need to make the appropriate Apache httpd.conf edits. Make sure that you point your document root to the general tiki base.
<VirtualHost 10.10.40.8>
ServerName wiki.informationphilosopher.com
DocumentRoot /var/www/tiki.skybuilders.com
ServerAdmin jesse@skybuilders.com
ServerSignature email
DirectoryIndex index.php index.html index.shtml index.pl
</VirtualHost>
Finished.