Page 1 of 1
Changing Default Plesk 10 IP
Posted: Mon Mar 14, 2011 3:09 am
by KrazyBob
I am beginning the very long process of migrating Plesk 8 and 9 servers to Plesk 10 for linux. I keep really good notes but cannot seem to find the note on changing the servers default IP after the migration.
I usually assign a temporary set of IP's to the server that is within Virtuozzo. No biggie. I migrate everything (if it works) and then use
Code: Select all
~# echo "venet0:0:IP1 NETMASK -> venet0:0: NEW_IP1 NETMASK" > map
~# /usr/local/psa/bin/reconfigurator.pl map
to assign exclusive IP's back.
But I simply don't remember how to change the temporary IP back to the intended IP for the entire server. ARG! As I recall it was something with mysql... gotta delete the IP an force Plesk back into reconfiguration?
Re: Changing Default Plesk 10 IP
Posted: Fri Apr 29, 2011 12:37 pm
by hostingguy
This is what we did when we had to change private IP spaces
Code: Select all
#do the plesk domain reconfig - this will also add the new IPs to the system
# this file has already been created with the correct one to one mappings
# for each individual system
/usr/local/psa/bin/reconfigurator.pl ~/ip_map.txt
#do gateway stuff for the new IPs
route add default gw yy.yy.yy.yy/21
route del -net xx.xx.xx.0/23
route del -net 169.254.0.0/16
#remove any of the old xx.xx.xx.0 IPs
for i in `ip address show dev eth0 | grep inet | grep 'xx.xx.xx' | awk '{print $2}'`; do
ip address del $i brd + dev eth0
done
#restart the network services
service network restart
#update any host entries and local resolvers
perl -pi -e 's/xx.xx.xx./yy.yy.yy./gi' /etc/hosts
perl -pi -e 's/xx.xx.xx./yy.yy.yy./gi' /etc/resolv.conf
#clear dns resolver cache
service nscd restart
with the ip_map.txt file being a series of ip mappings like this
Code: Select all
eth0:xx.xx.xx.xx 255.255.255.0 -> eth0:yy.yy.yy.yy 255.255.255.0
Re: Changing Default Plesk 10 IP
Posted: Fri Apr 29, 2011 10:04 pm
by KrazyBob
Default IP address is set during initial configuration. You should reconfigure Parallels Plesk Panel anew to change default IP address.
If Parallels Plesk Panel is configured parameter 'psa_configured' is set to 'true' in table psa.misc:
mysql> select * from misc where param='psa_configured';
+----------------+------+
| param | val |
+----------------+------+
| psa_configured | true |
+----------------+------+
1 row in set (0.00 sec)
mysql>
To perform initial configuration, change parameter 'psa_configured' to 'false':
mysql> update misc set val='false' where param='psa_configured';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql>
Then logout and login to Parallels Plesk Panel panel anew. Initial configuration page is opened just after login:
Warning: Fill the requested information into the appropriate fields. This information is required for Plesk to work.
Preferences ------------------------
Default IP Address -----------------
Shared IP addresses ----------------
Administrator's Preferences --------
Select another IP address in drop down menu near Default IP Address, fill in other required information and click 'OK' to finish configuration.
After the reconfiguration IP address 123.123.123.123 is not default and check box near it is enabled.
2. Using query below you may find domain that uses IP address 123.123.123.123.
mysql> select d.name from domains d, dns_recs dns where d.dns_zone_id=dns.dns_zone_id and dns.val='123.123.123.123';
+------------+
| name |
+------------+
| domain.tld |
+------------+
1 row in set (0.00 sec)
mysql>
After domain was found you should remove or change IP address from its DNS zone:
Domains -> domain.tld -> Web Site -> DNS Settings
This should make check box near IP address enabled on the IP addresses management page.
Additional information
You may connect to Plesk database using the following command:
~# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa