Difference between revisions of "Wiki setup"

From Klaus' wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
Execute these commands creating a new domain (substituting klaus with the actual name):
 
Execute these commands creating a new domain (substituting klaus with the actual name):
  
cd /etc/httpd/conf/domains/
+
<source lang="bash">
# take a copy of a working config file
+
cd /etc/httpd/conf/domains/
cp morten.ede.hih.au.dk klaus.ede.hih.au.dk
+
# take a copy of a working config file
# Edit the file to match the new domain name.
+
cp morten.ede.hih.au.dk klaus.ede.hih.au.dk
# 1,$s/klaus/newname/g
+
# Edit the file to match the new domain name.
vi klaus.ede.hih.au.dk  
+
# 1,$s/klaus/newname/g
# Instruct apache to reload its config files
+
vi klaus.ede.hih.au.dk  
service httpd reload
+
# Instruct apache to reload its config files
 +
service httpd reload
 +
</source>
  
 
Execute these commands (substituting klaus with the actual name):
 
Execute these commands (substituting klaus with the actual name):
  
  cd /var/www/html/
+
<source lang="bash">
  mkdir klaus.ede.hih.au.dk
+
cd /var/www/html/
  # Download the latest edition
+
mkdir klaus.ede.hih.au.dk
  wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.3.tar.gz
+
# Download the latest edition
  cd klaus.ede.hih.au.dk/
+
wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.3.tar.gz
  ln -s ../mediawiki-1.15.3.tar.gz .
+
cd klaus.ede.hih.au.dk/
  tar zxvf mediawiki-1.15.3.tar.gz  
+
ln -s ../mediawiki-1.15.3.tar.gz .
  mv mediawiki-1.15.3/* .
+
tar zxvf mediawiki-1.15.3.tar.gz  
  rm mediawiki-1.15.3.tar.gz  
+
mv mediawiki-1.15.3/* .
  chown -R apache:apache *
+
rm mediawiki-1.15.3.tar.gz  
 +
chown -R apache:apache *
 +
</source>
  
 
Open a browser pointing to the new wiki (here: klaus.ede.hih.au.dk) and configure the bits and pieces (user the mysql root account to create the new database which preferably should be named like klaus_wikidb).
 
Open a browser pointing to the new wiki (here: klaus.ede.hih.au.dk) and configure the bits and pieces (user the mysql root account to create the new database which preferably should be named like klaus_wikidb).
 
+
 
  mv config/LocalSettings.php .
+
<source lang="bash"> 
 +
mv config/LocalSettings.php .
 +
</source>
  
 
Open the LocalSettings.php file and edit as described below:
 
Open the LocalSettings.php file and edit as described below:
 +
 +
Change the line:
 +
<source lang="php">
 +
$wgEnableUploads      = false;
 +
</source>
 +
to
 +
<source lang="php">
 +
$wgEnableUploads      = true;
 +
</source>
  
 
Add these lines (fix the date):
 
Add these lines (fix the date):
  
## Inserted by KK 2010 04 28
+
<source lang="php">
+
## Inserted by KK 2010 04 28
# Disable reading by anonymous users
+
 
#$wgGroupPermissions['*']['read'] = false;
+
# Disable reading by anonymous users
+
#$wgGroupPermissions['*']['read'] = false;
# But allow them to read e.g., these pages:
+
 
$wgWhitelistRead =  array ( "Main Page", "Special:Userlogin", "Wikipedia:Help");
+
# But allow them to read e.g., these pages:
+
$wgWhitelistRead =  array ( "Main Page", "Special:Userlogin", "Wikipedia:Help");
# Disable for everyone.
+
 
$wgGroupPermissions['*']['edit']              = false;
+
# Disable for everyone.
+
$wgGroupPermissions['*']['edit']              = false;
# Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.
+
 
$wgGroupPermissions['user']['edit']          = false;
+
# Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.
+
$wgGroupPermissions['user']['edit']          = false;
# Make it so users with confirmed e-mail addresses are in the group.
+
 
$wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED;
+
# Make it so users with confirmed e-mail addresses are in the group.
+
$wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED;
# Hide group from user list.
+
 
$wgImplicitGroups = array( 'emailconfirmed' );
+
# Hide group from user list.
+
$wgImplicitGroups = array( 'emailconfirmed' );
# Finally, set it to true for the desired group.
+
 
$wgGroupPermissions['emailconfirmed']['edit'] = true;
+
# Finally, set it to true for the desired group.
$wgGroupPermissions['user']['upload'] = false;
+
$wgGroupPermissions['emailconfirmed']['edit'] = true;
$wgGroupPermissions['emailconfirmed']['upload'] = true;
+
$wgGroupPermissions['user']['upload'] = false;
+
$wgGroupPermissions['emailconfirmed']['upload'] = true;
$wgLogo="/mylogo.png";
+
 
+
$wgLogo="/mylogo.png";
$wgStrictFileExtensions = false;
+
 
$wgFileExtensions = array_merge($wgFileExtensions,array('pdf', 'tar', 'tgz'));
+
$wgStrictFileExtensions = false;
 +
$wgFileExtensions = array_merge($wgFileExtensions,array('pdf', 'tar', 'tgz'));
 +
</source>
  
 
Create your self as a user and test the wiki.
 
Create your self as a user and test the wiki.
 +
 +
See also:
 +
 +
[[Graphical overview installation]]
 +
 +
[[Source code syntaxhighlighter installation]]
 +
 +
[[ConfirmAccount configuration]]

Latest revision as of 16:45, 23 February 2011

Login on kalashnikova.hih.au.dk as root

Execute these commands creating a new domain (substituting klaus with the actual name):

cd /etc/httpd/conf/domains/
# take a copy of a working config file
cp morten.ede.hih.au.dk klaus.ede.hih.au.dk
# Edit the file to match the new domain name.
# 1,$s/klaus/newname/g
vi klaus.ede.hih.au.dk 
# Instruct apache to reload its config files
service httpd reload

Execute these commands (substituting klaus with the actual name):

cd /var/www/html/
mkdir klaus.ede.hih.au.dk
# Download the latest edition
wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.3.tar.gz
cd klaus.ede.hih.au.dk/
ln -s ../mediawiki-1.15.3.tar.gz .
tar zxvf mediawiki-1.15.3.tar.gz 
mv mediawiki-1.15.3/* .
rm mediawiki-1.15.3.tar.gz 
chown -R apache:apache *

Open a browser pointing to the new wiki (here: klaus.ede.hih.au.dk) and configure the bits and pieces (user the mysql root account to create the new database which preferably should be named like klaus_wikidb).

 
mv config/LocalSettings.php .

Open the LocalSettings.php file and edit as described below:

Change the line:

$wgEnableUploads       = false;

to

$wgEnableUploads       = true;

Add these lines (fix the date):

## Inserted by KK 2010 04 28

# Disable reading by anonymous users
#$wgGroupPermissions['*']['read'] = false;

# But allow them to read e.g., these pages:
$wgWhitelistRead =  array ( "Main Page", "Special:Userlogin", "Wikipedia:Help");
 
# Disable for everyone.
$wgGroupPermissions['*']['edit']              = false;
 
# Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.
$wgGroupPermissions['user']['edit']           = false;
 
# Make it so users with confirmed e-mail addresses are in the group.
$wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED;
 
# Hide group from user list.
$wgImplicitGroups = array( 'emailconfirmed' );
 
# Finally, set it to true for the desired group.
$wgGroupPermissions['emailconfirmed']['edit'] = true;
$wgGroupPermissions['user']['upload'] = false;
$wgGroupPermissions['emailconfirmed']['upload'] = true;
 
$wgLogo="/mylogo.png";
 
$wgStrictFileExtensions = false;
$wgFileExtensions = array_merge($wgFileExtensions,array('pdf', 'tar', 'tgz'));

Create your self as a user and test the wiki.

See also:

Graphical overview installation

Source code syntaxhighlighter installation

ConfirmAccount configuration