Difference between revisions of "Install a new wiki"

From Organic Design wiki
m
({{legacy}})
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{legacy}}
 
{{procedure
 
{{procedure
 
|description = This procedure installs a new wiki into the [[OD/Wikia|Wikia]] after [[Add a wiki database|adding a new wiki database]].
 
|description = This procedure installs a new wiki into the [[OD/Wikia|Wikia]] after [[Add a wiki database|adding a new wiki database]].
 
|role = Sysop
 
|role = Sysop
|status = in use
+
|status = legacy
 
}}
 
}}
 +
After a new database has been added for the wiki using the [[add a wiki database]] procedure, some files need to be added and modified.
  
 +
== Configuration directory ==
 +
Each wiki requires a configuration directory in ''/var/www/wikis'' which contains it's ''LocalSettings.php'' file, a symlink to the MediaWiki code-base it's to use and its files as shown in the following example file structure.
 +
<source lang="bash">
 +
/var/www/wikis/foo/
 +
/var/www/wikis/foo/LocalSettings.php                  # Individual wiki configuration
 +
/var/www/wikis/foo/wiki -> /var/www/mediawiki-1.13.2/  # Symbolic link to the MediaWiki code-base
 +
/var/www/wikis/foo/files/                              # Images filesystem hash table (ensure this is writable by webserver)
 +
</source>
  
==from windows==
+
== LocalSettings.php and other wiki configuration files ==
 +
Most of the settings required are already configured in the [http://svn.organicdesign.co.nz/filedetails.php?repname=extensions&path=%2Fwikia.php wikia.php] script in out ''extensions' svn repo, but some settings such as the wiki's name, its database details and its extensions are still necessary. See our sample file [http://svn.organicdesign.co.nz/filedetails.php?repname=extensions&path=%2FLocalSettings.sample.php LocalSettings.sample.php] which covers most of the common conventions for a wiki intended for Organic Design wiki organisation use. One other related file is [http://svn.organicdesign.co.nz/filedetails.php?repname=extensions&path=%2Fwikia.i18n.php wikia.i18n.php] which contains all the internationalised messages used by OD wiki organisational systems.
  
;Prerequisite
+
== Domain configuration ==
*FTP
+
Add a symlink for the domain(s) the new wiki should be accessible from. If the domain is pointed at the server using a wild-card, then no DNS configuration will be necessary, but otherwise an A-record will need to be created for the sub-domain, or a completely new domain may need to be set up, in which case see [[set up a new domain name]].
*Geany
 
*Database
 
  
;Exercise
+
Once the domain/sub-domain is pointing at the server, then it is routed to the correct wiki by adding a symlink in ''/var/www/domains'' which has the same name as the domain and links to the configuration directory for the new wiki in ''/var/www/wikis'' for example:
 
+
<source>
*download latest version of mediawiki
+
ln -s /var/www/wikis/foo /var/www/domains/foo.com
*set up database (must have access to client's server)
+
</source>
*upload the wiki via FTP
 
*run the config
 
  
 +
== Populate wiki content ==
 +
*skin
 +
*sidebar tree
 +
*common CSS and JS
  
 +
== See also ==
 
*[[Add a wiki database]]
 
*[[Add a wiki database]]
*cp -pR template
+
*[[Set up a new domain name]]
*create a LocalSettings.php and set ownership to ''www-data'' so they can be filesync'd if you like
+
[[Category:Wikia]]
**Note there should be no DB user or password in any [[LocalSettings.php]] files, it should only be in [[Wikia.php]]
 
**extensions and sets (GeneralExtensions.php and WikiWebExtensions.php)
 
**include order (specialpages first)
 
**packages
 
**examples and templates of settings files
 
*create symlinks to the new wiki from the necessary domains
 
:<tt>ln -s /var/www/wikis/foo /var/www/domains.foo.com</tt>
 
 
 
=== File structure ===
 
{{code|<bash>
 
/var/www/domains/tmp.peerix.org -> /var/www/wikis/template
 
 
 
/var/www/wikis/template/
 
/var/www/wikis/template/LocalSettings.php                  # Individual configuration
 
/var/www/wikis/template/wiki -> /var/www/mediawiki-1.10.0/  # Symbolic link to common MediaWiki instance
 
/var/www/wikis/template/files/                              # Images filesystem hash table
 
/var/www/wikis/template/template.sql                        # MySQL dump of template database
 
</bash>}}
 
 
 
=== Creating wikia structure automatically ===
 
<bash>
 
url=foo.com
 
documentroot=/var/www/
 
mapdir=fodda
 
templatedir=template
 
version=1.11.0
 
 
 
# 1) Check directories exist
 
 
 
if [ ! -d $documentroot/domains ]
 
then
 
mkdir $documentroot/domains
 
fi
 
 
 
if [ ! -d $documentroot/wikis ]
 
then
 
mkdir $documentroot/wikis
 
fi
 
 
 
mkdir $documentroot/wikis/$mapdir
 
 
 
# 2) Mapping
 
ln -s $documentroot/wikis/$mapdir $documentroot/domains/$url
 
ln -s $documentroot/mediawiki-$version $documentroot/wikis/$mapdir/wiki
 
cp -p $documentroot/wikis/$templatedir/LocalSettings.php $documentroot/wikis/$mapdir
 
cp -pR $documentroot/wikis/$templatedir/files $documentroot/wikis/$mapdir
 
</bash>
 
[[Category:Installation]]
 

Latest revision as of 22:32, 24 June 2020

Legacy.svg Legacy: This article describes a concept that has been superseded in the course of ongoing development on the Organic Design wiki. Please do not develop this any further or base work on this concept, this is only useful for a historic record of work done. You may find a link to the currently used concept or function in this article, if not you can contact the author to find out what has taken the place of this legacy item.
Procedure.svg Install a new wiki
Organic Design procedure

After a new database has been added for the wiki using the add a wiki database procedure, some files need to be added and modified.

Configuration directory

Each wiki requires a configuration directory in /var/www/wikis which contains it's LocalSettings.php file, a symlink to the MediaWiki code-base it's to use and its files as shown in the following example file structure.

/var/www/wikis/foo/
/var/www/wikis/foo/LocalSettings.php                   # Individual wiki configuration
/var/www/wikis/foo/wiki -> /var/www/mediawiki-1.13.2/  # Symbolic link to the MediaWiki code-base
/var/www/wikis/foo/files/                              # Images filesystem hash table (ensure this is writable by webserver)

LocalSettings.php and other wiki configuration files

Most of the settings required are already configured in the wikia.php script in out extensions' svn repo, but some settings such as the wiki's name, its database details and its extensions are still necessary. See our sample file LocalSettings.sample.php which covers most of the common conventions for a wiki intended for Organic Design wiki organisation use. One other related file is wikia.i18n.php which contains all the internationalised messages used by OD wiki organisational systems.

Domain configuration

Add a symlink for the domain(s) the new wiki should be accessible from. If the domain is pointed at the server using a wild-card, then no DNS configuration will be necessary, but otherwise an A-record will need to be created for the sub-domain, or a completely new domain may need to be set up, in which case see set up a new domain name.

Once the domain/sub-domain is pointing at the server, then it is routed to the correct wiki by adding a symlink in /var/www/domains which has the same name as the domain and links to the configuration directory for the new wiki in /var/www/wikis for example:

ln -s /var/www/wikis/foo /var/www/domains/foo.com

Populate wiki content

  • skin
  • sidebar tree
  • common CSS and JS

See also