« 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... »)
 
 
(2 versions intermédiaires par le même utilisateur non affichées)
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
== Install Ubuntu ==
Open the VM Console and startup the machine to setup Ubuntu.


    sudo vi /etc/network/interfaces
* Choose language: English
* Press F4 for the installation modes
* Select "Instal a minimal virtual machine"
* Select "Install Ubuntu Server"
* Choose language: English
* Choose Region: other // Europe // France
* Choose detect keyboard layout and follow instructions with keys to press
* The initial settings will install
* Enter hostname
* Confirm timezone
* Choose Guided - use entire disk partitioning
* Validate writing changes to the filesystem
* The base system will install
* Create the inital user
* Ignore the proxy settings
* Choose to "install security updates automatically"
* Install these packages:
      (*) Basic Ubuntu server  (maybe not req !)
      (*) OpenSSH server
      (*) Virtual Machine host  (maybe not req!)
* Reboot server
* Configure network
* Install packages:
      apt-get install joe
      apt-get install VM-TOOLS
      apt-get install xfce4
      apt-get install x11vnc
      apt-get install ia32-libs


For the primary interface, which is usually eth0, you will see these lines:
== 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


    auto eth0
(Reference : http://www.howtogeek.com/howto/ubuntu/change-ubuntu-server-from-dhcp-to-a-static-ip-address/)
    iface eth0 inet dhcp
 
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.
 
    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
 
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

Dernière version du 25 juillet 2010 à 17:23

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

Install Ubuntu

Open the VM Console and startup the machine to setup Ubuntu.

  • Choose language: English
  • Press F4 for the installation modes
  • Select "Instal a minimal virtual machine"
  • Select "Install Ubuntu Server"
  • Choose language: English
  • Choose Region: other // Europe // France
  • Choose detect keyboard layout and follow instructions with keys to press
  • The initial settings will install
  • Enter hostname
  • Confirm timezone
  • Choose Guided - use entire disk partitioning
  • Validate writing changes to the filesystem
  • The base system will install
  • Create the inital user
  • Ignore the proxy settings
  • Choose to "install security updates automatically"
  • Install these packages:
      (*) Basic Ubuntu server  (maybe not req !)
      (*) OpenSSH server
      (*) Virtual Machine host  (maybe not req!)
  • Reboot server
  • Configure network
  • Install packages:
      apt-get install joe
      apt-get install VM-TOOLS
      apt-get install xfce4
      apt-get install x11vnc
      apt-get install ia32-libs

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

(Reference : http://www.howtogeek.com/howto/ubuntu/change-ubuntu-server-from-dhcp-to-a-static-ip-address/)