The most complete linux system installation tutorials and troubleshooting methods

Chapter. 4 Linux and system installation and connection     260

4 .1 Linux development history of     260

4.2 GPL agreement , FSF protocol     261

4.3 linux installation of the system     261

4.3.1 hardware environment to prepare     261

4.3.2 virtual environment to prepare     262

4.3.3 system installation     263

4.3.4 Introduction mirroring     269

4.3.5 virtual machine common mistakes     270

4.3.6 virtual machine how to enter the BIOS , how to set installation interface     272

4.3.7 has been successfully installed in the system , how to enter the installation interface again     272

4.3.8 What are the common methods of partitioning, and when to use which partition , swap the role of partition , when insufficient memory space will cause any problems     273

4.3.9 swap the role of partition : When out of memory space, temporary hard disk space for swap space usage to the memory     274

4.3.10 virtual machine some common tips     275

4.3.11 the NAT, the difference between the bridge and only host     278

4.4 local connection linux system     279

4.4.1 nmtui configuration     280

4.4.2 verify that the card is configured correctly     282

4.4.3 Local LAN network connectivity solutions fail     284

4. . 5 remote connection linux system     286

4.5.1 Remote connection linx system and optimization tools     286

4.5.2 linux connection     296

4.5.3 linux connect to the server failed     299

4.6 linux server goes wrong password system how to solve     301

4.6.1 centos6.9 how to solve the system     301

4.6.2 centos7.6 how to solve the system     304

Chapter. 4 Linux and system installation and connection

4 .1 development history of Linux

In 1969 Bell Labs invented unix system

Since the unix system is relatively easy to use, various hardware vendors in order to maximize the benefits, are modified to unix systems can use their own hardware, and a surcharge

In 1983, in order to break the above case

Stallman decided to develop a free, stable system

The company is the Free Software Foundation

Project GNU project (GNU's not unix)

Develop content, the kernel; interpreter; other third-party software

In 1986, a professor Gerald Tannebaum developed for teachers to use the system, Minix (Minix because the system is only suitable for teaching, so the function can not meet business requirements)

In 1990, the Finnish university Torvalds developed the linux kernel + GNU project development is linux system

4.2 GPL agreement , FSF agreement

GPL agreement: that we can ensure that any person can freely modify and share software free software, and to ensure the freedom to modify and distribute the source code of the software, but will have to modify the source code release out of place

FSF: Free Software Foundation: free, free, no limit commercial copyright (is free does not mean free, is free of rights)

Chapter 5 linux common shortcuts

No.

hot key

description

1

Ctrl +c

The end of the running program

2

Ctrl +l

Clear screen

3

Ctrl +

 
     
     
     
     

 

Installation 4.3 linux system

Preparation 4.3.1 Hardware environment

Cpu: Minimum i5

Memory: Minimum 8G

Hard Disk: minimum 500G

4.3.2 prepare a virtual environment

Installation VMvare: https://blog.51cto.com/14152159/2434000

4.3.3 installed system

4.3.3.1 mounting system, a number of seconds interface appears, first we single mouse, enters inside the black box, select Install Centos 7, in which the input command as shown below

4.3.3.2 click on the enter button to enter the language selection interface, all default English, click Next

4.3.3.3 Click NETWORK && hostnames, click configure, select enter inside General , as shown below, the hook up √

4.3.3.4 click IPv4 Setting, set the IP address


4.3.3.5 Select the partition, I'm going to select the configuration partition, as shown below

4.3.3.6 partition configuration

4.3.3.7 software installation (SOFTWARE)

4.3.3.8 root password configuration

4.3.3.9 installation is complete

4.3.4 Mirroring Introduction

The latest mirror site: mirrors.aliyun.com

Old mirror site: http://vault.centos.org/

  • (1) Each mirror
  • DVD standard version
  • Everything full version
  • LikeDE demo version
  • Minimal version Introduction
  • Netinstall network installation
  • The difference (2) iso with the torrent
  • Iso image file
  • Torrent seed file

4.3.5 virtual machine common mistakes

4.3.5.1 virtual machine to be occupied

a. due to open multiple virtual machine

b. virtual machine abnormal shutdown caused by (do not close the command, directly off the computer)

Solution: 1. all virtual machines to shut down

2. Locate the virtual machine path, the two files to be deleted

4.3.6 virtual machine how to enter the BIOS , how to set installation interface

4.3.6.1 进入bios的方法

4.3.7在系统已经安装成功下,怎么再次进入安装界面

在boot界面按住shift+(+),就可以将CD-ROM Drive成功设置成第一开机启动项

a.安装界面的选项

Install Centos 7:安装centos7

aa.将网卡名字改为eth0的方式:按住tab键,输入net.ifnames=0 biosdevname=0

Test this media & install Centos 7:先测试光驱在安装centos7

Troubleshooting:排错

4.3.8 常见的分区方法有哪些,什么时候使用哪种分区,swap分区的作用,内存空间不足的时候会造成什么问题

4.3.8.1 标准分区(上司没有特殊要求的时候)

  • /boot 200M
  • swap 本身内存的1.5倍
  • / 剩余硬盘的大小

4.3.8.2 重要数据的分区(上司重点说明某些数据比较重要的时候)

  • /boot 200M
  • swap 本身内存的1.5倍
  • / 50-200g

/data 剩余的分给数据分区

4.3.8.3 未知分区(上司目前也在迷茫的时候)

  • /boot 200M
  • swap 本身内存的1.5倍
  • / 50-200g
  • ???? 项目现场随机分配(可以使用fdisk/parted来进行剩余硬盘的分区)

4.3.9 swap分区的作用:内存空间不足的时候,临时将硬盘的空间交换给内存空间使用

内存空间不足的情况

a.windows会造成电脑保护机制,立马蓝屏

b.linux会造成,进程被杀死

服务宕机

4.3.10 虚拟机常见的一些小技巧

4.3.10.1 当你在操作的时候,你可以在不用虚拟机的时候不需要关闭,可以挂起

4.3.10.2 当你需要开启/关闭/挂起n台虚拟机的时候,可以在windows下面找见系统进程所显示的光标虚拟机,点击右键,则可以看见多台虚拟机操作

4.3.10.3 虚拟机快照拍摄(快照的作用就是可以进行指定地方的还原,相当于游戏里面进行保存的机制)

4.3.10.4 废旧虚拟机删除方式

4.3.11 NAT,桥接和仅主机的区别

4.3.11.1 NAT

虚拟主机---->宿主机------>互联网(虚拟主机与宿主机为父子关系(虚拟主机没有自主性,如果宿主机出现问题,虚拟主机是不可以和外界进行联络的,继承关系))

优点:虚拟主机不容易造成IP地址的冲突

缺点:虚拟主机需要借助宿主机才可以上外网,独立性比较差

4.3.11.2 桥接模式

虚拟主机---->宿主机------>互联网(虚拟主机与宿主机为父子关系(虚拟主机有自主性,如果宿主机出现问题,虚拟主机可以自己和外界进行联络,合作关系))

优点:虚拟主机不需要借助宿主机就可以和外界进行联络,独立性比较强

缺点:虚拟主机由于具有和外界独立进行联络的能力,所以会容易造成IP的冲突

4.3.11.3 仅主机模式

可以连接局域网

 

4.4 本地连接linux系统

4.4.1 本地连接

4.4.1 nmtui的配置

4.4.2 验证网卡配置是否正确

ping 223.5.5.5是否通畅,此情况为不通畅的情况,针对这个情况,目前做如下解决方案

4.4.3 本地网卡网络连接失败的解决办法

4.4.3.1 查看网络配置是否正确

4.4.3.2 重启网络服务:(systemctl restart network)

4.4.3.3 查看网卡地址(centos7:ip addr show centos6:ifconfig)

4.4.3.4 查看路由地址(centos7:ip route show centos6:route -n)

4.4.3.5 查看网络编辑器里面的路由是否正常

4.4.3.6 再测ping,发现已经成功

4.5 远程连接linux系统

4.5.1 远程连接linx系统工具及优化

4.5.1.1 工具为xshell(主推),SecureCRT,butty

优化:

4.5.1.2 单机右键,将地址栏和链接栏去掉勾选

4.5.1.3 单机文件----属性,找到终端,将终端类型修改为linux,将缓冲区设置为最大值200000

4.5.1.4 点击VT模式,将初始数字键盘改变为(设置为普通);点击高级模式,将禁用终端更改标题勾选

4.5.1.5 点击外观,将字体大小设置为14,字体名为DejaVu Sans Mono,可以使用闪烁的光标(这个设置根基 自己的爱好)

4.5.1.6 点击高级,选择日志记录(日志记录很重要,切记别选择覆盖,这样你的操作会永久保存)

4.5.1.6 点击工具选项,选择高级,将禁用铃声勾选上,在打开常规,将会话选项设置好(会话选项是将你连接欸服务器的地址会记录上面,当你去其他公司工作的时候,可以快速的将会话记录)

4.5.2 linux的连接

4.5.2.1 点击新增,输入名称(自己随便写),协议为(SSH-----服务),主机(你要连接的主机名称),端口号(22),点击确定

4.5.2.2 连接成功

4.5.2.3 ssh,telnet和vnc的区别

ssh:使用公钥的加密方式,克服了telnet的不安全的状态,将数据传输更加的安全(端口22)

 

telnet:远程登陆的协议,它把用户登陆的终端变成某一个服务器/虚拟机的仿真终端,实现用户的轻松操作,但是由 于他在连接的时候会将数据明文的形式发送出来,所以连接不安全(端口21)

vnc:telnet和ssh使用的是文本传输的形式,但是vnc使用的是图形化界面,常见的是和linux下面版本的(teamviewer和向日葵组合使用(工作经验))(端口:5900-5906,默认是5901)

 

 

4.5.3 linux连接服务器失败

4.5.3.1 先ping查看能ping通(ping 10.0.0.200,查看是否通畅,不通畅怎么解决)

  • 查看网卡IP和路由
  • (2).查看虚拟网络编辑器配置是否正常
  • (3).查看虚拟网卡配置是否正常(点击windows鼠标右键,点击更改网络设置,点击vmnat8,点击查看网络信息,查看是否正常,是你服务器的同网段)
  • (4).将虚拟网络编辑器里面的内容全部还原,在次重新设定来解决
  • (5).查看虚拟网络服务是否都是正常开启(使用win+R,输入services.msc,在里面查看vmvare服务是否全部启动,如果没有,手动启动,手动启动失败,重装电脑系统)

4.5.3.2 查看是不是防护墙的原因

(1).查看windos的防火墙

  • win7:点击桌面左下角的win键,在里面找见控制面板,在找见网络与安全,点击就会发现防火墙,查看是不是关闭状态
  • win10:使用快捷键win+Q,输入控制面板,找见网络与安全,点击就会发现防火墙,查看状态是否关闭

(2).查看linux防火墙是否关闭

  • centos7:systemctl stop firewalld
  • centos6:service iptables stop

4.5.3.3 远程服务ssh服务出现关闭或者端口被更改的状态

查看ssh服务是否开启,端口是否更改

  • ssh服务开启:systemctl status sshd 如果是accept,就是开启的意思,如果不是,则systemctl start sshd
  • 端口是否被更改:(1).使用telnet来查看 elnet 10.0.0.200 22

(2).ss -anptu | grep "22"

4.6 linux系统中服务器出现密码错误怎么解决

4.6.1 centos6.9系统怎么解决

4.6.1.1 将选项选择到"kernel",选择e键,进入编辑模式

4.6.1.2 在quit后边输入"single",按"enter"返回上一层

4.6.1.3 输入"b",进入系统

4.6.1.4 修改密码

4.6.2 centos7.6系统怎么解决

4.6.2.1 按住"e"键进入调试模式

4.6.2.2 在调试模式里面输入rd.break,并且按ctrl +跳入下一个界面

4.6.2.3 赋权

4.6.2.4 修改密码

4.6.2.5 修改隐藏文件时间戳,退出,重启

Guess you like

Origin www.cnblogs.com/liangyuxing/p/11962496.html