Middlebury

Difference between revisions of "MediaWiki Administration"

(Created page with "= Installing MediaWiki on a new production host = 1. (Option A) Copy the ssh public/private key pair from the old host to the new host: <pre>scp /root/.ssh/id_* newhost:/root/.s...")
 
Line 8: Line 8:
 
2. Clone the repository to <code>/var/www/mediawiki/</code>
 
2. Clone the repository to <code>/var/www/mediawiki/</code>
 
<pre>cd /var/www/
 
<pre>cd /var/www/
git clone git@chisel.middlebury.edu:mediawiki.git</pre>
+
git clone git@chisel.middlebury.edu:mediawiki.git
 +
cd mediawiki
 +
git submodule update --init</pre>
  
 
3. Find all of the image directories on the old host with:
 
3. Find all of the image directories on the old host with:
Line 15: Line 17:
 
<pre>rsync -av --delete oldhost:/path/to/mediawiki/webroot/wikis/CCP/images/ /newpath/to/mediawiki/webroot/wikis/CCP/images/</pre>
 
<pre>rsync -av --delete oldhost:/path/to/mediawiki/webroot/wikis/CCP/images/ /newpath/to/mediawiki/webroot/wikis/CCP/images/</pre>
 
Then run all of the rsync commands. Note: Adding the new host's public key to the old host's <code>~/.ssh/authorized_keys2</code> file will allow you to run all of the rsync commands without entering your password many times.
 
Then run all of the rsync commands. Note: Adding the new host's public key to the old host's <code>~/.ssh/authorized_keys2</code> file will allow you to run all of the rsync commands without entering your password many times.
 +
 +
4. Add the Apache virtual-host configuration to <code>/etc/httpd/conf.d/vhost.conf</code>. Restart Apache.

Revision as of 11:25, 29 February 2012

Installing MediaWiki on a new production host

1. (Option A) Copy the ssh public/private key pair from the old host to the new host:

scp /root/.ssh/id_* newhost:/root/.ssh/

1. (Option B) Create a new ssh key pair on the new host with ssh-keygen and add its public key to the gitosis configuration on chisel.

2. Clone the repository to /var/www/mediawiki/

cd /var/www/
git clone git@chisel.middlebury.edu:mediawiki.git
cd mediawiki
git submodule update --init

3. Find all of the image directories on the old host with:

find mediawiki/webroot/wikis -type d -name images

Then take that list and search/replace each line into an rsync command:

rsync -av --delete oldhost:/path/to/mediawiki/webroot/wikis/CCP/images/ /newpath/to/mediawiki/webroot/wikis/CCP/images/

Then run all of the rsync commands. Note: Adding the new host's public key to the old host's ~/.ssh/authorized_keys2 file will allow you to run all of the rsync commands without entering your password many times.

4. Add the Apache virtual-host configuration to /etc/httpd/conf.d/vhost.conf. Restart Apache.