CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)

Because CentOS 7 is one of the Linux distributions, so we need to understand before installing 7 CentSO What is Linux system:

  • Linux is a free to use and free dissemination of Unix-like operating system, is based on POSIX and Unix multi-user, multi-tasking, multi-threading and multi-CPU support for the operating system. With the development of the Internet, Linux is supported by software enthusiasts from around the world, organizations, companies. In addition it maintained a strong momentum of development in server operating systems other than on personal computers, embedded systems have made great progress. Not only can users intuitive access to the implementation mechanism of the operating system, but can be modified to improve the operating system according to their needs, to maximize meet the needs of users.
  • Not only Linux system performance and stability, and is open source software. The core components of firewall performance and efficient, simple configuration, to ensure the safety of the system. In many enterprise networks, in pursuit of speed and security, Linux as a server operating system is not just use the network operation and maintenance personnel, either as a Linux server, but also can be used as a network firewall is a major highlight of Linux.
  • Compared with other operating systems Linux, an open-source, no copyright, technical community of users and more features, open source allows the user to cut free, highly flexible, powerful and low cost. In particular, an embedded system network protocol stack, can be achieved through the proper configuration of router functions. These features make Linux an ideal development platform for the development of routing and switching equipment.

Acquaintance Linux system
Linux operating system consisting of
Linux system configuration elements:

  1. Linux kernel: c language (for procedural languages)
  2. Various peripheral procedures: C ++ language, for example: the desktop, the network function
    CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
    parses the version number:
    XX.YY.ZZ
    1.XX major version
    2.YY minor version number
    3.ZZ Amended
    4 represents odd development board
    5. even number It represents a stable version
    stable version: 2.4.6 to 2.4.7 of which by 2.4 to 2.4.8 to fix BUG .. . .
    Development Version: 2.4.7 a copy obtained by adding new functions to 2.5.7 2.5 .. . . Eventually to 2.5.77
    stable release: then obtained from 2.6.1 2.5.77 2.6 copies. . . By which to repair BUG 2.6.18

Agreement Introduction:
GPLZ (GUN General Public License)
common free software license agreement 1.
2. allow any user to copy, transfer, modify, redistribute
software based on free software 3. Modify released again, still need to comply with the GPL
LGPL (Lesser General Public License)
1.LGPL relative to the GPL more relaxed, not allowed to disclose the full source code
2. to provide more space for the development of commercial software based on the Linux platform

Open source software: open source software (Open Source sofeware)
Firefox web browser,
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
OpenOffice office suite,
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
the Apache Web server software
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)

主流的Linux分支
主流的Linux发行版本构成:
1.基于Linux内核的类Unix操作系统
2.Linux内核和各种自由软件
发行版的名称、版本由发行厂商决定:
1.Red Hat红帽系列
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
2.Debian凯利系列
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
3.Ubuntu乌班图系列
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)

Linux中将硬盘、分区等设备均表示为文件
/dev /hda5

  1. dev:硬件设备文件所在的目录
  2. hd:hd表示IDE设备、sd代表SCSI设备
  3. a:硬盘的顺序号,以字母a、b、c….表示
  4. 5:分区的顺序号,以数字1、2、3…表示

硬盘及分区结构
硬盘分区类型:
MBR:4个分区 分区类型:主分区、扩展分区、逻辑分区
注意:至少一个主分区
1.主+主+主+主
2.主+主+主+扩展
3.主+主+扩展+扩展
4.主+扩展+扩展+扩展
扩展分区无法直接存储数据,需要逻辑分区去存储数据
逻辑分区需要建立在扩展分区基础之上
GPT : 128个分区
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
注意:1-4是主分区,所以第一个逻辑分区是从5开始的

文件系统类型:
Linux中默认使用的文件系统类型
1.EXT4第四代扩展文件系统 6.0版本
2.XFS日志文件系统 7.0版本
3.SWAP交换文件系统
Linux支持的其他文件系统类型
1.FAT16/32:不超过4GB大小的文件大小
2.NTFS
3.XFS,JFS

接下来我们就开始安装CentOS 7的镜像文件:

软件的准备:
1.VMware(可以在我之前的文章中找到下载链接)
2.CentOS 7的镜像文件,因为文件过大无法上传到网盘中,所以我把官网的下载的连接贴给大家用来下载,这里我们选择的是X86 64位的镜像文件:
http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)

  1. Xshall终端模拟软件,网盘链接和提取码如下:
    链接:https://pan.baidu.com/s/1OrTfEPNRSWFcBMsX18W-cQ
    提取码:dat8

所有东西下载准备完毕之后我们就可以开始安装了。
我们进入到VMware虚拟机中点击新建虚拟机
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
打开新建虚拟机向导之后,类型配置选择自定义,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
版本兼容选择14.x默认,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
安装操作系统,此处选择稍后安装,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
客户机操作系统选择Linux,版本选择CentOS 7 64位,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
设置虚拟机名称为centos 7-6,安装位置自行选择路径,此处我们安装在D盘的centos7-6文件夹中,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
处理器配置界面:如果是i5处理器选择单核,如果是i7四核八线程处理器选择双核,此处我们选择单核,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
虚拟机内存界面:最少为1GB,如果电脑本身内存是4G的就设为1G,,如果是8G的设置为2G,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
网络类型界面:选择NAT,此处我们要求建立的虚拟机能够上网,保证centos一直处于联网状态,因为安装包需要联网安装,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
控制器类型默认推荐,点击下一步
虚拟磁盘类型默认推荐,点击下一步
选择磁盘:创建新虚拟磁盘,点击下一步
指定磁盘容量:设定为40GB,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
磁盘文件界面:选择放在安装文件夹下,此处为centos7-6,点击下一步
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
准备创建虚拟机界面:此时我们可以对硬件进行优化,点击自定义硬件,移除声卡和打印机,同时我们这个时候可以把centos7的镜像文件加载进来,选择CD/DVD,使用ISO镜像文件,点击浏览找到自己存放centos7镜像文件的根目录把它加载进来,完成之后点击关闭,再点击完成,此时虚拟机就已经建好了。
过程和结果如下图所示
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)

接下来我们点击左上角的开启虚拟机,此时跳出的界面我们按上下按键选择第一个,就是开始安装,然后敲回车:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
安装完成之后会跳出提示框欢迎界面,我们设置语言为中文/简体中文,点击继续
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
进入安装信息摘要界面,此时我们需要做如下设置:
1.软件选择:此时默认的是最小安装只安装内核,我们点击进入之后选择GNOME桌面,点击完成,结束之后加载完成图标处会重新刷新
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
2.安装位置:此时默认的是已选择自动分区,我们点击进入之后选择我要配置分区,点击完成进入手动分区界面 ,此时默认的分区方案是LVM逻辑分区的方案,我们下拉之后改为标准分区;接下来我们就可以创建分区(此处又叫添加新挂载点),此处我们需要添加四个挂载点,分别如下:
1.“/”:根,分配20GB
2.“swap”:交换分区,虚拟内存(物理内存小于4GB设定为虚拟内存大小的1.5~2倍),因为我们之前创建的物理内存为2G,所以此处我们分配4GB
3.“boot”:启动分区,分配6GB
4.“home”:家目录,分配10GB
全部添加完成后就能看到所有我们添加的挂载点和他的大小了,此时我们呢点击完成,跳出更改摘要界面罗列出我们添加的分区,接着点击接受更改此时分区设置结束。具体过程步骤如下:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
其它的选项就不需要再进行设置了,我们点击右下角的开始安装就可以了,进入如下界面:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
我们可以在此界面先对root超级管理员的密码进行设置:我们进入ROOT密码设置,此处我们设置为123123,再次输入确认,此时设置的密码比较简单,我们在点击左上角的完成的时候下方会跳出 “密码不符合复杂性要求”的提示,但是我们只要再次点击完成依然额可以设置成功。
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
安装完成之后点击重启,重启完成之后会跳出初始设置的界面:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
点击许可协议,勾选下方的同意许可协议,再点击左上方的完成
回到主界面之后点击右下角的完成配置,此时系统会自动重启进入centos7的欢迎设置界面,接下来我们对以下几项进行设置:

  1. 语言设置为汉语,点击前进
  2. 键盘默认为汉语,点击前进
  3. 隐私服务默认打开,点击前进
  4. 时区设置为上海,点击前进
  5. 在线账号没有,点击跳过
  6. 关于您(添加普通用户名称):此处我们添加zhagnsan,点击前进
  7. 密码设定:123123,再次确定输入,点击前进
  8. 点击开始使用CentOS,此时再次启动的时候就会用zhangsan的账户登录,但是因为普通用户权限不够,所以我们进入系统之后需要换超级管理员用户root登录

重启完成后我们会得到如下CentOS的主界面:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
首先我们点击右上角的关闭图标,点击zhangsan,选择注销,之后换ROOT超级管理员账户登录,注销之后会退回到登录界面,点击未列出,输入用户名root点击下一步,输入密码123123点击登录,此时会进入到上面同样的设置流程,操作同上就可以了,我就不在这里重复了;进入系统之后我们查看账户此时登陆的就是root用户了。具体操作如下图所示:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
接下来我们需要做的就是设置之后让它能够上网,我们点击左上角的应用程序,发现系统默认自带的浏览器为火狐浏览器
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
虽然此时网卡模式为NAT模式,但是此时点击浏览器还是无法连接上网的,接下来我们要做的就是把它接入到网络,必须找到网卡之后才可以设置接入网络,我们回到桌面右键点击空白处,选择“打开终端”,此时跳出命令界面:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
接下来我们输入命令:vim /etc/sysconfig/network-scripts/ifcfg-ens33找到网卡,敲回车
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
此时我们进入网卡配置表,看到最下面有一个ONBOOT选项是控制网卡开启和关闭的,如果状态为NO就是关闭,如果是yes就是开启,此处我们需要把它更改为yes,我们要用上下左右按键移动光标到这一行,但是此处想直接修改是不行的,我们要先输入“i”,下面会提示状态为插入
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
我们把no给删除掉输入yes,修改完成之后我们还要保存此修改,这时候按Esc退出,再输入“:wq”号保存并退出。

因为我们修改的是网卡配置文件,所以我们需要重启网络服务,操作如下:
在命令中输入:servicre network restart,然后敲回车
然后查看IP地址:ifconfig,敲回车一共有三块网卡,我们只要看第一个ens33本地网卡
里面有如下信息:
1.IP地址:192.168.195.136
2.子网掩码:255.255.255.0
3.MAC地址:00:0c:29:c9:9d:88
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
此时我们就可以用火狐浏览器测试能不能上网了,输入百度的网址www.baidu.com 是可以进入的,为可上网状态。
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
我们也可以回到命令界面输入ping www.baidu.com 敲回车,测试互通,此时默认长测不停止,我们可以按Ctrl+C停止,操作如下图:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)

接下来我们用Xshell进行远程连接,需要提前在自己的宿主机中安装Xshell终端模拟软件(远程连接服务器的),图标如下:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
接下来双击打开进入此软件进行相关的连接和优化:
进入之后跳出窗口,点击左上角可以新建会话也可以直接连接,直接连接后弹出如下窗口:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
此时我们设置的项目如下:
1.窗口名称:centos7-6
2.协议:SSH
3.主机为对方的IP地址:此处为192.168.195.136
4.端口号:22
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
接下来就是进行优化的过程:
1.点击终端,在编码处我们要选择UTF-8结尾的是识别中文的,如果使用别的会看到乱码(此处默认就可以了)
2.键盘:键序列两边选择ASCII 127
3.外观:配色方案选择ANSI Colors on White
4.字体:字体名,亚洲字体全部改为Consolas因为该字体能够区分中英文的标点符号,字体大小改为14
到此所有的优化全部结束。

After the end of all of the above modifications click the link below. Xshell into the command interface, because before entering each other's IP address, so this time out of the box shells landed prompted to enter this key hosts, this time we choose to accept and save, this time you need to enter a user name, we enter root (administrator privileges maximum), check the following to remember the user name, click OK, then be prompted for a password, enter the password set before us 123123, also check the following remember your password, then click OK at this time centos7 connected to, the steps as shown below:
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
in this case we enter ifconfig command, knock out of the transport interface and display previously entered ifconfig centos7 obtained in the same interface (the interface of FIG. 1 is a centos7, FIG. 2 is a Xshell interface):
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
CentOS 7 installed on the virtual machine, and remote control using Xshell (binding theory of operation!)
in this case remote control! We can think about how to use remote operation: Because some of us tend to have edited the script on their computers, servers no matter what position, as long as in the case of open, we can directly use their host connection run Xshell corresponding server for remote management on it, and we can put the edited script contents pasted directly into Xshell command interface directly loaded on it, this is a way to improve efficiency!

These are the CentOS 7 on a virtual machine to install and use the remote control Xshell content, thank you!

Guess you like

Origin blog.51cto.com/14464303/2428229