13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 1 ■ SAVING YOURSELF EFFORTIn Ubuntu, the directory is /var/lib/mediawiki.Now you can set up the second install (you can repeat this as often as you like, for as many wikisas you like). Here, /main/wiki is the directory where you’ve put your first install (what http://server.example.com/wiki points to, which in the previous example would be /var/lib/mediawiki), and/new/wiki is where you want your second (or third or...) install, which is where http://server.example.com/wiki2 points to.cd /new/wikiln -s /main/wiki/* .rm images config LocalSettings.phpcp -r /main/wiki/images .cp -r /main/wiki/config .This sets up most of the files to simply use the already installed ones but copies across the imagesand config directories, which must be independent in order to be able to set different configurationoptions for the different wikis and to keep the images separate. (If your wikis are closely linked, youmight prefer to have a shared image directory, but bear in mind that this will mean you can’t use genericnames, such as logo.jpg, for any files that are not the same for all the wikis sharing the image directory.)LocalSettings.php is generated when you install, so you don’t need to copy that.Set the ownership on the files and directories (including /new/wiki itself) to be correct for your webserver:chown -R wwwdata /new/wiki■ Note The www-data username is correct for a default Debian install but may not be correct for your setup.If you have permissions problems, check the ownership on /main/wiki (or any other working web directory) withls -ld /main/wiki and substitute for www-data as appropriate.Next you need to reconfigure Apache to deliver this new directory. Copy the existing MediaWikiconfig file:sudo cp /etc/mediawiki/apache.conf /etc/mediawiki/apache-wiki2.confln -s /etc/mediawiki/apache-wiki2.conf /etc/apache2/conf.d/mediawiki2.confEdit the /etc/mediawiki/apache-wiki2.conf file to change all occurrences of /main/wiki to/new/wiki, and then restart Apache (/etc/init.d/apache2 force-reload).Now you can do the final wiki setup. Go to http://server.example.com/wiki2/, and click“setup wiki.”The first page (as shown in Figure 1-1) asks for a wiki name (for example, MySAWiki), e-mailcontact, and license settings and then requires you to set an admin password. There’s a memcachedoption; for a small wiki, there’s no need to use caching.4Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!