In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to install and use CentOS". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Download the image
To learn centos, you naturally need to install this system. I installed the centos system using the virtualbox virtual machine and installed the ubuntu16.10 desktop system on an abandoned laptop. Let's first talk about virtualbox and press centos. Download and install virtualbox this software, the process of installing this software is the same as ordinary windows software, the next step all the way, and then download the image of centos, I went to find NetEase's open source mirror station, and found that centos6.5 is gone, 6.x version only 6.8, then can only install centos6.8
Solve the problem that virtual machines can only install 32-bit systems
Open virtualbox and find that only 32-bit systems can be installed in the drop-down list of new systems. To solve this problem, you need to allow cpu hardware virtualization and shut down the hyper virtual machine services that come with the windows system. My notebook is thinkpad E550. After booting, I press the fn+f1 key to enter bios, find setup== > security== > virtualization and replace it with enabled. If you shut down the hyper service, you need to go to the service management to close it.
Virtualbox installation system, or very simple, click New, select a system, all the way to the next step. Select the virtual computer, right-click to set up, find the storage, add a virtual optical drive, and select the iso file.
Installation system
Because we press it in the virtual machine, we don't have to worry about partitioning data or anything. In the next step along the way, we encounter skipping detection and confirmation that we want to write to disk. Only the following two are to pay attention, select the Asian Shanghai time zone and enter the root password (very important).
Solve the problem of no network connection and no eth0 network card
After the system is installed, after reboot, enter the user name root and password xxx, I entered the centos system, because I can not always use the terminal to type commands, I want to use the ssh remote software under windows to connect to the system, so I need to know what its ip address is, check the ip address using the command ifconfig, and find that it has only one lo network card, the address is 127.0.0.1, this is its local loop address, can not connect remotely And now also do not connect to the Internet, I ping baidu.com, it prompts ping:unkonw host. On the virtualbox list, right-click the virtual computer, click Settings, select the network, and select the bridge network card from the connection mode drop-down list on network card 1. The bridge network card means that this virtual machine is equivalent to an independent computer in the local area network. It has its own local area network ip, which can be accessed by all computers in the local area network.
# enter this directory cd / etc/sysconfig/network-scripts# to edit this file vi ifcfg-eth0# press I edit # change onboot=no to onboot=yes# press esc to exit editing status # press: wq save this file # restart network service network restart# to view ipifconfig
At this time, you can see the eth0 network card and dynamically assigned LAN ip, for example: 192.168.2.141, open the command line ping192.168.2.141 on the win system, and you can ping at this time. Check the ip of the win system, use ipconfig, for example: 192.168.2.145, ping192.168.2.145 in the virtual machine centos, and you can also ping at this time. Ping baidu.com in the virtual machine to see if the network is accessible, at this time it should be able to ping completely normal.
Remote connection
The ssh remote tool I use is securecrt, because it can open multiple tab tabs, which is very convenient to open multiple windows. After downloading and installing, right-click the session on the left, select quick connect, and then enter the hostname, user name root, and click connect. It will ask for the secret of root and fill in it. On the connection, you can type commands in this windows software, and it is also convenient to copy and paste commands, but it is not convenient to paste in the virtual machine terminal.
How to set a static ip address
The current ip address is dynamically assigned and may change at any time. We can't always change the ip when we connect remotely. Of course, I can ignore this, which can be used normally before. To solve the problem that ip will change, it is necessary to set static ip or edit the configuration file of the network card just now, the address is / etc/sysconfig/network-scripts/ifcfg-eth0. I will first check the ipconfig on the win system to see what the mask is and what the gateway is.
Then modify the configuration file of linux. Everyone must take a look at the network of their computers and do not copy them.
# set static ipbootproto=static#ip address ipaddr=192.168.2.100# mask netmask=255.255.255.0# gateway gateway=192.168.2.1
Service network restart restarts the network, now that my virtual machine static ip address is set, there is no problem with remote connection
That's all for the content of "how to install and use CentOS". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.