Difference between revisions of "Talk:Install a new wiki"

From Organic Design wiki
(Add-db)
 
Line 54: Line 54:
 
cp -pR $documentroot/wikis/$templatedir/files $documentroot/wikis/$mapdir
 
cp -pR $documentroot/wikis/$templatedir/files $documentroot/wikis/$mapdir
 
</bash>
 
</bash>
 +
 +
=== Add-db ===
 +
 +
*Takes one of the empty-x.xx.sql files and creates a new wiki from it with the given db name and prefix
 +
*Or it can take an existing wiki db/prefix as the source instead of a empty-x.xx
 +
*The --sysop param is to set the sysop name and pwd for the new wiki

Latest revision as of 00:58, 26 April 2010

from windows

Prerequisite
  • FTP
  • Geany
  • Database
Exercise
  • download latest version of mediawiki
  • set up database (must have access to client's server)
  • upload the wiki via FTP
  • run the config (example: http://localhost/wiki/config)


  • Add a wiki database
  • cp -pR template
  • create a LocalSettings.php and set ownership to www-data so they can be filesync'd if you like
    • 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
ln -s /var/www/wikis/foo /var/www/domains.foo.com

Script for automation later

Creating wikia structure automatically

<bash> url=foo.com documentroot=/var/www/ mapdir=fodda templatedir=template version=1.11.0

  1. 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

  1. 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>

Add-db

  • Takes one of the empty-x.xx.sql files and creates a new wiki from it with the given db name and prefix
  • Or it can take an existing wiki db/prefix as the source instead of a empty-x.xx
  • The --sysop param is to set the sysop name and pwd for the new wiki