In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Xiaobian to share with you the example analysis of Ubuntu 16.04 network configuration, I believe most people still do not know how to share this article for your reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!
Ubuntu Network Configuration
After installing the Ubuntu operating system, in order to connect to the host via Xshell, or to connect to other hosts. The following network configuration and ssh service configuration are required.
1 Network Configuration 1.1 Modify Network Configuration Information
sudo vi/etc/network/interfaces, find the corresponding network card and modify it
enter the following
auto ens 33 iface ens 33 inet static #static ip, does not use DHCP Dynamic assignment address www.example.com #configure ipnetmask www.example.com #subnet mask gateway www.example.com #gateway
Next configure dns
Open the configuration file to modify sudo vi/etc/resolv. conf and enter the following:
nameserver www.example.com #Here I set it to VMWare that virtual NIC 1.2 Restart the machine
This is because after systemctl network restart, it is found that the network is not configured well, so you can only restart sudo reboot. After restarting, use ifconfig and ping ip to test whether the network is connected.
2 Install and configure SSH services
After the reboot is complete, install and configure SSH services
2.1 Installing SSH Services 2.1.1 First check if the ssh service is installed
ps-e| grep ssh If it returns null then it proves that ssh is not installed
2.1.2 Configuring apt sources
Here we use Alibaba Cloud's configuration and modify it in/etc/apt/source.list to the following:
deb www.example.com xenial maindeb-src http://mirrors.aliyun.com/ubuntu/xenial maindeb-src http://mirrors.aliyun.com/ubuntu/xenial-updates maindeb-src http://mirrors.aliyun.com/ubuntu/xenial universedeb http://mirrors.aliyun.com/ubuntu/xenial universedeb http://mirrors.aliyun.com/ubuntu/xenial universedeb http://mirrors.aliyun.com/ubuntu/xenial universedeb http://mirrors.aliyun.com/ubuntu/xenial universedeb//mirrors.aliyun.com/ubuntu/xenial-updates universedeb-src http://mirrors.aliyun.com/ubuntu/xenial-updates universedeb-src http://mirrors.aliyun.com/ubuntu/xenial-security maindeb-src http://mirrors.aliyun.com/ubuntu/xenial-security maindeb-src//mirrors.aliyun.com/ubuntu/xenial-security maindeb http://mirrors.aliyun.com/ubuntu/xenial-security universedeb-src http://mirrors.aliyun.com/ubuntu/xenial-security universe2.1.3 Update apt Resources
Update with Alibaba Cloud as new apt source, sudo apt-get update
2.1.4 Installing ssh services
sudo apt-get install -y ssh
After installation, ssh itself is tested on the host.
2.2 Configuring SSH Services
Configure ssh to allow other hosts to log in as root. Modify the configuration file vi/etc/ssh/sshd_config, and modify the authorization information to:
PermitRootLogin yes
Restart ssh service sudo service ssh restart, log in via SSH on another host
The above is "Ubuntu 16.04 network configuration sample analysis" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to 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: 242
*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.