Home >System Tutorial >LINUX >DirectAdmin panel ID and IP address replacement solution

DirectAdmin panel ID and IP address replacement solution

王林
王林Original
2024-07-29 09:08:431044browse

DirectAdmin panel ID and IP address replacement solution

Log in to DirectAdmin server
# cd /usr/local/directadmin/scripts
# ./getLicense.sh 7353 12345
# service directadmin restart
其中7353是客户ID,12345是授权ID

If your server has multiple different IPs, you can forcefully specify an IP authorization, such as: 10.200.200.26

# cd /usr/local/directadmin/scripts
# ./getLicense.sh 7353 12345 127.0.0.1
# service directadmin restart
If you need to change the IP after updating the authorization, then follow the steps below
# 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

directAdmin failed to start, check if port 2222 is running;

# 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]

Every time it starts, it prompts OK, then crashes FAILED, and cannot open the directadmin control panel. Enter the directadmin installation directory:

# 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

According to the prompt, it is DA authorization failure or IP specification error. It is found that the authorized IP mentioned by the customer is venet0:0, while the directadmin configuration file specifies 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

Open http://ip:2222 and successfully display the login window

When using DA, you will encounter the situation where the dataskq process takes up up to 100% of the CPU, causing the website to open very slowly. The dataskq process is an action response process. It is executed every minute in the /etc/cron.d/directadmin_cron task. Check the /var/log/directadmin/errortaskq.log log feedback. dataskq keeps checking until named is not started, which leads to continuous Restart, so it may be that named in the machine was uninstalled during the upgrade. The repair method is as follows:

# 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

If the above solution does not solve this problem, just kill all the dataskq process. More help; https://help.directadmin.com/

The above is the detailed content of DirectAdmin panel ID and IP address replacement solution. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn