Go to Virtual Machine > Install VMware Tools (or VM > Install VMware Tools).
Note: If you are running the light version of Fusion, or a version of Workstation without VMware Tools, or VMware Player, you are prompted to download the Tools before they can be installed. Click Download Now to begin the download.
In the Ubuntu guest, run these commands:
sudo mkdir /mnt/cdrom
When prompted for a password, enter your Ubuntu admin user password.
Note: For security reasons, the typed password is not displayed. You do not need to enter your password again for the next five minutes.
sudo mount /dev/cdrom /mnt/cdrom or sudo mount /dev/sr0 /mnt/cdrom
The file name of the VMware Tools bundle varies depending on your version of the VMware product. Run this command to find the exact name:
ls /mnt/cdrom
tar xzvf /mnt/cdrom/VMwareTools-x.x.x-xxxx.tar.gz -C /tmp/
Note: x.x.x-xxxx is the version discovered in the previous step.
cd /tmp/vmware-tools-distrib/
sudo ./vmware-install.pl -d
Note: The -d switch assumes that you want to accept the defaults. If you do not use -d, press Return to accept each default or supply your own answers.
Run this command to reboot the virtual machine after the installation completes:
sudo reboot
Change IP:
Open network configuration file
$ sudo vi /etc/network/interfaces
OR
$ sudo nano /etc/network/interfaces
Find and remove dhcp entry:
iface eth0 inet dhcp
Append new network settings:
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.254
Save and close the file. Restart the network:
$ sudo /etc/init.d/networking restart
Open /etc/resolv.conf file
$ sudo vi /etc/resolv.conf
You need to remove old DNS server assigned by DHCP server:
search myisp.com
nameserver 192.168.1.254
nameserver 202.54.1.20
nameserver 202.54.1.30
Save and close the file.
$ host cyberciti.biz
You can also use commands to change settings. Please note that these settings are temporary and not the permanent. Use above method to make network changes permanent or GUI tool as described below.
$ ifconfig
$ sudo ifconfig eth0 down
OR
$ sudo ifdown eth0
$ sudo ifconfig eth0 up
OR
$ sudo ifup eth0
Activate network interface eth0 with a new IP (192.168.1.50) / netmask:
$ sudo ifconfig eth0 192.168.1.50 netmask 255.255.255.0 up
$ /sbin/route
OR
$ /sbin/route -n
Output:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 ra0
172.16.114.0 * 255.255.255.0 U 0 0 0 eth0
172.16.236.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.1.254 0.0.0.0 UG 0 0 0 ra0
$ sudo route add default gw 172.16.236.0
$ netstat -nat
$ sudo netstat -tulp
OR
$ sudo netstat -tulpn
$ netstat -i
$ netstat -e
$ netstat -te
$ netstat -tue
Where,
-t : TCP connections
-u : UDP connections
-e : Established
Send ICMP ECHO_REQUEST to network hosts, routers, servers etc with ping command. This verifies connectivity exists between local host and remote network system:
$ ping router
$ ping 192.168.1.254
$ ping cyberciti.biz
See simple Linux system monitoring with ping command and scripts for more information.
ipv4 and ipv6 settings ( sudo vi /etc/network/interfaces):
http://codingmyself.wordpress.com/2010/03/26/how-to-set-the-static-ipv4-and-ipv6-address-in-ubuntu/
auto lo
iface lo inet loopback
auto eth0
#ipv4 configuration
iface eth0 inet static
address 192.168.3.12
netmask 255.255.255.0
network 192.168.3.0
gateway 192.168.3.1
broadcast 192.168.3.255
#ipv6 configuration
iface eth0 inet6 static
address 2000:da8:203:612:0:3:0:12
netmask 96
gateway 2000:da8:203:612:0:3:0:1
vI /etc/hosts
改為以下:
127.0.0.1 localhost
127.0.1.1 www.your-domain.com www
重啟 apache:
sudo /etc/init.d/apache2 restart
設定 apache:
/etc/apache2/apache2.conf 為主要的設定檔
啟用網頁壓縮模組:
sudo a2enmod deflate
In the WinSCP login options window:
Click Advanced options
Go to Environment --> SCP/Shell (on left)
Select Shell: "sudo su -"