/usr/local/directadmin/scripts/getLicense.sh 11111 11111 MY_IP
Tag Archives: directadmin
directadmin delete email account timeout
You can do “rm -fr /home/user/domains” in ssh
and then after it’s done delete it through control panel.
directadmin fix mysql
cd /usr/local/directadmin/custombuild
./build mysql
directadmin /usr/include/openssl/conf.h:132:7: note: expected ‘struct lhash_st_CONF_VALUE *’ but argument is of type ‘int *
If you are running Debian and face this error with directadmin php compilation, please try:
./build set php5_cgi yes
./build set php5_cli no
./build all d
./build rewrite_confs
Check the value of your ethernet_dev=eth0 setting in your /usr/local/directadmin/conf/directadmin.conf file and the output of /sbin/ifconfig
If you have this kind of directadmin error, like: The ip of this machine (xx.xxx.xxx.xxx) does not match the ip in the license file.
cd /usr/local/directadmin/scripts
./getLicense.sh ClientDI LicenseID
service directadmin restart
Starting httpd: httpd: Syntax error on line 50 of /etc/httpd/conf/httpd.conf
If you can’t start directadmin on your Centos server:
Starting httpd: httpd: Syntax error on line 50 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/httpd-phpmodules.conf
Fix:
cd /usr/local/directadmin/custombuild/
./build apache
./build mod_ruid2
./build php n
./build rewrite_confs
/etc/init.d/httpd restart
Preference file, /var/www/html/squirrelmail/data/[email protected], could not be opened. Contact your system administrator to resolve this issue.
Fast fix.
chown -R webapps:webapps /var/www/html
directadmin – create automaticaly all mysql database daily backup
Its useful if you are directadmin user and want to have your database copies and save them on the same hosting account as your website.
#!/bin/bash
#Author: Vitalijus Ryzakovas - www.balticservers.com
current=$(date +%F)
if [ -d /home/user/databasebackup ]; then
delete=$(ls -r /home/user/databasebackup | tail -n +7 )
/bin/mkdir /home/user/databasebackup/$current
/usr/local/mysql/bin/mysqldump -u user -ppassword --all-databases > /home/user/databasebackup/$current/user_alldb.sql
[ -z "$delete" ] || rm -rf /home/user/databasebackup/$delete
fi
Then you need create cronjob and run it everyday.
directadmin empty messages list
cd /usr/local/directadmin/data/admin
echo -n “” > tickets.list
or the following for a User:
cd /usr/local/directadmin/data/users/username
echo -n “” > tickets.list
apt-get update apt-get: /usr/local/lib/libz.so.1: no version information available (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12)
rm /usr/local/lib/libz.so.1.2.3
rm /usr/local/lib/libz.so.1
ln -s /usr/lib/libz.so.1.2.3.4 /usr/local/lib/libz.so.1
directadmin install Zend Optimizer/Guard, and/or Ioncube
For Zend, type:
cd /usr/local/directadmin/custombuild
./build set zend yes
./build zend
after changing php versions, it’s recommended you install zend again.
Note that Zend Guard is the new name for Zend Optimizer, and is used for newer versions of php. Custombuild will install the correct one for your system.
For Ioncube, type:
cd /usr/local/directadmin/custombuild
./build set ioncube yes
./build ioncube
fail2ban CentOS DirectAdmin
yum install fail2ban
vi /etc/fail2ban/filter.d/dovecot-pop3imap.conf
[Definition]
failregex = dovecot: auth-worker\(default\): sql\(.*,\): unknown user
dovecot: (pop3|imap)-login: Aborted login \(.*\): .*, \[\]
dovecot: (pop3|imap)-login: Disconnected \(auth failed, .*\): .*, \[\]
dovecot: auth\(default\): passdb\(.*,\)\: Attempted login with password having illegal chars
dovecot: (pop3|imap)-login: Disconnected \(auth failed, .*\): .*, \[\]
dovecot: (pop3|imap)-login: Aborted login: .*, \[\]
ignoreregex =
vi /etc/fail2ban/jail.conf
[dovecot-pop3imap]
enabled = true
filter = dovecot-pop3imap
action = iptables-multiport[name=dovecot-pop3imap, port=”pop3,pop3s,imap,imaps”, protocol=tcp]
sendmail-whois[name=dovecot-pop3imap, dest=root, [email protected]]
logpath = /var/log/maillog
maxretry = 20
findtime = 1200
bantime = 1200
service fail2ban start
chkconfig fail2ban on
service fail2ban status
Install Directadmin on Centos OS
directadmin pre-install:
yum install wget screen 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 libcap-devel bzip2 db4-devel cyrus-sasl-devel perl-ExtUtils-Embed autoconf automake libtool
run screen and install:
screen
wget http://www.directadmin.com/setup.sh && chmod 755 setup.sh
begin directadmin installation: ./setup.sh