Install web-cp 0.6 on Ubuntu 6.06+ Dapper

Warning: DO NOT RUN 0.6 IN PRODUCTION YET

(based on the CentOS4 entry)

Before you begin
  1. Read the previous warning, do not install 0.6 unless you know what you are doing. Most likely, you'll want to use these instructions: FedoraCore1
  2. Run apt-get update && apt-get upgrade to ensure that all packages are up to date.
  3. Note that steps marked with an asterisk (*) are optional.
  4. Note that these instructions are for installing the 0.6 development version of web-cp. This version is not supported, will break, will not be upgradable and is for development only at this time.

Prepare system

Web-cp needs some packages that are not available in "main" branch of Ubuntu. To install these anyway, you'll have to add the "universe" branch. To do this, open up /etc/apt/sources.list and uncomment the four lines that end in "universe

Now you need to install some requires packages, namely
  • php5-cli
  • php5-mysql
  • mysql-server
None of the following packages are absolutely required, but you'll want them for a usable system
  • apache2
  • libapache2-mod-cband
  • php5
  • sendmail (this package is in universe)
  • bind9 or mydns-mysql (this package is in universe)
  • vsftpd (recommended) or proftpd

Web-cp also needs a user and group to run as, preferably both "webcp"

groupadd webcp
useradd -s /bin/false -g webcp -d /home/webcp -c "webcp user" webcp

Install web-cp

Download and copy web-cp to the correct location

cd /root
cvs -d :pserver:guest@cvs.web-cp.net:/usr/local/cvsroot login
cvs -d :pserver:guest@cvs.web-cp.net:/usr/local/cvsroot checkout webcp-0.6
mv webcp-0.6/webcp /home/ -f
chown webcp:webcp /home/webcp -R
chown root:root /home/webcp/server -R
chmod 755 /home/webcp
chmod 777 /home/webcp/tag
chmod 755 /home/webcp/server/webcp.php
chmod 755 /home/webcp/server/webcp-httpd.php
chmod 755 /home/webcp/server/data -R

Copy the init file

cp /home/webcp/server/webcp-init.php /etc/init.d/webcp
chmod 755 /etc/init.d/webcp

Create the necessary log and pid files

touch /var/log/webcp.log
chown webcp.webcp /var/log/webcp.log
chmod 600 /var/log/webcp.log
touch /var/log/webcp-access
chown webcp.webcp /var/log/webcp-access
chmod 777 /var/log/webcp-access
mkdir -p /var/run/webcp
chown webcp:webcp /var/run/webcp
chmod 777 /var/run/webcp

Start webcp (ignore any mysql warnings you receive at this point)

/etc/init.d/webcp start

Go to http://YOUR.SERVER.IP.ADDRESS:81/ and complete the setup.

Afterwards, edit config.php ( nano /home/webcp/config.php ) and add $cfg['httpd_user'] = 'webcp'; before the ?>. Then restart webcp using

/etc/init.d/webcp restart