Last modified 6 years ago Last modified on 11/10/10 14:57:34

The server is due to go offline in November 2010, the NewLiveServer took over at the start of November 2010.

The live server, has as it's primary IP address and also (the old live server is on for now), it is provided by

The sites running on are | |

And on | There is a subdomain of the main site at | This sub-site shares the code base and some of the database tables for the live site, but additionally has its own database and files folders.

The server is a virtual server running FreeBSD 7.2-RELEASE #0, it has 4Gb of RAM (found via this script), 1Gb is available to the virtual server, burstable to 3 GB. The machine has two Xeon 3.2 GHz processors and the storage space available is 5Gb and the bandwidth allowed is 20Gb per month.

There are munin stats for the server.

The migration from the old live server to the new one is being tracked on ticket #97.


The gaia script for backing up the Mysql databases is /root/sbin/ and it contains:

BACKUP=/var/backups/mysql_backup.`date +%a`.sql.gz
/usr/local/bin/mysqldump -h localhost -u root -pXXX --all-databases | /usr/bin/gzip -c > $BACKUP

# backup to the development server, see ~/.ssh/config
scp $BACKUP kiwi:new-live-data/var/backups/

# file system backup
/usr/local/bin/rsync -qaz \
                     /web/ kiwi:new-live-data/web/

# apache config backup
/usr/local/bin/rsync -qaz /usr/local/etc/apache22/ kiwi:new-live-data/usr/local/etc/apache22/

And /root/.ssh/config contains:

Host kiwi
  User live

The Mysql backups are written to /home/live/new-live-data/var/backups and the /web/ directory containing all the sites is rsynced to home/live/new-live-data/web/ on


The following crontab for the transnetwww user ensures that regular tasks are carried out, both on the main TN site and the Workspaces sub-site:

crontab -e -u transnetwww
# m h  dom mon dow   command
*/30 * * * * /usr/local/sbin/ab -v 1 -n 1 >/dev/null 2>&1
* */1 * * * /usr/local/sbin/ab -v 1 -n 1 >/dev/null 2>&1

You can manually access the cron script to run it via using a username / password, the http version is restricted to access from the local host only, see the configuration in /usr/local/etc/apache22/extra/httpd-ssl.conf and /usr/local/etc/apache22/Includes/vhost-transnetwww.conf


phpMyAdmin is available at

This is in /usr/local/www/phpMyAdmin211 (rather than /usr/local/www/phpMyAdmin as it was on the old live server) but the config file was at /usr/local/www/phpMyAdmin together with the .htpasswd file so the following sym links were created:

cd /usr/local/www/phpMyAdmin211
ln -s ../phpMyAdmin/
ln -s ../phpMyAdmin/.htpasswd 

One line needed changing in /usr/local/www/phpMyAdmin/

/* $cfg['Servers'][$i]['host'] = ''; */
$cfg['Servers'][$i]['host'] = 'localhost';

And apache was restarted.


The following packages have been installed.


cd /usr/ports/sysutils/screen 
make config
  [ ] CJK           Treat CJK ambiguous characters as full width
  [X] INFO          Build and install info documentation
  [X] MAN           Build and install man pages
  [X] NETHACK       Enable nethack-style messages
  [X] XTERM_256     Enable support for 256 colour xterm
  [ ] HOSTINLOCKED  Print user@host in locked message
  [ ] SHOWENC       Show encoding on the status line
make install clean


cd /usr/ports/ftp/wget 
make config
  [ ] GNUTLS   Support for SSL via GnuTLS
  [X] IPV6     Support for IPv6
  [X] NLS      Native Language Support with gettext
  [X] OPENSSL  Support for SSL via OpenSSL
make install clean


cd /usr/ports/editors/vim
make config
  ===> No options to configure
make install clean


For apachectl status:

apachectl status
  lynx: not found
cd /usr/ports/www/lynx 
make config
  [X] SSL             SSL support
  [X] DEFAULT_COLORS  Colors support
  [ ] IPV6            IPv6 support
  [X] NLS             Native language support
make install clean


cd /usr/ports/net/rsync/
make config
  [ ] POPT_PORT  Use popt from devel/popt instead of bundled one
  [X] SSH        Use SSH instead of RSH
  [ ] ATIMES     Preserve access times, adds --atimes
  [X] ICONV      Add iconv support
make install clean


cd /usr/ports/devel/subversion/
make config
  [ ] MOD_DAV_SVN        mod_dav_svn module for Apache 2.X
  [ ] MOD_DONTDOTHAT     mod_dontdothat for Apache 2.X
  [X] NEON               WebDAV/Delta-V repo access module (neon)
  [ ] SERF               WebDAV/Delta-V repo access module (serf)
  [ ] SASL               SASL2 authorization support
  [X] BDB                db4 repository backend
  [ ] ASVN               Build and install Archive SVN (asvn)
  [ ] MAINTAINER_DEBUG   Build debug version
  [ ] SVNSERVE_WRAPPER   Enable svnserve wrapper
  [ ] SVNAUTHZ_VALIDATE  install svnauthz-validate
  [ ] STATIC             Build static version (no shared libs)
  [ ] GNOME_KEYRING      Build with GNOME Keyring auth support
  [ ] BOOK               Install the Subversion Book  
make install clean


Installed for perl's LWP::UserAgent to fix this error in /var/log/munin/munin-node.log:

 Can't locate object method "new" via package "LWP::UserAgent" at /usr/local/etc/munin/plugins/apache_volume line 130.
cd /usr/ports/www/p5-libwww
make config
  ===> No options to configure
make install clean


Munin was installed in order that server info could be generated on the dev server.

cd /usr/ports/sysutils/munin-node
make config
  ===> No options to configure
make install clean
  Would you like me to set up log rotation [y]? y
  Unless this file already existed, a sample configuration file
  has been placed in /usr/local/etc/munin/munin-node.conf.
  Please edit it according to your needs.
  The Munin client will *not* be started automatically. To allow it
  to start, put this line in /etc/rc.conf:
  Then, it will be started on the next boot. If this line is already
  present, the client will be started now.  Otherwise, edit
  /etc/rc.conf and execute this command:
      /usr/local/etc/rc.d/munin-node start

Then /usr/local/etc/munin/munin-node.conf was edited and the following was added:

allow ^81\.95\.52\.78$

And then the following was added to /etc/rc.conf:


And then it was started:

/usr/local/etc/rc.d/munin-node start

By default there was no apache plugins configured, so this was done:

cd /usr/local/etc/munin/plugins
ln -s /usr/local/share/munin/plugins/apache_accesses
ln -s /usr/local/share/munin/plugins/apache_processes
ln -s /usr/local/share/munin/plugins/apache_volume 
ln -s /usr/local/share/munin/plugins/df
ln -s /usr/local/share/munin/plugins/df_inode
ln -s /usr/local/share/munin/plugins/load
ln -s /usr/local/share/munin/plugins/memory
ln -s /usr/local/share/munin/plugins/multimemory
ln -s /usr/local/share/munin/plugins/mysql_bytes
ln -s /usr/local/share/munin/plugins/mysql_queries
ln -s /usr/local/share/munin/plugins/mysql_slowqueries
ln -s /usr/local/share/munin/plugins/mysql_threads
ln -s /usr/local/share/munin/plugins/netstat
ln -s /usr/local/share/munin/plugins/ntp_offset
ln -s /usr/local/share/munin/plugins/open_files
ln -s /usr/local/share/munin/plugins/processes
ln -s /usr/local/share/munin/plugins/sendmail_mailqueue
ln -s /usr/local/share/munin/plugins/sendmail_mailstats
ln -s /usr/local/share/munin/plugins/sendmail_mailtraffic
ln -s /usr/local/share/munin/plugins/swap
ln -s /usr/local/share/munin/plugins/vmstat

This error in /var/log/munin/munin-node.log

2010/07/30-11:46:26 [74194] Error output from sendmail_mailstats:
2010/07/30-11:46:26 [74194]     mailstats: /var/log/ Permission denied

Was fixed by adding the user and group for sendmail in /usr/local/etc/munin/plugin-conf.d/plugins.conf:

user root
group wheel
env.mspqueue /var/spool/clientmqueue
env.mailstats /usr/sbin/mailstats

The Mysql user 'munin' was carried over from the old live server, where it had been created using this command as the Mysql root user:

CREATE USER 'munin'@'localhost' IDENTIFIED BY '********';

And a a /root/.my.cnf file was created:

user = munin
password = ********
host = localhost

And the Mysql configuration in /usr/local/etc/munin/plugin-conf.d/plugins.conf was changed to:

user root
group wheel
env.mysqlopts --defaults-extra-file=/root/.my.cnf
env.mysqladmin /usr/local/bin/mysqladmin
env.mysqlshow /usr/local/bin/mysqlshow

The following apache configuration was carried across from the old live server, in the default VirtualHost in /usr/local/etc/apache22/httpd.conf:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost 
ExtendedStatus On

And this was tested using wget:

wget -O server-status.txt

And munin-run:

munin-run apache_accesses
  accesses80.value 266
munin-run apache_processes
  busy80.value 2
  idle80.value 8
  free80.value 246
munin-run apache_volume
  volume80.value 342016

The p5-libwww was installed so munin could access the server-status and the following was added to /usr/local/etc/munin/plugin-conf.d/plugins.conf:

user root
group wheel
env.ports 80 

The following apache config changes were also made, in /usr/local/etc/apache22/extra/httpd-info.conf and /usr/local/etc/apache22/httpd.conf

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost

The old, hacked, multimemory munin plugin (attached to this page) was copied from the old live server to /usr/local/etc/munin/plugins/multimemory.bak and a newer version which supports !FreeBSD by default was downloaded:

cd /usr/local/share/munin/plugins
wget -O multimemory
chmod 755 multimemory
cd /usr/local/etc/munin/plugins
ln -s /usr/local/share/munin/plugins/multimemory

And the following was added to /usr/local/etc/munin/plugin-conf.d/plugins.conf:

user root
group wheel
env.os freebsd
env.names httpd mysqld fcgi sendmail

The apache_activity plugin was installed:

cd /usr/local/share/munin/plugins
wget "" -O apache_activity
chown munin:munin apache_activity 
chmod 755 apache_activity 
cd /usr/local/etc/munin/plugins/
ln -s /usr/local/share/munin/plugins/apache_activity


This message in the Drupal admin interface indicated that PECL uploadprogress needed to be installed:

Your server is capable of displaying file upload progress through APC, but it is not enabled. Add apc.rfc1867 = 1 to your php.ini configuration. Alternatively, it is recommended to use PECL uploadprogress, which supports more than one simultaneous upload.


cd /usr/ports/devel/pecl-uploadprogress
make config
  ===> No options to configure
  The following line has been added to your /usr/local/etc/php/extensions.ini
  configuration file to automatically load the installed extension:


For testing email:

cd /basejail/usr/ports/mail/mutt/
make config
  ===> No options to configure
make install clean
  ===>  Cleaning for sgmlformat-1.7_2
  ===>  Cleaning for mime-support-3.48.1
  ===>  Cleaning for jade-1.2.1_9
  ===>  Cleaning for linuxdoc-1.1_1
  ===>  Cleaning for docbook-4.1_4
  ===>  Cleaning for xmlcatmgr-2.2
  ===>  Cleaning for iso8879-1986_2
  ===>  Cleaning for unzip-6.0
  ===>  Cleaning for mutt-