Saturday 26 April 2014

Install Directadmin On Centos Server

Install Directadmin On Centos Server
Login to your server as root
and run
Code:

Quote:yum -y update


Before installing DirectAdmin, there are some basic programs that you'll need. The following are the typical commands used before we install DirectAdmin.

On Rehat/Fedora/CentOS:
Code:

Quote:yum install wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 db4-devel cyrus-sasl-devel perl-ExtUtils-Embed


Once its complete

Code:

Quote:wget http://www.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh


you will be prompted for a client ID number, license ID number, and hostname.

After the setup routine starts you will be presented with a number of options. You should have your license details ready.

Important: The hostname should not be the same as the primary domain name. e.g. server9x.com is not a valid hostname, where myserver.server9x.com is. Having the same host/main domain name will cause e-mail and FTP problems. Also, please make sure the hostname resolves once you setup DNS.

(start installation routine[Image: smile.gif]


Code:
Code:
*****************************************************
*
* Have you run the pre-install commands? CTRL-C if not.
* http://help.directadmin.com/item.php?id=354
*
*****************************************************
Please enter your Client ID : xxxxx
Please enter your License ID : xxxxx
Please enter your hostname \(server.domain.com\)
It must be a Fully Qualified Domain Name
Do *not* use a domain you plan on using for the hostname:
eg. don't use domain.com. Use server.domain.com instead.
Do not enter http:// or www
Enter your hostname (FQDN) : xxxxx.xxxxx.com
Client ID: xxxxx
License ID: xxxxx
Hostname: xxxxx.xxxxx.com
Is this correct? (y,n) : y
The following ethernet devices/IPs were found.
Please enter the name of the device you wish to use:
eth0 xxx.xxx.xxx.xxx
eth1




when using a Virtual Private Server (VPS) you should select the respective virtual network port:

Code:
(the usual option)
venet0:1

If unsure enter the following in commandline and see which ETH adapter is using your public IP address:

Code:
ifconfig

Code:
(installation routine continued

Enter the device name: xxx
Is xxx.xxx.xxx.xxx the IP in your license? (y,n) : y
DirectAdmin will now be installed on: Enterprise 5.7
Is this correct? (must match license) (y,n) : y
You now have 2 options for your apache/php setup.
1: customapache: end-of-life software. Includes Apache 1.3, php 4 and frontpage.
**Not recommended**. Will not work with newer OSs. Limited tech support.
2: custombuild 1.1: newer software (recommended).
Includes any Apache version, php 4, 5, or both in cli and/or suphp. Frontpage not available.
Post any issues with custombuild to the forum: http://www.directadmin.com/forum/forumdisplay.php?f=61
Enter your choice (1 or 2): 2
You have chosen custombuild 1.1.
2011-11-11 14:47:00 http://files.directadmin.com/services/custombuild/1.1/custombuild/build
Resolving files.directadmin.com
Connecting to files.directadmin.com|:80 connected.
HTTP request sent, awaiting response 200 OK
Length: 289046 (282K) [text/plain]
Saving to: `/usr/local/directadmin/custombuild/build'
100%[===========================================================================>] 289,046 855K/s in 0.3s
2011-11-11 14:47:01 (855 KB/s)  `/usr/local/directadmin/custombuild/build' saved [289046/289046]
Would you like the default settings of apache 2.2 and php 5 cli? (y/n): y *
Using the default settings for custombuild.
Would you like to search for the fastest download mirror? (y/n): y
* This option works fine for a basic webserver install. If you'd like to have more control over what should or should not be installed set this option to N

Below you will find what options you have when selecting a custom setup of DirectAdmin:
Would you like the default settings of apache 2.2 and php 5 cli? (y/n):  N
Would you like to have PHP4 or PHP5 as default? (4/5):
Would you like to have PHP5? (yes/no):
Would you like to have PHP5 as CLI or CGI? (cli/cgi):
Would you like to have PHP4? (yes/no):
Would you like to have ionCube? (yes/no):
Would you like to have Zend Optimizer? (yes/no):
Would you like to have an ability to update/instal MySQL using CustomBuild? (yes/no):
Which version of MySQL you would like to have? (5.0/5.1):
Which version of Apache you would like to have? (1.3/2.0/2.2):
Would you like to have an ability to update/instal Exim using CustomBuild? (yes/no):
Would you like to have an ability to install Dovecot? (yes/no):
Would you like to have an ability to install/update phpMyAdmin using CustomBuild? (yes/no):
Would you like to have an ability to install/update SquirrelMail webmail using CustomBuild? (yes/no):
Would you like to have an ability to install/update RoundCube webmail using CustomBuild? (yes/no):
Would you like to have an ability to install/update UebiMiau webmail using CustomBuild (not recommended)? (yes/no):
Would you like to have an ability to install/update Atmail Open webmail using CustomBuild? (yes/no):
Would you like to search for the fastest download mirror? (y/n):

When the install routine has completed, you should be ready to login to your newly installed control panel via:http://xx.xx.xx.xx:2222 (where xx.xx.xx.xx is your IP address or domain name). 2222 is the port DirectAdmin normally communicates on. It is important to keep this port open in your firewall
In case you forgot your admin password enter the following:
Code:
/usr/local/directadmin
./directadmin i


3. update custombuild:
After having DirectAdmin succesfully installed it is now time to secure your server. A good first step would be to install the CSF Firewall. It is also important to periodically update your server. This can be done by issuing the following commands:

Code:
cd /usr/local/directadmin/custombuild
./build clean
./build update
./build update_versions



4. Dealing with RPM errors
When installing RPMs, errors can sometimes occur. Don't panic, solving them is usually easy. If you didn't know what to install during your RedHat installation, you might have installed a few services, such as apache and sendmail. These services must be removed before the rpm will be able to be installed.
For example, lets say you are trying to install exim and you get the following:
Code:
rpm -ivh exim-3.36-2.i386.rpm
  Preparing...                         ########################################### [100%]
  file /somefile from install of exim-3.36-2 conflicts with file from package sendmail-8.1

This would mean that sendmail is already installed on your server and you must remove it. This can easily be accomplished by running the following:
Code:
rpm -e --nodeps sendmail

Then you will be able to install your rpm. This follows for other services such as apache, apache-devel, wu-ftp, php, MySQL and so forth. If you need to figure out if you already have a service installed, you can run

Code:
rpm -q servicename
or
rpm -qa | grep substring
Where substring is just a word. For example, using "apache" might return:
rpm -qa | grep apache
apache-fp-1.3.27-2
apache-fp-devel-1.3.27-2
apache-fp-manual-1.3.27-2

No comments:

Post a Comment