By ninegolfy
Create a droplet using snapshot (VestaCP show the old ip addr interface) .
As a new droplet, we will have a new ip address interface but it seems my vestacp or linux will contain ip address for interface as an old one then how to change this completely (debian linux ? , vestacp config file ? , phpmysql ? , nginx ? , mysql ? , wordpress )
Sorry I am really new to linux and these cli platform…
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
When you create a new droplet from your snapshot the IP address settings in Linux are updated but VestaCP stores this information separately. A command is included for you to update the IP address. After creating your new droplet you can run
v-add-sys-ip <*>your.ip.address <*>
Using droplet meta-data and user-data you can automate this process. On the create page, when using your VestaCP image, check the user-data checkbox and paste the following in the box:
#!/bin/sh
myip=`ifconfig eth0 | grep inet | grep -v "inet6" | grep -v "127.0.0.1" | sed 's/:/ /g' | awk '{print $3}'`;
v-add-sys-ip $myip;
This script will use droplet meta-data to get your new droplet’s IP address and run the command on the first boot. I don’t have a VestaCP image to test this with so I’d recommend testing with yours before using this method in production.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.