Installing and Customizing MediaWiki
If you want to put the MediaWiki installation in a virtual server on an existing Apache installation, you need to modify the Apache configuration file to create a new virtual host on your system. Modern versions of HTTP require that a Web browser request a document from a specific hostname. The virtual host feature in Apache allows one Web server to serve documents for many different hostnames, even when all of the names resolve to a single IP address. If you just want to try MediaWiki without affecting the rest of your site, or if the majority of your site runs under a framework (such as Zope or Ruby on Rails) that is largely incompatible with MediaWiki, a virtual host might well be a wise move. I often use such virtual hosts to experiment with new software and configurations without potentially endangering existing, stable sites.
Apache's VirtualHost sections allow you to configure one or more such virtual servers, each with its own configuration. In configuring MediaWiki for my system, I needed the following VirtualHost section in httpd.conf:
<VirtualHost 184.108.40.206> ServerName wiki.lerner.co.il ServerAlias mediawiki.lerner.co.il wikipedia.lerner.co.il ServerAdmin email@example.com DocumentRoot /usr/local/apache/v-sites/wiki.lerner.co.il/www/ DirectoryIndex index.php CustomLog /usr/local/apache/v-sites/wiki.lerner.co.il/logs/access-log combined CustomLog /usr/local/apache/v-sites/wiki.lerner.co.il/logs/referer-log referer ErrorLog /usr/local/apache/v-sites/wiki.lerner.co.il/logs/error-log </VirtualHost>
The first two lines of this VirtualHost section define the name and aliases for this new virtual server. By adding aliases, I ensure that even if people enter a different name, they will get to the right place. (Because I have asked my hosting company to alias all hostnames in the lerner.co.il domain to my server's IP address, I can add and remove new virtual hosts whenever I want, without having to modify the DNS configuration.) I then set ServerAdmin to be my own e-mail address, ensuring that error messages will direct people to me.
Next, I indicate that the root directory for the wiki—that is, where Apache should look for the PHP programs that define it—is under /usr/local/apache/v-sites, where I put all of the virtual servers on my machine. Each site then gets a subdirectory according to its name, with two directories (www and logs) under that. So in the above configuration, I have defined the DocumentRoot to be under v-sites/wiki.lerner.co.il/www, and I have put the access, referer and error logs under v-sites/wiki.lerner.co.il/logs.
Once I have added the above configuration to httpd.conf, I restart Apache. At this point, I'll get an error if I go to http://wiki.lerner.co.il, as I haven't yet installed the software.
To install the MediaWiki software, I download the latest .tar.gz file, and open it in the v-sites/wiki.lerner.co.il:
cd /usr/local/apache/v-sites/wiki.lerner.co.il/ tar -zxvf /downloads/mediawiki-1.5.3.tar.gz mv mediawiki-1.5.3 www
After doing that, I pointed my Web browser to http://wiki.lerner.co.il, and got a message saying that I still needed to configure the software. But the permissions weren't set quite right, meaning that MediaWiki was unable to write to its configuration directory. Rather than aborting with a hard-to-understand error message, MediaWiki kindly told me that there was a problem with the filesystem permissions, and it even reminded me how to use chmod to fix the problem.
After having changed the permissions, MediaWiki then showed me the initial configuration screen. To be honest, I didn't have to do very much; I entered the name of my wiki (ReuvenWiki), and I kept the defaults for nearly everything else. I entered a password for the WikiSysop user within the wiki system itself. And, I entered a password for the database user and also entered the password for the MySQL administrative user.
Remember, you're keeping track of three types of user names here, which can be a bit tricky. Your Linux system has one set of users and permissions, MySQL has its own set of users and permissions, and the MediaWiki software also has its own set of users and permissions. Although this might seem like overkill, it provides a great deal of flexibility, allowing you to run MediaWiki in a safe, secure environment.
Once I filled out all of the above information, I clicked on the Install! button. Unlike many Web applications, which produce output only when they have finished with their work, the MediaWiki installer kindly provides updates as the installer is running, giving you a sense of what it is doing and how much longer you might have to wait. In the end, you should (hopefully) see a note indicating that the installation was successful, and that you should move config/LocalSettings.php into the parent directory (the www directory):
mv -v config/LocalSettings.php .
Having done that, I can re-enter the URL (http://wiki.lerner.co.il) into my Web browser. And, sure enough, I'm greeted by MediaWiki's initial page, which tells me that the software has been installed successfully and points me to two pages, one for customizing the interface and another describing usage and configuration.
|Happy Birthday Linux||Aug 25, 2016|
|ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs||Aug 24, 2016|
|Updates from LinuxCon and ContainerCon, Toronto, August 2016||Aug 23, 2016|
|NVMe over Fabrics Support Coming to the Linux 4.8 Kernel||Aug 22, 2016|
|What I Wish I’d Known When I Was an Embedded Linux Newbie||Aug 18, 2016|
|Pandas||Aug 17, 2016|
- Happy Birthday Linux
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs
- What I Wish I’d Known When I Was an Embedded Linux Newbie
- Updates from LinuxCon and ContainerCon, Toronto, August 2016
- New Version of GParted
- Returning Values from Bash Functions
- All about printf
- NVMe over Fabrics Support Coming to the Linux 4.8 Kernel
- A New Project for Linux at 25
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide