Archive for the tag 'DirectAdmin Support'

The first step is to nofify direct admin regarind this change.

Boot the machine with the new IP address, chage the IP address in the system network setting and not in DirectAdmin.

Now get the new Licence.

cd /usr/local/directadmin/scripts

./getLicense.sh 1234 56789

Replace 1234 with your client ID number, and replace 56789 with your license ID number.

Start DirectAdmin with the new license:

/etc/init.d/directadmin restart

Run the ipswap.sh script to replace the old server IP (1.2.3.4) with the new server IP (4.3.2.1)

cd /usr/local/directadmin/scripts

./ipswap.sh 1.2.3.4 4.3.2.1

Restart everything:

/etc/init.d/httpd restart
/etc/init.d/proftpd restart
/etc/init.d/exim restart
/etc/init.d/dovecot restart
SBDavid

DirectAdmin log files

DirectAdmin log files, where to look for more infornation and error logs:

/var/log/directadmin/error.log
/var/log/directadmin/errortaskq.log
/var/log/directadmin/system.log
/var/log/directadmin/security.log

Error connecting to MySQL: Access denied for user: ‘da_admin@localhost’ (Using password: YES) in DirectAdmin

When connecting to the MySQL screens in DirectAdmin, if this error appears, that would indicated that the “da_admin” user has not been setup correctly. To resolve this do the following.

1) Make sure the root mysql password works. If you know it, skip to 2). The mysql root password can be found in the /usr/local/directadmin/scripts/setup.txt if it has not been deleted. It’s under the header “mysql=”. If it cannot be found, then mysqld will have to be restarted with the –skip-grant-tables option:

service mysqld stop
mysqld_safe –skip-grant-tables &

That should start up mysql without the need for a root password. Once in, type

use mysql
UPDATE user SET password=PASSWORD(’newpass’) WHERE user=’root’;
FLUSH PRIVILEGES;
quit

That will reset the root password for you.

Type “killall -9 mysqld_safe; killall -9 mysqld” to shut down mysqld.
Start it up again with

/sbin/service mysqld start

2) Once the root mysql password is set and known, then you can begin the process of resetting the da_admin mysql user. Type:

mysql -uroot -p

Then press enter. You’ll be asked for the password. Once in mysql, type:

GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY ‘newdapass’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit

That should set the password for da_admin in mysql.

3) Now we need to make sure it’s setup correctly for DA to use. Edit /usr/local/directadmin/conf/mysql.conf and set

user=da_admin
passwd=newdapass

4) Test it out in DirectAdmin.

How to Add Custom Modules to php in DirectAdmin

If you want to add any extra modules to php, they’ll most likely need to be compiled in. Any module that needs to be compiled in will have a –with-module type flag which will need to be used. To add this flag, run the following:

cd /usr/local/directadmin/customapache
vi configure.php
#add your –with-module line to the end of the file,
# and make sure the \ character exists at the end of all lines except the last one.
./build clean
./build php

If you’re using custombuild instead of customapache, use the following configure file(s) then repeat the above steps, but use ‘custombuild’ instead of ‘customapache’ in the path:

/usr/local/directadmin/custombuild/configure/ap2/configure.php5
/usr/local/directadmin/custombuild/configure/ap2/configure.php4

Then restart apache

DirectAdmin Access: Ports that needs to be opened in firewall.

20,21: FTP.

Note that ftp will use a “random high port number” if the client is in PORT mode, so you may need to add a port range into your /etc/proftpd.conf file to allow ftp connections, eg:

PassivePorts 35000 35999

22: ssh access

25, 587: smtp for exim to recieve email

53: dns (named), so your sites resolve. TCP/IP and UDP here.

80, 443: apache traffic, http and https

110, 993: client pop email access
143, 995: clients imap email access

2222: DirectAdmin Access

3306: mysql acess. For remote mysql access.

« Prev - Next »