Archive for the ‘DirectAdmin’ Category

Fixing “unsupported protocol”

Friday, November 6th, 2009

cd `pear config-get php_dir`mv .channels .channels-brokenpear update-channels

[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock

Sunday, September 13th, 2009

sometime, you can use ipcs and kill them, But this won’t work always for me.

try to edit your sysctl.conf, and add in this few command

kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024

and sysctl -p

Install FreeType Support for DirectAdmin

Thursday, August 20th, 2009
# install freetype-devel
yum install freetype-devel -y

# patch the build script
cp -f /usr/local/directadmin/customapache/build /usr/local/directadmin/customapache/build.bak
cat /usr/local/directadmin/customapache/build.bak | sed "s/without-freetype/with-freetype/g" > /usr/local/directadmin/customapache/build
chmod 755 /usr/local/directadmin/customapache/build

cd /usr/local/directadmin/customapache
./build gd -y

GreyListd for DirectAdmin

Sunday, March 2nd, 2008

== Get greylistd ==
cd /tmp
wget http://ubuntu2.cica.es/ubuntu/ubuntu/pool/universe/g/greylistd/greylistd_0.8.6.tar.gz
tar -zxvf greylistd_0.8.6.tar.gz
cd greylistd-0.8.6/

== Make the folders ==
mkdir /etc/greylistd/
mkdir /var/run/greylistd/
mkdir /var/lib/greylistd/

Provided you are still in the greylistd-0.8.3.2 folder, copy the files:
cp config/* /etc/greylistd/
cp program/greylist* /usr/sbin/

Edit the config at /etc/greylistd/config

== Change permissions ==
chown -R mail:mail /etc/greylistd/
chown -R mail:mail /var/run/greylistd/
chown -R mail:mail /var/lib/greylistd/
chown -R mail:mail /usr/sbin/greylist*

== Run greylistd in the background ==
su mail
/usr/sbin/greylistd &
exit

or /usr/sbin/greylistd

== Edit the exim.conf ==
Now (as root) open /etc/exim.conf and search for the following section:

# accept mail to errors@example.com, regardless of source
# accept local_parts = errors
# domains = example.com

Add the following below it:
#GREYLIST
defer message = $sender_host_address is greylisted
log_message = greylisted.
hosts = !+relay_hosts
domains = +relay_domains
!senders = : postmaster@*
set acl_m6 = $sender_host_address $sender_address $local_part@$domain
set acl_m6 = ${readsocket{/var/run/greylistd/socket}{$acl_m6}{5s}{}{}}
condition = ${if eq {$acl_m6}{grey}{true}{false}}
# authenticated = *

Restart exim
/usr/local/etc/rc.d/exim restart

Auto updater in DirectAdmin

Sunday, March 2nd, 2008
mkdir /usr/local/updatescript
cd /usr/local/updatescript
wget http://tools.web4host.net/update.script
chmod 755 update.script

/usr/bin/ld: /usr/local/lib/libltdl.a(ltdl.o): relocation R_X86_64_32S against `a local symbol’ can not be used when making a shared object; recompile with -fPIC

Sunday, February 17th, 2008

yum install libtool-ltdl
yum install libtool-ltdl-devel
ln -sf /usr/lib64/libltdl.a /usr/local/lib/libltdl.a
./build php n

Install MRTG - Fully automated

Thursday, July 19th, 2007

mkdir /da

cd /da

wget http://serveio.com/da/install.mrtg.sh
mv install.mrtg.sh install.mrtg.sh.bak
cat install.mrtg.sh.bak | sed “s/http:\/\/people.ee.ethz.ch\/~oetiker\/webtools\/mrtg\/pub\/mrtg.tar.gz/http:\/\/oss.oetiker.ch\/mrtg\/pub\/mrtg.tar.gz/g” >install.mrtg.sh
chmod +x install.mrtg.sh
./install.mrtg.sh

Install dovecot in DirectAdmin

Thursday, July 19th, 2007

cd /usr/local/directadmin/customapache

./build dovecot
./build update_dovecot
./build dovecot

Most common used taskqueue

Sunday, May 13th, 2007

Hello,

Update License:
action=update&value=license

Update DA:
action=update&value=program

While we’re at it, let’s do the rest

Nightly Tally:
action=tally&value=all

Tally one User:
action=tally&value=john&type=user

Tally a Reseller (and his users)
action=tally&value=joe&type=reseller

Check to turn on/off vacation messages:
action=vacation&value=all

Monthly Reset:
action=reset&value=all

Reset one User:
action=reset&value=john&type=user

Rewrite the user httpd.conf files with the templates
action=rewrite&value=httpd

Check the license to see if it needs updating and try to get a new one if it does:
action=check&value=license

Run a backup:
action=backup&id=1&owner=bob
(owner is the reseller)

Extra less important commands:

Recache the ‘Show all Users’ page:
action=cache&value=showallusers

Recache user bob in the ‘Show all Users’ page:
action=cache&value=showallusers&user=bob
action=cache&value=showallusers&select0=bob&select1=fred&…

Recache the safemode page:
action=cache&value=safemode

Recache domain.com on the safemode page:
action=cache&value=safemode&domain.com=user
action=cache&value=safemode&domain.com=user&domain2.com=user2

There are a few others that were created just for 1 time use during an update, but they’re reallly not too exciting

John

Re-generate DNS zone for DirectAdmin

Sunday, May 13th, 2007
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue