Setting Up a Server Link

System Setup and Requirements

The WebEnabled Server Link software runs on top of the Owl Linux distribution.

Ideally, an Owl installation should be in a completely fresh install for the script to work properly. That is, no changes made to the system after the Owl installer completed its job and the system rebooted properly (no new users created, no additional apps installed). These are the conditions under which the script has been tested thus far. After describing the installation procedure this article will explain what may be done for using the script on an Owl system that is not recently installed.

The same script works both for Owl installed natively and in an OpenVZ VPS. Actually, the latter was the way we tested it, because we did not have a fresh native Owl install. The behavior of the script on a "real" Owl install should not be any different.

With some adjustments, the same script can be used for Owl installed in chroot, but we have not work on this variation (yet).

Full instructions for installing OWL are available.

Installation Instructions

Below is the procedure for a fresh, natively installed Owl system.

We assume that you have a fresh Owl system installed:

1. DOWNLOADING AND UNPACKING THE TARBALL WITH WEBENABLED AND INSTALL SCRIPT

Once logged in as root:

localhost!root:~# lftpget http://dist.mars-grg.webenabled.com/webenabled-dist-XXXX.tgz
localhost!root:~# tar zxf webenabled-dist-XXXX.tgz
localhost!root:~# ls
webenabled-dist-20090114 webenabled-dist-XXXX.tgz
localhost!root:~# cd webenabled-dist-XXXX
localhost!root:~/webenabled-dist-XXXX#

2. RUNNING THE INSTALL SCRIPT

localhost!root:~/webenabled-dist-XXXX# ./install.sh
Unpacking files
Installing opt
Installing etc/ld.so.conf.d
Installing etc/rc.d/init.d
Installing etc/skel.sql
Installing etc/logrotate.d
Installing etc/httpd
Installing home/clients/websites
Installing home/clients/databases
Installing home/r_we
Installing var/log
Installing usr/local/bin
Installing usr/local/sbin
Running ldconfig
Installing RPMS
Modifying rc.local
Enabling services
Creating special groups
Creating special users
Creating symlinks
Setting UID_MIN in /etc/login.defs to 1000
Generating public/private rsa1 key pair.
Your identification has been saved in /opt/webenabled/config/ssh/local.
Your public key has been saved in /opt/webenabled/config/ssh/local.pub.
The key fingerprint is:
cc:42:4f:59:05:19:06:b2:de:7f:87:72:3c:95:38:0d local webenabled administration
Starting apache
[Wed Jan 14 11:11:53 2009] [warn] NameVirtualHost *:443 has no VirtualHosts
WebEnabled successfully installed

3. POSSIBLE PROBLEMS WITH RUNNING THE INSTALL SCRIPT

So far, so good. But what will happen if we try this script on a not-so-fresh Owl system? Like one where some of the software that the scripts tries to install is already present?

localhost!root:~/webenabled-dist-XXXX# ./install.sh
Installing opt
ERROR: /opt/apache exists. Are you trying to install WE twice? If not, please remove /opt/apache and try again

The script is dumb. It's not a package manager and cannot tell whether apache is installed or not. It's just tries to copy files and fails if the files are already there.

So, what are conditions under which the script would succeed on a non-fresh Owl system that has been used for some time, has additional apps, config changes and so on? Here is an outline:

a) Files or directories present in files.tar must not exist on the system. The reason why webenabled-dist-20090114 contains one more archive, files.tar, instead of the files theirselves, is that files.tar must be unpacked using 'tar xpf', but not just 'tar xf', because file permissions must be preserved. This can be better remedied using mtree(8), but for now it's just files.tar which is unpacked by install.sh properly.

b) Various symlinks created in /usr/local/bin must not exist. There are a lot of symlinks to be created, such as 'svn', 'apachectl', 'php', to name a few. So, if some of these applications are already installed, the script won't work.

The script installs software to /opt, but creates various symlinks in /usr/local/bin pointing to /opt/SOMETHING for convenience.

c) Groups created by install.sh must not exist: apache virtwww nagios weadmin w_

d) Users created by install.sh must not exist: apache w_ r_we

4. INTERACTING WITH THE NEW SERVER FROM WWW.WEBENABLED.COM

Registration info....

5. CREATING OUR FIRST VHOST ON THE NEW SERVER

Creating vhost info...

If this command succeeded, we should be able to access the newly created
vhost:

http://grg.mars-grg2.webenabled.com/

Download