Appliance:MediaWiki Appliance
From rPath Wiki
|
An appliance that bundles up PHP, MySQL, Apache, MediaWiki and the rPath Appliance Platform (rAP) to provide a self-contained, turn-key, updateable Wiki appliance.
After a simple web-based configuration step, you'll be up and running and able to create and manage content collaboratively.
Installation
Step 1 is to download an appliance image from the Releases page of the rBuilder Online project. You can select from VMWare, Xen virtual appliance, ISO CD or raw Hard Disk image formats.
| For more information on using rPath-based appliances with various virtual machine technologies, see Using rBuilder Images with Virtual Machines |
ISO CD images are for installation directly onto a physical machine. The installation runs with a standard Anaconda based graphical installer and will prompt to format your hard drives, etc. Follow the instructions on screen.
Raw HDD images are useful with virtual machine formats such as Parallels Workstation or QEMU. Simply create a new virtual machine in Parallels or QEMU and, when asked for the hard drive, tell it to use the downloaded .img file as the hard drive image file.
VMware is the easiest to try using either the free VMWare Player or VMWare Workstation.
Xen virtual appliance images can be run under any Xen-based host system (Xen Dom0). If you do not already have a Xen Server, consider using the rPath Linux based Xen Server Appliance (Xen Dom0 Server)
Passwords
For those of you that just have to know what the passwords for this appliance are and can't wait, here's the skinny:
| purpose | userid | password |
|---|---|---|
| console | root | <no password> |
| rAP | admin | password |
However, we're trying to get this appliance to the point where you really won't need a console login at all. Hence, the rAP userid and password is the only one you should require.
Configuring
The MediaWiki appliance requires two steps to configure
- Run the MediaWiki web-based configuration wizard
- Reboot the appliance
Additionally, with the rPath Appliance Platform is included, you should also configure rAP the first time.
MediaWiki Configuration Wizard
The MediaWiki appliance reports its IP address and access URL on the console at boot time. There is no need to log in to obtain this information.
Point a browser at
http://<appliance_ip>/wiki/
You will be prompted to configure MediaWiki. Answer all the questions as you wish for your config. Note that MySQL is included in the MediaWiki Appliance, so you should leave the setting for the location of the database server as localhost. (You can also change this to use an existing database server elsewhere if you wish)
When using the built-in MySQL instance, the root password is initially empty. Thus, you should answer the very last question by deleting the * from the password field. (You can change the root password, naturally - see changing the root password below.)
Configure rPath Appliance Platform
rPath Appliance Platform provides a range of configuration and management functions for a software appliance through a remotely accessible web interface. Access rAP using the following URL, replacing <appliance_ip> with the IP address or hostname of the appliance:
https://<appliance_ip>:8003/
The initial rAP username is admin with a password of password. On the first login to rAP, change this password as prompted and step through the configuration wizard to configure some other important settings.
See the Appliance Administration pages for reference and instructions on each administrative function available on the appliance, including the functions provided in rAP.
Reboot
After configuration is complete, the MediaWiki configuration page will instruct you to move the file config/LocalSettings.php.
Ignore this instruction - instead, simply reboot your appliance and it will move the configuration file for you.
There are two ways to reboot cleanly - using the rPath Appliance Platform (rAP) web-based UI or via the command line.
Rebooting with rAP
To reboot via rAP, login via the web to https://<appliance_ip>:8003/ and select the Schedule Reboot menu option.
Rebooting via command line
To reboot the appliance via the command line, login with user id root and enter the command
shutdown -r now
After rebooting
Once the appliance comes back up you should now be done and can simply go to
http://<appliance_ip>/wiki
to begin creating and editing Wiki content!
Administration
While this appliance is designed to be self-contained and require minimal care and feeding, some basic adminstration tasks that you may want to perform are documented below.
Change the Root Password
The root user password on the appliance is initially empty (no password). To change this, use Configure Root Password in rAP or run passwd root on the appliance. Follow the prompts to update the root password.
Configure Networking
The appliance is set to use DHCP to obtain its network address automatically. Change the network configuration if necessary using the Configure Networking in rAP.
Uploading files
While the MediaWiki appliance is designed to be self-contained and for all content to be created and managed through the MediaWiki web user interface, advanced users will want to upload new skins and add extensions.
One of the goals of an appliance is to have "just enough" software to run the function of the appliance. One of the other goals is to allow for administration without needing to know anything beyond the core functions of the appliance. These goals often conflict with the need to support customization.
For this reason, this appliance does NOT include ftp support out of the box. However, it can be easily added by a knowledgable user via the conary package management system.
However, due to popular demand, as of release 1.1.2, this appliance does include ssh and scp support. Also, vi has been added for convenience.
Note that if you add additional packages, future updates using the rPath Appliance Agent will remove these packages. As stated, one of the goals of an appliance is to define the software stack and maintain it's integrity without the user needing to know anything about the underlying operating system itself. You can avoid this outcome by using the conary updateall command line to update your customized appliance, or by modifying the /etc/raa/prod.cfg file and changing updatetroves.migrate = True to updatetroves.migrate = False. See the notes on updates below.
|
Using ssh/scp
The MediaWiki Appliance now includes ssh and scp support by default. However, you must start the sshd service to allow logins.
To do this, log in as root on the console and issue
service sshd start
If you wish to have ssh support remain on the appliance, you can cause sshd to start automatically on reboot by issuing
chkconfig sshd on
Adding vsftpd
To add vsftpd:
conary update vsftpd --resolve service vsftpd start
And then there's additional config needed for vsftpd itself (user permissions, etc.)
After you've copied your files to the appliance, consider removing this tool with
conary erase vsftpd
If you wish to have vsftpd support remain on the appliance, you can cause vsftpd to start automatically on reboot by issuing
chkconfig vsftpd on
Updates
Unlike software appliances based on "snapshot" techniques, appliances built with rPath technologies can updated incrementally as new features are added by the development team. Launch updates during remote administration through the rPath™ Appliance Platform, or bypass the rPath Appliance Platform to use a direct command.
Update with rPath Appliance Platform
If you have updated to at least version 1.1 (July 28, 2006) of this appliance, you can use the rPath Appliance Platform Agent to update remotely using a web interface. The rPath Appliance Platform Agent interface can be accessed using:
https://<appliance_ip_or_hostname>:8003/
See the rPath Appliance Platform User Guide for full instructions.
Update with Conary Commands
If you have downloaded a version of the appliance without the rPath Appliance Platform, login to your appliance as root and issue the command:
conary updateall
This command will update the appliance, including adding the rPath Appliance Platform. If you have added other packages using conary update, they will remain on the system.
Adding more disk space (VMware)
If you're using the VMware ® version of this appliance, and you have VMware Workstation, you can add more disk space as follows:
- Take a snapshot of your existing VM as a safety precaution.
- Shutdown the VM cleanly.
- Add the new virtual disk in Workstation's VM -> Settings menu.
- Startup the VM.
- Login as root
- Create a partition table on the new disk using fdisk. This is an interactive tool, so you're going to need to answer a few questions.
- choose n for "new partition"
- choose p for "primary"
- type 1 for the partition number
- accept the default start and end options (hit Enter twice)
- choose w to "write the partition table"
- Make a filesystem on the new partition
- Mount the filesystem on a temporary location
- Copy all the /srv contents to the new partition
- Move the old contents out of the way
- Add a line to /etc/fstab to cause your new partition to be mounted at boot
- Reboot
Either use rPath Appliance Agent Web UI or login as root and issue:
shutdown -h now
Choose SCSI for the virtual hardware.
Make it growable to whatever maximum you desire.
fdisk /dev/sdb
mkfs.ext3 /dev/sdb1
mount /dev/sdb1 /mnt
cp -rp /srv/* /mnt
mkdir /srv.old; mv /srv/* /srv.old
Either use echo to append a line, or use vi to edit if you're comfortable with vi
echo '/dev/sdb1 /srv ext3 defaults 1 1' >> /etc/fstab
shutdown -r now
After rebooting, you can confirm that your disk setup now has the new disk on the /srv directory mount point by typing on the command line:
df -h
You should see something like
Filesystem Size Used Avail Use% Mounted on /dev/sda1 512M 256M 256M 50% / none 126M 0 126M 0% /dev/shm /dev/sdb1 7.9G 73M 7.5G 1% /srv
After confirming that the contents have all been copied correctly, you can remove the backup data:
rm -rf /srv.old
How to use an ESX vmx file
Copy the file to storage that is available to your ESX server. Then add the virtual machine to the inventory by going to the configuration tab, storage, and then selecting your storage, right clicking on it Browse Datastore, open the folder and then right click on the mediawiki-1.0-x86_64.vmx file and selecting 'Add to inventory'
Support
MediaWiki Appliance is a community supported project. Questions about MediaWiki Appliance should be raised on the MediaWiki Appliance discussion list
You can also discuss the project using the discussion tab in this wiki.

