PDA

View Full Version : HOWTO: Setup A New DirectAdmin Server



loopforever
06-21-2003, 10:52 AM
This guide is no longer applicable.

Please view:
http://directadmin.com/installguide.html

For the DirectAdmin installation guide!

------------------------------------------------------------

The purpose of this HOWTO is to give DirectAdmin newbies a "to-the-point" method of getting their new server set up. With this said, let's get started setting up our server!

Just a note before we begin, you will see tags like this: [TAB], [ESC], [ENTER] in this guide. They simply mean to hit that key on your keyboard.

Additionally, this guide is for a bare-naked machine (fresh/clean install of Redhat 8), so you may skip some features listed in this guide, if you need to.

Register with RedHat Network

If you are not registered already, just type the following to do so now:



up2date --register

Fill out all the fields on-screen, and you'll be set to go in no time.

Make sure ifconfig is in your PATH



locate ifconfig


Note the path to the binary, and then type:



export PATH=$PATH:/path/to/bindir

More than likely, ifconfig will be found in /sbin.

Disable Telnet

The first thing we will do, before anything else, is disable Telnet. We are doing this because SSH exists, and Telnet is simply useless, and too insecure for us. Depending on your setup, the method for turning telnet off may vary. If you are running xinetd, all that is needed is to do the following:



vi /etc/xinetd.d/telnet [ENTER]

Find the "disabled" field and set it to "yes". Then:



[ESC] :wq [ENTER]
/etc/rc.d/init.d/xinetd reload [ENTER]

Install/Upgrade Webalizer

The DirectAdmin installation requires Webalizer to be installed. The easiest way to do this, is to go to www.rpmfind.net and find the latest version for your OS distribution. If you are using RH8, like I am, you can do the following:



up2date -u webalizer [ENTER]

Ensure GCC is Installed

Next, we will upgrade GCC. We'll want to most recent version before we install DirectAdmin:



up2date -u gcc [ENTER]

Additionally, we need pam-devel, bison, and flex. So, run these commands also:



up2date -u pam-devel [ENTER]
up2date -u bison [ENTER]
up2date -u flex [ENTER]

Ensure named Configuration Exists

We'll also need to check that named is configured properly. Type:



less /etc/named.conf [ENTER]

If it does not exist, do this:



wget http://66.51.122.131/named.conf -O /etc/named.conf [ENTER]
wget http://66.51.122.131/named.ca -O /var/named/named.ca [ENTER]

Install DirectAdmin

We are now ready to begin installing DirectAdmin:



mkdir /usr/local/directadmin [ENTER]
cd /usr/local/directadmin [ENTER]

Replace yourlid with your License ID and youruid with your user ID:



wget https://www.directadmin.com/cgi-bin/daupdate?lid=yourlid\&uid=youruid -O /usr/local/directadmin/update.tar.gz [ENTER]

Now confirm that you've downloaded the file successfully by running:



ls -lh /usr/local/directadmin/update.tar.gz [ENTER]

The file size should be around 2.5mb. If it is not, try removing the file and downloading it again.

Next, we can untar the file and begin the installation:



tar xvzf update.tar.gz [ENTER]
cd /usr/local/directadmin/scripts [ENTER]
./getInfo.sh [ENTER]

Now check that getInfo.sh set everything up properly, by running:



cat ./setup.txt [ENTER]

If there is something you need to change, edit setup.txt to your liking. Then continue on:



./install.sh [ENTER]

loopforever
06-21-2003, 11:04 AM
More to come as I continue messing with my new machine... :p...

DirectAdmin Support
06-28-2003, 12:01 AM
That's great, it will save us a lot of time for support requests! :)

Just a few changes:
The /etc/named.conf and /var/named/named.ca files are automatically downloaded if they don't exist.

Many servers don't have bind installed, but they do have bind-utils (old version), so:
rpm -e --nodeps bind-utils
up2date -u bind

Also, I've found all places I call ifconfig and hardcoded the full path so its no longer required to add the path to your environment.

MySQL has been existant on so many servers in so many forms that the mysql installer now has to use brute force to get things done. It will ask you if it can delete the /var/lib/mysql directory, say 'y' (yes) so that any root passwords (that are usually long forgotten) will be wiped out nice and clean.. you *can* say no, but you have to be absolutely sure you have the correct root password in the setup.

Note: *** Don't use spaces in your mysql passwords!!! ***
bash interprets spaces as being the next variable so things might get messed up :)

The Installer will chug along happily... for ./install.sh

Note: the admin user will be deleted before the install (if it exists), so if it exsits, backup whatever you need :)

After the installer is done, its a good idea to make sure that your license file has downloaded properly. It's filesize should be 1298 bytes, and if you "cat license.key" you should see:
version=1.1
(a whole pile of Hex)
(binary stuff that will mess up your screen :) )

Thats how you know it worked. If you see any error messages, you can either download it manually or just send us an email... to manually get it, its very similar to getting directadmin in the first few steps:

wget https://www.directadmin.com/cgi-bin/licenseupdate?uid=UID\&lid=LID -O /usr/local/directadmin/conf/license.key

Also, always check that the databases section of DirectAdmin is working properly. If you can see a table without any databases, you know it worked. It will give an error if it can't connect when the CMD_DB page is loaded.

For almost all of the new installs that *we* do, we will install our "customapache" build script to overwrite all of the old versions of the software. Until we integrate this into the installer, it will have to be downloaded and executed seperatly... note that you don't *have* to run it, but it's highly recommended.

John

Shahid
12-10-2003, 11:06 AM
Very Nice :)

What about FreeBSD "HOWTO: Setup A New DirectAdmin on FreeBSD Server"?

I will be waiting for this.

Thanks mate :)

DirectAdmin Support
12-11-2003, 10:40 AM
Hello,

Just a note about this Redhat How-To.. we now use setup.sh to Install DA and it does about 90% of the commands listed above. :) (Doesn't install gcc)

FreeBSD is basically the same, just downlaod setup.sh, chmod it to 755 and answer the questions.

John

bonnmac
02-14-2004, 02:43 PM
When d/ling the update.tar.gz file I'm given a 56 byte file.

I need to re-install DA on a server which had a hdd failure.

Can someone please tell me where to d/l installation files?

Thanks!

*edit*

NM Mark to the rescue! Thanks Mark your the best!

S4rz
02-03-2005, 05:39 AM
I'm getting this error, could anybody help me with it?

cat: /etc/rc.conf: No such file or directory
./doChecks.sh: line 20: [: !=: unary operator expected
*** bison is required for compiling, please install bison ***
Installation didn't pass, halting install.

DennisCitus
02-09-2005, 02:24 PM
Originally posted by S4rz
I'm getting this error, could anybody help me with it?

cat: /etc/rc.conf: No such file or directory
./doChecks.sh: line 20: [: !=: unary operator expected
*** bison is required for compiling, please install bison ***
Installation didn't pass, halting install. Install bison. Use yum install bison, if u have configured yum correctly.
#yum install bison

Else... check rpmfind.net

With other os'es... check Google.

maldito
02-21-2005, 09:17 PM
Any updates for red hat 9?

I'm kinda new as admin, and I don't want to mess my brand new server :(

MIA
04-17-2005, 09:02 AM
i dont have up2date installed on my server and cant seem to find it (FC2) so whenever i ./setup.sh i get an error message:
Cannot find /etc/sysconfig/rhn/up2date... up2date may break things.
*** g++ is required for compiling, please install g++ (up2date -u gcc-c++)***
Installation didn't pass, halting install.


please advise.

WaMeLiNoS
04-18-2005, 03:25 PM
Originally posted by MIA
i dont have up2date installed on my server and cant seem to find it (FC2) so whenever i ./setup.sh i get an error message:
Cannot find /etc/sysconfig/rhn/up2date... up2date may break things.
*** g++ is required for compiling, please install g++ (up2date -u gcc-c++)***
Installation didn't pass, halting install.


please advise.


On Fedora there is the option YUM (nearly the same as up2date)

Installing it with yum : yum install gcc-c++


Thats should to the trick and after installing the gcc-c++ module you will be able to install directadmin.

MIA
04-18-2005, 03:28 PM
yah, i found that after my 6 hours wasted.

loopforever
04-18-2005, 08:34 PM
Just so you guys know...this guide is rather old. Some parts no longer apply...you're better off just reading this:

http://directadmin.com/installguide.html

nobaloney
04-18-2005, 09:05 PM
Matt,

Why don't you edit your first post to point this out, instead of placing it at the end?

:)

Jeff