« Guest VMWare » : différence entre les versions

De FrozenWiki
Aller à la navigation Aller à la recherche
(Page créée avec « Change Ubuntu Server from DHCP to a Static IP Address If the Ubuntu Server installer has set your server to use DHCP, you will want to change it to a static IP address so th... »)
 
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
Change Ubuntu Server from DHCP to a Static IP Address
== Create a new Virtual Machine in VMWare Server Administration Tool ==


If the Ubuntu Server installer has set your server to use DHCP, you will want to change it to a static IP address so that people can actually use it.
* Open VM console
* Create Virtual Machine:
** Give a name
** Datastore: standard
** Guest OS: Linux operating system / Ubuntu Linux (64-bit)
** Memory size: 128MB
** #CPU: 1
** Create a new virtual disk: 4GB , Policies>>  Optimize for performance
** Add a Network Adapter (bridged)
** Use an ISO image: ubuntu-10.04-server-adm64.iso
** Don't add a floppy drive
** Don't add a USB controller
** Finish


Let’s open up the /etc/network/interfaces file. I’m going to use vi, but you can choose a different editor
== Change Ubuntu Server from DHCP to a Static IP Address ==
 
* Open up the /etc/network/interfaces file. For the primary interface, which is usually eth0, you will see these lines:
    sudo vi /etc/network/interfaces
auto eth0
 
iface eth0 inet dhcp
For the primary interface, which is usually eth0, you will see these lines:
Change it to values similar to:
 
auto eth0
    auto eth0
iface eth0 inet static
    iface eth0 inet dhcp
        address 192.168.1.100
 
        netmask 255.255.255.0
As you can see, it’s using DHCP right now. We are going to change dhcp to static, and then there are a number of options that should be added below it. Obviously you’d customize this to your network.
        network 192.168.1.0
 
        broadcast 192.168.1.255
    auto eth0
        gateway 192.168.1.1
    iface eth0 inet static
* Add the DNS settings in the /etc/resolv.conf file. On the line ‘name server xxx.xxx.xxx.xxx’ replace the x with the IP of your name server. (You can do ifconfig /all to find out what they are)
            address 192.168.1.100
* Restart the networking components:
            netmask 255.255.255.0
sudo /etc/init.d/networking restart
            network 192.168.1.0
            broadcast 192.168.1.255
            gateway 192.168.1.1
 
Now we’ll need to add in the DNS settings by editing the resolv.conf file:
 
    sudo vi /etc/resolv.conf
 
On the line ‘name server xxx.xxx.xxx.xxx’ replace the x with the IP of your name server. (You can do ifconfig /all to find out what they are)
 
Now we’ll just need to restart the networking components:
 
    sudo /etc/init.d/networking restart

Version du 25 juillet 2010 à 17:21

Create a new Virtual Machine in VMWare Server Administration Tool

  • Open VM console
  • Create Virtual Machine:
    • Give a name
    • Datastore: standard
    • Guest OS: Linux operating system / Ubuntu Linux (64-bit)
    • Memory size: 128MB
    • #CPU: 1
    • Create a new virtual disk: 4GB , Policies>> Optimize for performance
    • Add a Network Adapter (bridged)
    • Use an ISO image: ubuntu-10.04-server-adm64.iso
    • Don't add a floppy drive
    • Don't add a USB controller
    • Finish

Change Ubuntu Server from DHCP to a Static IP Address

  • Open up the /etc/network/interfaces file. For the primary interface, which is usually eth0, you will see these lines:
auto eth0
iface eth0 inet dhcp

Change it to values similar to:

auto eth0
iface eth0 inet static
       address 192.168.1.100
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
  • Add the DNS settings in the /etc/resolv.conf file. On the line ‘name server xxx.xxx.xxx.xxx’ replace the x with the IP of your name server. (You can do ifconfig /all to find out what they are)
  • Restart the networking components:
sudo /etc/init.d/networking restart