Search code examples
linuxubuntu-14.04bitnamibackendless

Permanently configure static IP Address of Bitnami Standalone Linux version


How to permanently configure static IP Address of Bitnami Backendless Standalone Linux version?

The Bitnami VM comes configured to use DHCP.

The Bitnami FAQ says you can change the IP address using the command below:

An alternative approach is to configure the network manually and assign a static IP address to the virtual machine. For example, if your local network uses IP addresses of the form 192.168.1.X and you know that the IP address 192.168.1.234 is unassigned, manually assign this to the virtual machine by executing the command below at the virtual machine console:

 sudo ifconfig eth0 192.168.1.234 netmask 255.255.255.0 up 

Unfortunately, the IP Address is only assigned until the server is rebooted. After rebooting the VM, the IP address is dynamically allocated using DHCP.


Solution

  • ifconfig changes the IP Address only during the system runtime.

    Depending on your Linux distribution, you've got to change the network setting by editing the related files.

    Debian/Ubuntu

    • $ sudo vi /etc/network/interfaces

    Fedora/Centos

    • $ sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0