History: MultiTiki
Source of version: 41 (current)
Copy to clipboard
! MultiTiki Or how to set up multiple Tikis on the same server with a single Tiki file set installation. For managing different Tiki installations (several copies of the same installation files) in the same or different servers, see ((Manager|Tiki Manager)) instead. It is possible to have multiple Tikis on a single server and using a single copy of the installation file set. This can be done through: # __Multitiki using domains__: using different domain names (i.e. http://site1.org/, http://site2.org/, ...). or # __Multitiki using subdirectories__: having your several tikis in subdirectories of the same domain (i.e. http://yourhost/site1/, http://yourhost/site2/, ...) . There are some differences depending on the previous option, but there are three major requirements that must be satisfied in both cases: *Tiki must have an access to a separate database for each URL. *Apache must know how to associate multiple URLs with the Tiki. *You must create the necessary directories with the Tiki's main directory. !!# Create a separate database for each url. *Each database will have a different name. In mysql, creating the databases is normally accomplished with the mysqladmin command. You may have permission to create the database, or you may have to ask a system administrator. To actually tell Tiki which database goes with which URL you have to edit one of Tiki's PHP files. The file db/local.php is designed for this purpose. See an example of edited local.php file for multikis (either 'multitiki using domains' or 'multitiki using subdirectories') at ((Manual Installation)). !!# Configure the server to host multiple Tikis !!!# Multitiki using domains Typically, each Tiki will be accessed by a separate URL through Apache. Generally, the URLs are specified as virtual hosts -- often in VirtualHost stanzas within Apache's configuration file. Remember to restart Apache after you have changed the configuration files. On Linux this is usually best done with the "apachectl" graceful command. On shared hosting, you can use "parked a domain" to have extra domains pointing to the same TikiWiki installation. !!!# Multitiki using subdirectories Add symlinks. See the instructions in ((Manual installation)) AND in ((MultiTiki Manual Installation)) for the time being (and/or improve this page). !!# Create the necessary directories within Tiki's main directory. *On a Unix system, the easiest way to create the new directories and set permissions is by specifing more than one tikidomain when you run setup.sh. You would run setup.sh with a command like: {VERSIONS(nav="y",default="3.x")} Run __setup.sh__ from the console, and follow instructions. You'll need to grant execution permission on that file the first time, as user with root privileges: {CODE()}% chmod +x ./setup.sh {CODE} Then, just run it with no parameters in the command line, and it will start in interactive mode: {CODE()}% ./setup.sh {CODE} From there follow instructions. Some of the options are explained below: *__Group__: Defaults to ''nobody'' ''or www-data'' or others (depending on the system, whatever the script will suggesst you as default) but may also be the standard group for the files as uploaded. *__Multi__: You should add here the names of your multitiki sites, separated by spaces (i.e. "site1 site2", or "www.site1.org www.site2.org", without the quotation marks. The script will create as many subdirectories as appropriate using this name for each tiki site under this multitiki installation. If it doesn't work for any reason, you can do its job by hand. See ((Manual Installation)) if needed. ---(2.x and 1.9.x)--- {CODE()} ./setup.sh apache apache 02755 domain1 domain2 domain3 {CODE} Create the directories manually for Windows hosting. It is possible to add additional tikis after you have installed a single Tiki. However, with the exception of the case in the following paragraph, you will have to manually create the needed directories. If you are hosting on a Unix system, you will also need to manually set the ownership and permissions. [http://tikiwiki.org/tiki-index.php?page=RecipeMultiTiki] has a detailed recipe tested under ))RedHat((, version 8 and version 9 and Yellow Dog Linux, version 3.0. Root access to the Linux machine is required for this approach. If you follow the instructions exactly, there is a Python script you can use to add additional Tikis later. {VERSIONS} There are a few minor problems that crop up with this approach. The admins for the various tikis have the ability to overwrite each others changes to the css. Ordinary. users with the same login names on different tikis would also be able to overwrite each other's changes to css files. Finally, you must use Apache's mod_rewrite if you want the different Tikis to have their own favicons. !!# Optionally, add .htaccess with rewrite rules You optionally add some ((Apache Clean URLs)) for your tikis. !!# Sys admin tasks from the Console Since ((Tiki11)), you can rebuild the ((Search Index)) and many other sys admin tasks from the command line also for Multitiki setups. And Since ((Tiki12)).3, you can also handle the ((Mail Queue)) and the ((Daily Reports)). You can use commands like: {CODE(colors="shell")} root@server:/path/trunk# php console.php index:rebuild --site=site1.example.com root@server:/path/trunk# php console.php index:rebuild --site=site2.example.com ... {CODE} !!! Newer MultiTiki Utility Commands Since Tiki 15 (??) you can use multitiki:list and multitiki:move to manage your multitiki domains. For example: {CODE(colors="shell" caption="List domains in the current Tiki")}$ php console.php multitiki:list example.com other.example.com {CODE} {CODE(colors="shell" caption="List domains in another (local) Tiki")}$ php console.php multitiki:list ../20.x staging.example.com {CODE} And then to preview moving one from 20.x to the current Tiki use: {CODE(colors="shell" caption="Move a MultiTiki")}$ php console.php multitiki:move staging.example.com ../20.x Will move: /home/auser/tiki/branches/20.x/db/staging.example.com to /home/auser/tiki/branches/21.x/db/staging.example.com Will move: /home/auser/tiki/branches/20.x/dump/staging.example.com to /home/auser/tiki/branches/21.x/dump/staging.example.com Will move: /home/auser/tiki/branches/20.x/img/wiki/staging.example.com to /home/auser/tiki/branches/21.x/img/wiki/staging.example.com Will move: /home/auser/tiki/branches/20.x/img/wiki_up/staging.example.com to /home/auser/tiki/branches/21.x/img/wiki_up/staging.example.com Will move: /home/auser/tiki/branches/20.x/img/trackers/staging.example.com to /home/auser/tiki/branches/21.x/img/trackers/staging.example.com Will move: /home/auser/tiki/branches/20.x/modules/cache/staging.example.com to /home/auser/tiki/branches/21.x/modules/cache/staging.example.com Will move: /home/auser/tiki/branches/20.x/temp/staging.example.com to /home/auser/tiki/branches/21.x/temp/staging.example.com Will move: /home/auser/tiki/branches/20.x/temp/cache/staging.example.com to /home/auser/tiki/branches/21.x/temp/cache/example.com Will move: /home/auser/tiki/branches/20.x/temp/public/example.com to /home/auser/tiki/branches/21.x/temp/public/staging.example.com Will move: /home/auser/tiki/branches/20.x/templates/staging.example.com to /home/auser/tiki/branches/21.x/templates/staging.example.com Will move: /home/auser/tiki/branches/20.x/themes/staging.example.com to /home/auser/tiki/branches/21.x/themes/staging.example.com Will move: /home/auser/tiki/branches/20.x/whelp/staging.example.com to /home/auser/tiki/branches/21.x/whelp/staging.example.com Will move: /home/auser/tiki/branches/20.x/mods/staging.example.com to /home/auser/tiki/branches/21.x/mods/staging.example.com Will move: /home/auser/tiki/branches/20.x/files/staging.example.com to /home/auser/tiki/branches/21.x/files/staging.example.com Will move: /home/auser/tiki/branches/20.x/tiki_tests/tests/staging.example.com to /home/auser/tiki/branches/21.x/tiki_tests/tests/staging.example.com Use --confirm to perform moves {CODE} Then run the same command again with --confirm at the end to actually perform the move. __Note: You will need to then run -+sh setup.sh+- in the destination Tiki after the move as of 21.0 {sign user="jonnybradley" datetime="2020-03-23T17:47:44+00:00"}__ See ((Console)) !!# Other Installation Procedures for Multiple TikiWikis * ((MultiTiki Manual Installation)) -=See also=- * ((Manager|Tiki Manager)) -=Related older pages=- * [http://tiki.org/RecipeMultiTiki] * [http://tiki.org/MultiTiki+1.9] -=Aliases=- (alias(Multi-Tiki)) (alias(Multi Tiki)) (alias(MultiTiki 1.9)) | (alias(MultiTiki Akira)) | (alias(MultiTiki Virtual Hosting Install)) | (alias(MultiTiki Recipe))