CentOS-RHEL4Setup

Before you start, we'd like you to know that the RPM based setup is currently rather experimental. We regularly rebuild DTC releases and its dependencies and publish it in our repository, but we rely on your questions and reports to improve it continuously, so don't be afraid to relay them to us.

These instructions will be guaranteed to work if you're using CentOS 5 or the latest Red Hat Enterprise Linux release. They may also help you if you're using Fedora-based systems or CentOS 4 / older releases, but there are no guarantees. However, we do appreciate reports on anything that failed in Fedora -- we're hopeful the same packages will, with your help and input, work just fine in all RPM-based systems eventually; that's our ultimate goal.

So, let's get on with the program. Setting up DTC in CentOS is a rather straightforward procedure which should take thirty minutes tops:

  1. Install your operating system (not convered in this HOWTO)
  2. Set up the RPMForge repository (to pull several DTC dependencies)
  3. Set up the DTC repository
  4. Install DTC and dependencies
  5. Set DTC up

Setting up the RPMForge repository

First, we need to set up the RPMForge repository on your machine. At the time of writing this HOWTO, the latest RPMForge RPM release was:

You probably want to get the latest release so peruse the right package here. Make sure the name matches your architecture (x86_64 or i386) and base system (fc7, fc8, el4, el5).

Once you've installed it, make sure you execute yum update to get your system up to date with all the packages.

Setting up the DTC repository

Once you've installed the RPMForge repository, put the following file (name it dtc.repo) in /etc/yum.repos.d/:

[dtc]
name=DTC for CentOS
baseurl=ftp://ftp.gplhost.com/yum/
gpgcheck=1
enabled=1
gpgkey=ftp://ftp.gplhost.com/yum/RPM-GPG-KEY

That sets up yum to download DTC from our repository. Note that you can replace .com by .sg if you want the Asian mirror, and .fr if you want our Europe mirror.

Installing DTC and its dependencies

OK, done that, time to install DTC. DTC requires a few things:

  • Postfix or Qmail (you should uninstall Sendmail first)
  • Courier (we provide that)
  • MLMMJ (we provide that)
  • Apache
  • PAM_MySQL (we provide that)
  • SBOX (we provide that)

and a few other packages that are built and covered by our repository manager. The point being that all you need to do is install DTC, plus a few other packages, and here's the command you need to issue as root to install DTC:

yum install dtc-core postfix courier-authlib-mysql courier-imap

After that is done, you should start your MySQL server with:

   /etc/init.d/mysqld start

then sent a root password for it with:

   /usr/bin/mysqladmin -u root password 'new-password'

Then setup an ftp server:

   yum install proftpd-mysql

In /etc/proftpd.conf, you need to uncomment the sql module this way:

   <IfModule mod_dso.c>
      LoadModule mod_sql.c
      LoadModule mod_sql_mysql.c
   #   LoadModule mod_sql_postgres.c
   </IfModule>

Also, while you're in /etc/proftpd.conf be sure to add the following two lines, insert them above the DTC part at the bottom.
(This solves an ID based permissions issue.)

    SQLMinUserUID 50
    SQLMinUserGID 50

Copy the config file for bind:

   cp /usr/share/doc/bind-9.3.3/sample/etc/named.conf /etc
   cp /usr/share/doc/bind-9.3.3/sample/etc/named.root.hints /etc
   cp /usr/share/doc/bind-9.3.3/sample/etc/named.rfc1912.zones /etc
   cp -rfv /usr/share/doc/bind-9.3.3/sample/var/named/* /var/named/

Start dns-keygen:

   /usr/sbin/dns-keygen

and copy/past the result in /etc/named.conf in the key ddns_key option. Finaly start named:

   /etc/init.d/named start

In /etc/httpd/conf.d/httpd.conf, you need to add the following directives to add the log-sql modules:

LoadModule log_sql_module modules/mod_log_sql.so LoadModule log_sql_mysql_module modules/mod_log_sql_mysql.so

Also, you have to manually start postfix with:

   /etc/init.d/postfix start

If you want to enhance your mail system, it's also nice to install amavis, clamav & spamassassin. Do this:

   yum install clamav clamd spamassassin amavisd-new
   /etc/init.d/clamd start
   /etc/init.d/spamassassin start
   /etc/init.d/amavisd start
   /etc/init.d/amavisd start

Setting up DTC

After the installation completes, run

/usr/share/dtc/admin/install/install

This program will help you reconfigure your network services so they work properly in conjunction with DTC.

After the setup, edit /etc/named.conf, and move this:

   // Configured by DTC v0.10 : please don't touch this line !
   include "/var/lib/dtc/etc/named.conf";

inside the view "external" {} option, then reload named with /etc/init.d/named reload.

So, basically that's it. If you have any questions, you can submit them to our repo manager.

Now you're ready to take your first steps within DTC.


Below this, it's obsolete, obsolete, obsolete. Sorry for the mess!


""CVS INSTRUCTIONS:""

  1. Login and checkout dtc from CVS
    cvs -d :pserver:anonymous@gplhost.com:/var/lib/cvs login # (password is anoncvs)
    cvs -d :pserver:anonymous@gplhost.com:/var/lib/cvs checkout dtc
    cvs logout
    # Make DTC binary packages
    cd dtc/bin
    fakeroot ./makeRedHat

[I've collected all the dependency files i used during my install, if the admin wants, i can send him a link to them so he can download them and put them up somewhere for CentOS / Redhat people to download. I will add more to this as i remember everything I did... I'm getting old, and my memory isn't what it once was :p ]



Extras
----------
Also for the version of ProFTPD used, you'll need to edit /etc/proftpd.conf

find
Code:
AuthPAM
and replace with
Code:

  1. Use pam to authenticate (default) and be authoritative
    AuthPAMConfig proftpd
    AuthOrder mod_auth_pam.c* mod_auth_unix.c
    RequireValidShell off
    -------

You may also have a problem with pop3 showing weird email error in status of @
if so, just add an E-Mail address :)

Last thing: if you know and can help on building a yum repository (and if possible, on a Debian system), please get in touch, we want to setup one but have currently no time to read the documentation so we can do it by ourself.

Page last modified on April 16, 2008, at 06:31 AM EST