# cd /usr/local/directadmin/scripts # ./getLicense.sh 7353 12345 # service directadmin restart 其中7353是客户ID,12345是授权ID
如果你的伺服器有多個不同的ip可以強制指定一個ip授權 如:10.200.200.26
# cd /usr/local/directadmin/scripts # ./getLicense.sh 7353 12345 127.0.0.1 # service directadmin restart
# cd /usr/local/directadmin/scripts # ./ipswap.sh 10.200.10.26 10.200.200.26 其中10.200.10.26为原IP,10.200.200.26为新IP。之后按以下命令重启所有服务即可(或重启服务器省略以下操作) # /etc/init.d/httpd restart # /etc/init.d/proftpd restart # /etc/init.d/exim restart # /etc/init.d/dovecot restart
irectAdmin 啟動失敗,查看2222埠是否運作;
# netstat -antp 若没有2222端口运行说明DirectAdmin并无启动,再次重启; # service directadmin restart Stopping DirectAdmin: [FAILED] Starting DirectAdmin: [ OK ] # service directadmin restart Stopping DirectAdmin: [FAILED] Starting DirectAdmin: [ OK ] # service directadmin restart Stopping DirectAdmin: [FAILED]
每次啟動提示OK,閃退FAILED,無法開啟directadmin控制面板。進directadmin安裝目錄:
# whereis directadmin # cd /usr/local/directadmin # ./directadmin The ip of this machine (10.200.10.26) does not match the ip in the license file Check the value of your ethernet_dev=venet0:1 setting in your /usr/local/directadmin/conf/directadmin.conf file and the output of /sbin/ifconfig
根據提示是DA授權失敗或IP指定錯誤,發現客戶說的授權IP是在venet0:0,而directadmin 的設定檔裡指定的是venet0:1
# ifconfig -a # vi conf/directadmin.conf ethernet_dev=venet0:1 改 ethernet_dev=venet0:0 再次执行; # ./directadmin
[root@hip directadmin]# ./directadmin Bind Error: Make sure there aren't any copies running in the background Address already in use
開啟http://ip:2222 成功顯示登入視窗
在使用DA過程中你會遇到dataskq進程佔用CPU高達100%的情況,導致網站開啟非常緩慢。 dataskq這個進程是一個動作回應進程,在/etc/cron.d/directadmin_cron任務裡每分鐘都會執行一次,查看/var/log/directadmin/errortaskq.log日誌回饋,dataskq一直檢查到named沒啟動從而導致不斷重啟,所以可能是機器中的named在升級中卸載了,修復方法如下:
# yum install bind dbus dbus-libs -y # mv /etc/init.d/named /etc/init.d/named.bak # wget http://www.directadmin.com/named # chmod 755 /etc/init.d/named # /sbin/chkconfig named reset # /etc/init.d/named restart
如果以上方案並沒有解決此問題,那就直接將dataskq進程killall掉即可。更多幫助;https://help.directadmin.com/
以上是DirectAdmin面板ID及IP位址更換解決方案的詳細內容。更多資訊請關注PHP中文網其他相關文章!