[PREV] | [UP] | [NEXT]

Setting up DISC Hosting

Now that the ldap database is configured, we can setup the rest of DiscHosting.

First, we will need to make some directories:
/var/log/discThis is where disc stores its logfiles.
/var/apache/virtual.conf.dThis is where disc writes its apache virtual hosts
/var/lib/discThis is where disc stores a timestamp to compare with ldap records.
/hostingThis is where all the webdirectories and userdata gets stored. You will probably want this to be a seperate filesystem.

Next set the ldap admin password in /etc/ldap.secret and set this file to be readable only by root

cd into /usr/local/discadmin/php/inc/ and copy config.php.template to config.php. Edit config.php:

cd into /usr/local/discadmin/daemon/ and copy config.pm.template to config.pm. Edit config.pm:

Now it's time to install some more software. Install the following, using the standard (debian) configuration. If you configured not to use a package, or configured extra packages in the config file above, change this list:

Set the mysql root password and save it in /root/.my.cnf:
c:/usr/local/discadmin/daemon# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.18-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SET PASSWORD FOR root@localhost=PASSWORD('mypassword');
Query OK, 0 rows affected (0.00 sec)

mysql> Bye
Contents of /root/.my.cnf:
[mysqladmin]
password      = mypassword
user          = root
[mysql]
password      = mypassword
user          = root
[mysqldump]
password      = mypassword
user          = root

If you enabled SSH-access, you will need a chroot.tar.gz file to create the change-rooted environment. You can download this from here or create your own. Note that if this file does not exist and ssh is enabled, the discdaemon will give errors!

Configure /etc/nsswitch.conf to use ldap for passwd,group and shadow like this:
passwd: 	files ldap
group:		files ldap
shadow:		files ldap

Run apt-get install libnss-ldap and fill in the vmail-user and admin users accounts when asked. If something goes wrong, you can configure /etc/libnss-ldap.conf by hand. Compare your file with /examples/libnss-ldap.conf

Now its time to test the ldap daemon. Go to /usr/local/discadmin/daemon and run ./discrunner. If you get errors on the prompt, see if libraries are missing and install them if necessary. There might also be a mistake in your config file. If there are no errors on the command line, check the logfiles in /var/log/disc. error.log should contain error messages, runner.logshould tell you the actions that were taken (depending on the debuglevel you defined).

Run ./discrunner untill it exits without creating errors. Remove /var/lib/disc/timestamp and /hosting/testing and try again, untill no errormessages are created.

Start ./discdaemon. Again, check commandline and logfile for errors. If this works, stop discdaemon with CTRL-C. Copy discdaemon-init.d to /etc/init.d/discdaemon and start /etc/init.d/discdaemon start

[PREV] | [UP] | [NEXT]