How to install DAG, YUM, and BIND on Clarkconnect
Friday, May 25th, 2007I was playing with my Clarkconnect box this morning and noticed that some of my favorite Linux command line tools were not installed.
What is Clarkconnect? According to their website: (LINK)
“ClarkConnect is a powerful and affordable Internet server and gateway solution. The software solution will give your organization enterprise-level server features at an affordable price.”
If you have ever installed anything on Linux you know that you can easily fall into the dependency trap at any time when installing new software.
To avoid the need to install 30 different dependencies so that you can install one program on Clarkconnect you problebly want to use a program like apt-get or yum. I prefer yum, but Clarkconnect comes with apt-get which is a little strange considering that it is based off Red Hat Enterprise Linux (RHEL).
I am using Clarkconnect 4.1 Community Edition. For the software repository I choose DAG since they have one of the largest collections of software for RHEL. In this case we want to match the version that Clarkconnect was coded from as closely as possible to make sure our software will work properly. We are going to use the RHEL 4 repo. (LINK)
If you follow the install directions on the DAG website you will notice that it will not work. And after fiddling with error messages I found that I had to craft my own source list file which I will give to you so you don’t have to deal with the same tortures I did.
NOTE: Watch for line wrap!
Log in as root using putty or any other ssh client.
Change directory to: /etc/apt/sources.list.d/
cd /etc/apt/sources.list.d/
Run:
rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
Create or edit the file rpmforge.list in that directory.
vi rpmforge.list
In that file place the following information (Download this file):
# Name: RPMforge RPM Repository for Red Hat Enterprise 4 - dag
# URL: http://rpmforge.net/
rpm http://apt.sw.be redhat/el4/en/i386 dag
If you have never used vi before you may need to know a few basic commands.
a = append mode (Used to edit text)
ESC = command mode (Used to give vi commands)
:w (Save file command)
:q (Exit vi command)
Make sure you write your changes before exiting vi or you will lose your changes.
Run the following command to update your apt-get info:
apt-get update
You are now ready to install your software. In this case we are going to install yum because I like it, but if your happy with apt-get just install whatever other packages you like. The sky is the limit!
apt-get install yum
Since Clarkconnect uses apt-get for its updating process I prefer to use yum for installing third party packages so there is no chance for conflict due to the repos. With yum installed, it is now safe to remove the source list created for apt-get unless you plan to keep using it.
BONUS:
Some packages such as Bind cannot be found in the DAG repo because they are usually included with the base system. But not with Clarkconnect since it uses DNSMasq. If you rather have your own DNS server instead of relying on your ISP you can add the CentOS 4 repositories to your YUM configuration.
Change to the “/etc/yum.repos.d/” directory.
cd /etc/yum.repos.d/
Then create the file “CentOS-Base.repo” using vi or joe.
Add the following information to that file (This file has been modified):
NOTE: Watch for word wrap! (Download this file)
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/4/os/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4#released updates
[update]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/4/updates/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://mirror.centos.org/centos/4/addons/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirror.centos.org/centos/4/extras/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirror.centos.org/centos/4/centosplus/i386/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirror.centos.org/centos/4/contrib/i386/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
Remember, Bind and dnsmasq will fight for port 53 UDP. I went into the file “/etc/dnsmasq.conf” and added the statement:
port=40
This will assign dnsmasq to port 40 freeing up port 53 for bind. 40 is a unassigned port so it is ok to use it. The reason you reassign the port instead of disabling dnsmasq is because it controls the DHCP functionality. And if you wish to continue to use the web interface for DHCP configuration then you will need to keep this package installed and operating. DNS will operate wonderfully this way.
Enjoy!
