For a typical load balancing setup multiple content mirrors need to be setup to serve the dynamic web pages from MediaWiki. This page is a description of how to set one of these mirrors up.
Basic InfoEdit
Basically, a content mirror is composed of:
-
- Apache web server with PHP
- Access to shared content (images, PHP session info, etc...)
- Copy of mirrored sites source code (UESP)
- Lighttpd web server if image/file content is to be mirrored
Ideally all content servers should contain identical, or nearly identical, software versions and configurations to minimize any differences between the served content.
Basic SetupEdit
User and GroupsEdit
Recreate the necessary user and groups on the content mirror.
groupadd -g 502 apache groupadd -g 505 uesp groupadd -g 504 backup adduser -g apache -M -u 502 apache adduser -g uesp -M -u 505 uesp adduser -g backup -M -u 504 backup
Ensure that any user or group to be shared among the content servers have the same ID.
Copy/InstallEdit
Copy from an existing content or install fresh the following:
-
- Copy of UESP site source and resource files (this does not include the Wiki images)
- Apache (1.3.37)
-
- Create /var/log/apache
- PHP (5.1.16)
- Lighttpd (1.4.15)
- Memcached (?)
Apache SetupEdit
-
- Apache 1.3.37
- PHP 5.1.6
Edit
All content mirrors need the same read/write access to certain files. This includes
-
- Wiki Images
- PHP session info
NFS Mirror SetupEdit
See NFS Setup for how to setup NFS on the server and client.
Load BalancingEdit
All load balancing will be setup from the squid cache servers.
Temp NotesEdit
-
- Add new server IP to NFS exports file and hosts.allow
- Add new server to DB permissions
- lighttpd log directory and owner apache
- Wiki file cache directory
- PHP eaccelerator cache path
- Tidy installation
- mail?
- test