Ubuntu12.04server has recently installed ubuntu12.04server on the virtual machine because of work requirements. Because the server version does not have an interface, many of them need to be configured by themselves. 1. configure the network IP address. if the IP address is automatically obtained and the DNS is automatically obtained, no need...
The network configuration of ubuntu 12.04 server has been installed on the virtual machine of ubuntu 12.04 server due to work needs recently. Because the server version does not have an interface, many of them need to be configured by themselves. 1. configure the network IP address. if the IP address is automatically obtained and the DNS is automatically obtained, no configuration is required. IP addresses can be automatically obtained through DHCP. Www.2cto.com but the server generally uses a static IP address, you need to manually configure it. The network configuration information of ubuntu is stored in/etc/network/interfaces, sudo vim/etc/network/interfaces auto eth0iface eth0 inet dhcp. if the static IP address is configured, add the following content: auto eth0iface eth0 inet staticaddress 192.168.1.201netmask 255.255.255.255.0 gateway 192.168.1.1 if the configuration takes effect, restart the NIC: ifconfig eth0 downifconfig eth0 up www.2cto.com and run the ifconfig command to check whether the ip address is configured, restart the network service/etc/init. d/networking restart 2. if the DNS is configured as a static IP address, the DNS file will no longer exist after the DNS is shut down and then started. Therefore, manual configuration is required for each boot, but the server is rarely shut down. The dns server information of ubuntu is stored in/etc/resolv. in conf, add the dns server address, for example, 202.112.125.53, add nameserver 202.112.125.53 3 to the above file. if virtualbox is set to bridge mode, the virtual machine system is equivalent to a physical computer. because the network of my school needs to be authenticated, there is no way to access the Internet. Static IP addresses can be set in the bridge mode. If you set the NAT mode, the VM can access the Internet through the host. However, ubuntu cannot be set to a static IP address. this problem had plagued me for a long time because I had no way to access the network using the NAT mode. later I changed it to dynamic access to the IP address and then I could access the Internet through the NAT mode. Www.2cto.com can use a proxy to access the internet when using a static IP address. Modify the. bashrc file and add http_proxy = proxy: 8888 (add proxy server in a similar format) to the last line. after saving and exiting the port http_proxy, run the following command: source ~ /. Bashrc can use the proxy to access the Internet in ubuntu server.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service