DirectAdmin 变更主机名和IP地址

|Font Size: | No Comments | Previous

  原来的VPS IP在国内无法访问了,所以更换了VPS所在区域。在DigitalOcean的后台将VPS关机,做好快照后将快照传至目的区域,然后使用快照重新创建一个VPS即可,不需要重装系统。

  修改directadmin的主机名和IP地址:

  1.登录directadmin后台,找到底部的Extra Features-Administrator Settings,修改hostname后重启apache服务即可。

  2.修改IP地址(128.199.236.106 修改为 104.131.214.125):

[root@nyc2 ~]# cd /usr/local/directadmin/scripts  
[root@nyc2 scripts]# ./ipswap.sh 128.199.236.106 104.131.214.125
/etc/httpd/conf/httpd.conf      : 128.199.236.106 -> 104.131.214.125
/etc/httpd/conf/extra/httpd-vhosts.conf : 128.199.236.106 -> 104.131.214.125
/etc/httpd/conf/ips.conf        : 128.199.236.106 -> 104.131.214.125
/etc/proftpd.conf       : 128.199.236.106 -> 104.131.214.125
/etc/proftpd.vhosts.conf        : 128.199.236.106 -> 104.131.214.125
/etc/hosts      : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/scripts/setup.txt        : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/admin/ip.list       : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/admin/show_all_users.cache  : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/users/admin/user.conf       : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/users/admin/httpd.conf      : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/users/admin/ip.list : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/users/admin/user_ip.list    : 128.199.236.106 -> 104.131.214.125
ls: cannot access /usr/local/directadmin/data/users/admin/domains/*.conf: No such file or directory
ls: cannot access /usr/local/directadmin/data/users/admin/domains/*.ftp: No such file or directory
ls: cannot access /usr/local/directadmin/data/users/admin/domains/*.ip_list: No such file or directory
/usr/local/directadmin/data/users/ollydbg/user.conf     : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/users/ollydbg/httpd.conf    : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/users/ollydbg/user_ip.list  : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/users/ollydbg/domains/sothink.cn.conf       : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/users/ollydbg/domains/sothink.cn.ftp        : 128.199.236.106 -> 104.131.214.125
/usr/local/directadmin/data/users/ollydbg/domains/sothink.cn.ip_list    : 128.199.236.106 -> 104.131.214.125
/var/named/sgp01.unity3dbox.com.db      : 128.199.236.106 -> 104.131.214.125
/var/named/sothink.cn.db        : 128.199.236.106 -> 104.131.214.125

*** Done swapping 128.199.236.106 to 104.131.214.125 ***

  参考:How to change your server IP address

本文结束。

Leave a comment