DirectAdmin错误CSF Permission denied [User:admin UID:501]
如果你发现在DA打开CSF提示如下错误:
Permission denied [User:admin UID:501]
可以执行如下命令修复:
chown root /usr/local/directadmin/plugins/csf/exec/csf chmod 4755 /usr/local/directadmin/plugins/csf/exec/csf
如果你发现在DA打开CSF提示如下错误:
Permission denied [User:admin UID:501]
可以执行如下命令修复:
chown root /usr/local/directadmin/plugins/csf/exec/csf chmod 4755 /usr/local/directadmin/plugins/csf/exec/csf
如果你想禁用DirectAdmin的da-popb4smtp服务
编辑 /etc/exim.conf
找到: hostlist relay_hosts = net-lsearch;/etc/virtual/pophosts
修改为: hostlist relay_hosts =
重启 exim
/etc/init.d/exim restart # Redhat/Debian
/usr/local/etc/rc.d/exim restart # FreeBSD
来自:http://help.directadmin.com/item.php?id=467
DirectAdmin组件ZendGuardLoader,明明安装了探针却显示红叉叉,是因为一般是根据zend_loader.enable判断的,DA没加这些在php.ini,我们手动加上就好了
编辑php.ini,搜索:zend_extension,在底下加上
zend_loader.enable=1 zend_loader.disable_licensing=0 zend_loader.obfuscation_level_support=3 zend_loader.license_path=
然后 service httpd restart 重启下apache使修改生效
至于DirectAdmin PHP.INI的位置可以参考:http://www.cnweed.com/2743.html
Named is not reloading correctly when I add a domain
On some systems, the named boot script provided with the bind rpms don't seem to reliably reload the named program. You can obtain a new named boot script by running the following:
RedHat:
cd /etc/init.d mv named named.backup wget -O named http://www.directadmin.com/named chmod 755 named /sbin/chkconfig named reset
This boot script uses a more direct method of reloading named.
其他操作系统请访问来源:http://help.directadmin.com/item.php?id=40
一、登入 DirectAdmin 管理员,查找域知否已经存在
二、查看/etc/named.conf文件是否已经存在该域名
来源:http://help.directadmin.com/item.php?id=28
最近发现有台DA机器的Apache总是自动重启,每次大概1-3分钟,检查apache日记、tcp和80端口连接后发现是挂QQ的程序导致的,接下来扫描用户php文件就好了
screen -S scan find /home/* -type f -name "*.php" |xargs grep "pt.3g.qq.com" > scan.txt
现在挂QQ程序一般是用手机网页QQ,关键词是 pt.3g.qq.com ,扫描完成后会保存在 scan.txt 文件中
从DA 1.24版本开始,就有了这项功能,可以使用DirectAdmin创建自己的服务监控。可以将自己的服务名称加入/usr/local/directadmin/data/admin/services.status页面,DirectAdmin的dataskq会一直保持该服务的监测。
在services.status其中添加:
servicename=ON
或者:
servicename=OFF
如果服务名称在此列表中,ON表示dataskq会监测这个服务,OFF则意味着不会监测,和其他的功能类似,如果你在DirectAdmin面板中点击“停止”按钮,DirectAdmin也会将上面的值设置为OFF。
除此之外,下面的代码依旧有用,可以用它来自定义需要监测监控的服务。
很多的管理员会在Linux系统上运行很多的软件,DirectAdmin不会核对和监控他们,来确保它们一直运行,下面的脚本会让管理员能够监测 程序的运行状况,作为一个例子,我们在这里监测一个spamd程序。用你自己的具体信息,替换下面的部分内容:
#!/bin/sh COUNT=`ps -ax | grep -v grep | grep -c spamd` if [ $COUNT -eq 0 ]; then #the command used to start spamd /usr/bin/spamd -d -c -m 5 sleep 3 COUNT=`ps -ax | grep -v grep | grep -c spamd` if [ $COUNT -eq 0 ]; then echo -e "Subject: spamd is downnnspamd is downn.nn" | /usr/sbin/exim your@email.com fi fi exit 0;
将这段脚本改为自己的脚本之后,用chmod命令将其权限改为755,然后设置一个定时的脚本来检测这个脚本是否运行即可,DirectAdmin将会每分钟检测一次程序的运行状况,但是,脚本不能在程序挂掉之后确定是否发了邮件,所以如果你的程序一直挂在那里,那么你的邮箱估计会在每一分钟就收到一封警告邮件,所以监控的时间间隔设置为5到10分钟就足够了。
参考:http://www.defel.net/create-your-own-service-monitoring-with-directadmin.html
select user,host,password from mysql.user;
增加 Pure-FTPD 的支持
unified_ftp_password_file 选项必须为 1 和所有 passwords 要转换:
参考:http://www.directadmin.com/features.php?id=1134
pureftp=1
该选项也要设置为 1.
After any change to the /etc/proftpd.passwd file, DA will add a task.queue entry:
action=rewrite&value=pureftp_db
and the dataskq will call:
/usr/bin/pure-pw mkdb /etc/pureftpd.pdb -f /etc/proftpd.passwd
安装方式:
使用custombuild安装:
cd /usr/local/directadmin/custombuild ./build set proftpd no ./build set pureftpd yes ./build pureftpd
请记住,这是在测试阶段,可能会发生错误。
如果你发现proftpd仍然在运行,运行以下命令
chkconfig proftpd off service proftpd stop
需要提醒,Pure-FTPD可能会面临被爆破扫描的危险,DA目前无法屏蔽Pure-FTPD穷举的IP,CSF也是。
如果需要转换回来,在安装方式那替换下开启proftpd,关闭pureftpd,然后编译proftpd。
参考:http://www.directadmin.com/features.php?id=1143
比方你现在运行PHP 5.2.11,希望降级/升级到5.2.2。你可以通过编辑versions.txt文件来实现。
cd /usr/local/directadmin/custombuild ./build set autover no vi versions.txt
在文件中查找这两行
php5:5.2.11:0223d71f0d6987c06c54b7557ff47f1d php5-mail:5.2.11:85a62ef3d069403c29604730e02da9c8
替换为
php5:5.2.2: php5-mail:5.2.2:
保存文件退出,输入以下命令
./build update_data ./build php n