In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "sample Analysis of ubuntu 12.04 server Network configuration", which is easy to understand and well organized. I hope it can help you solve your doubts. Let me lead you to study and learn the article "sample Analysis of ubuntu 12.04 server Network configuration".
Ubuntu 12.04 server Network configuration
Recently, due to work needs, ubuntu 12.04 server version has been installed in the virtual machine.
Because the server version has no interface, many of them need to be configured on their own.
1. Configure the network IP address
Note that this is bridging mode
If you get IP and DNS automatically, you don't have to configure it. IP can be obtained automatically by DHCP.
Www.2cto.com
But servers generally use static IP, so you need to configure it manually.
The network configuration information of ubuntu is placed in / etc/network/interfaces
Sudo vim / etc/network/interfaces
Auto eth0
Iface eth0 inet dhcp
If you configure static ip, add the following:
Auto eth0
Iface eth0 inet static
Address 192.168.1.81
Netmask 255.255.255.0
Gateway 192.168.1.1
If the configuration takes effect, you need to restart the Nic:
Ifconfig eth0 down
Ifconfig eth0 up www.2cto.com
Then use the ifconfig command to see if the ip is configured successfully
2 configure the hostname, in fact, it can not be configured here, in order to build the cluster
Vi / etc/hosts
127.0.0.1 localhost
192.168.1.81 node81
192.168.1.82 node82
192.168.1.83 node83
Vi / etc/hostname
Node81
If the configuration is not successful, you need to restart the network service
/ etc/init.d/networking restart
3. DNS
If it is configured as static IP, the DNS in the DNS file will be gone after each shutdown and power-on.
Dns server information for ubuntu, put in / etc/resolv.conf
Add the dns server address, such as 192.168.1.1, in the above file
Nameserver 192.168.1.1
Permanent DNS
Sudo vi / etc/resolvconf/resolv.conf.d/base
Nameserver 192.168.1.1
When the above is done, generally restart the virtual machine. You can surf the Internet.
4. Virtualbox settings
If set to bridge mode, then the virtual machine system is equivalent to a physical computer, because the network of my school needs to be authenticated, so there is no way to access the Internet.
The bridge mode can be set to static IP.
If the NAT mode is set, the virtual machine can surf the Internet through the host. But ubuntu can not be set to static IP, this problem bothered me for a long time, because there was no way to access the network using NAT mode, and then it was changed to dynamically obtain IP so that I could access the Internet through NAT mode. Www.2cto.com
In the use of static IP, you can use an agent to surf the Internet.
Modify the .bashrc file by adding:
Http_proxy=proxy:8888 (add a proxy server in a similar format)
Export http_proxy
After saving and exiting:
Source / .bashrc
You can use an agent to surf the Internet in ubuntu server.
The above is all the contents of the article "sample Analysis of ubuntu 12.04 server Network configuration". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.