CentOS系统安装操作手册V20by sll.docx

上传人:b****1 文档编号:14478767 上传时间:2023-06-23 格式:DOCX 页数:33 大小:3.64MB
下载 相关 举报
CentOS系统安装操作手册V20by sll.docx_第1页
第1页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第2页
第2页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第3页
第3页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第4页
第4页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第5页
第5页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第6页
第6页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第7页
第7页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第8页
第8页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第9页
第9页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第10页
第10页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第11页
第11页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第12页
第12页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第13页
第13页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第14页
第14页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第15页
第15页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第16页
第16页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第17页
第17页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第18页
第18页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第19页
第19页 / 共33页
CentOS系统安装操作手册V20by sll.docx_第20页
第20页 / 共33页
亲,该文档总共33页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

CentOS系统安装操作手册V20by sll.docx

《CentOS系统安装操作手册V20by sll.docx》由会员分享,可在线阅读,更多相关《CentOS系统安装操作手册V20by sll.docx(33页珍藏版)》请在冰点文库上搜索。

CentOS系统安装操作手册V20by sll.docx

CentOS系统安装操作手册V20bysll

 

CentOS操作系统安装操作手册

 

目录

1.安装准备1

1.1安装前的准备工作1

1.2硬件检查1

1.3RAID的安装1

1.4系统引导1

2.系统安装3

2.1语言选择4

2.2键盘选择4

2.3自定义物理分区5

2.4主机名称设置9

2.5网络设置9

2.6时区设置11

2.7根口令设置11

2.8逻辑分区的划分12

2.9引导装载程程序17

2.10服务的定制17

2.11安装界面19

3.初始化系统设置21

3.1许可证信息21

3.2创建用户22

3.3日期和时间设置22

3.4Kdump设置23

4.系统验证24

5.硬盘分区划分及挂载24

5.1parted分区24

5.2硬盘分区挂载27

5.3开机自动挂载27

5.4分区易出现问题以及解决方法28

1.安装准备

1.1安装前的准备工作

情况一:

在VM虚拟机上安装系统的准备工作

1)准备ISO镜像文件

2)搭建虚拟机

情况二:

在服务器上安装的准备工作

1)使用ISO等相关软件制作优盘启动盘。

2)准备安装光盘作为启动盘

1.2硬件检查

检查服务器加电后运行状况,是否有提示灯异常,注意查看服务器相关使用手册。

1.3RAID的安装

若在服务器上安装,会涉及到raid磁盘阵列的划分部署,不同产品硬件服务器的RID安装RAID情况不同。

例如:

惠普的机器有Smart光盘可以直接安装,没有光盘开机按F8;DELL服务器是开机按F2;

1.4系统引导

启动机器进入BIOS,更改设置,使用U盘启动,如果安装程序启动成功,会出现的安装界面,选择第一个”Installorupgradeanexistingsystem”后按Enter键。

继续图形模式安装,系统会开始加载并进行检测,如下图选择”Skip”跳过:

2.系统安装

下图到安装界面,选择Next

2.1语言选择

下图这里的语言是指安装过程中所使用的语言,并不是指安装完毕后使用的语言。

默认是英国英语English(English),单击“Next”继续,下面进入得是“键盘选择界面”

2.2键盘选择

系统会自动检测出用户的键盘,并给出默认选择。

一般我们使得都是“美国英语式”,选择使用得键盘方案后,单击“Next”继续,进入到分区的划分。

2.3自定义物理分区

下图为选择自定义分区后划分分区,继续安装就必须需要重新分区,这将导致数据清除。

◆第一个”BasicStorageDevices”为基本存储设备选项,如果可以清除所有数据可以选择第一项,反之慎用。

◆第二个”SpecializedStorageDevices”为指定存储设备,则清除指定的存储设备的数据。

如下图:

2.4主机名称设置

主机名称设置,建议在这里设置好,不要默认,因为在后续系统使用过程中,host文件的主机名称会用到。

点击”ConfigureNetwork”,进入到”网络设置界面”。

2.5网络设置

在“网络设备”列表框中列有可供选择的网络设备,还可以通过单击右侧的“Edit”进行设置,单击后会出现相应对话框。

里面可以设置是否使用动态IP配置(DHCP)、是否启动IPV4与IPV6支持、是否引导时激活等等,还可以手动指定IP地址和子网掩码。

我们手工配置,如:

IPv4:

192.168.0.101,子网掩码:

255.255.255.0,单击”Apply”。

暂不设置DNS服务器。

设置完后单击“Apply”。

然后点击”Close”关闭”网络配置”页面,然后单击“Next”进入“时区设置”界面。

2.6时区设置

选择“Asia/shanghai”,左下角有个“SystemclockusesUTC”的选项,取消这个选项,设置好相应的时区后单击“Next”继续,接着会进入到“设置根口令”界面。

2.7根口令设置

在“RootPassword”后录入根口令并在“Confirm”后重复录入,单击“Next”继续安装。

设置”root”根口令的密码时,建议装机时就设置密码为大小写字母数字符号组合,例如:

Chan@2015。

根口令通过验证,经过获取安装信息后,会来到“逻辑分区结构定义”界面。

2.8逻辑分区的划分

◆下图为安装分区,选择“建立自定义的分区结构”,然后单击“Next”继续,这时就到了“分区界面”。

◆界面上面显示得是磁盘分区图,是对当前磁盘空间配置情况的映射,在此我们建立/boot(引导区)、swap(交换分区)、和/(根分区)这三个分区。

选中未分区’’Free’’,点击Create。

◆然后会弹出”createstorage”对话框,选择第一个standardpartition,点击”creat”。

◆接下来到”AddPartition”对话框,创建分区的顺序为先创建/boot分区,在“MountPoint”后面录入/boot,也可通过右边的下接菜单来找到/boot;接着在下面的“FileSystemType”中选择ext4,大小根据实际情况而定;再创建交换分区swap分区,大小2G左右,若为数据库服务器建议10G以上空间;

◆最后再创建根分区或者设定产品安装分区,最后一个分区将空间全部赋予。

接下来点击”Next”,进行安装,进入到”引导装载程序配置界面”。

2.9引导装载程程序

Grub引导分区要选择分区的第一个,例如sda分区的sda1,特别是优盘安装时,一定要注意,默认是优盘的分区,不要把系统安装到优盘分区中。

点击”Next”,进入到”主机和网络设备”界面

2.10服务的定制

下图为安装CentOS组件,依次为桌面系统,最小化桌面系统,最小化安装,基本服务器安装,数据库服务器安装,WEB网页服务器安装,虚拟主机安装,软件开发安装。

在这里选择的尾桌面系统安装,会有Xwindows图形界面,容易操作。

注意选择”Customizenow”.

下图为现在自定义要安装的组件,基本上打印机等组件不需要安装。

注意安装optiona依赖包。

2.11安装界面

下图为开始安装上一步选择的依赖包介质,耐心等待。

下图表示介质已经复制且安装完成,选择”reboot”重启,即将进入到初始系统设置。

注意:

若使用U盘安装,点击重启后,要将U盘拔出,否则又会重新安装一遍系统。

3.初始化系统设置

下图为欢迎界面

选择”Forward”,进入”许可证信息”界面

3.1许可证信息

勾选”Yes,IagreetotheUcenseAgreemet”,点击”Forward”.

3.2创建用户

下图为创建用户,系统在安装的时候创建了root管理员用户,这里为创建一个普通用户,可以用维护和巡检等工作;也可不创建默认点击”Forward”跳过。

3.3日期和时间设置

设置时间和日期

3.4Kdump设置

下图默认点击”Finish”

下图来到登陆页面,使用root账户登陆,至此基本系统安装结束。

4.系统验证

查看系统安装版本是否与需求安装版本一致,uname–r或uname-a

5.硬盘分区划分及挂载

5.1parted分区

下面是用parted工具对/dev/sda做GPT分区的过程:

root@node01:

/mnt#parted/dev/sda

GNUParted2.3

Using/dev/sda

WelcometoGNUParted!

Type'help'toviewalistofcommands.

(parted)mklabelgpt

Warning:

Theexistingdisklabelon/dev/sdawillbedestroyedandalldataonthisdisk

willbelost.Doyouwanttocontinue?

Yes/No?

yes

(parted)print

Model:

DELLPERC6/iAdapter(scsi)

Disk/dev/sda:

500GB

Sectorsize(logical/physical):

512B/512B

PartitionTable:

gpt

NumberStartEndSizeFilesystemNameFlags

(parted)mkpartprimary0KB500GB(为500GB一个区间)如果就划分唯一的一个区间指令为mkpartprimary0KB-1

Warning:

Yourequestedapartitionfrom0.00Bto500GB.

Theclosestlocationwecanmanageis17.4kBto500GB.

Isthisstillacceptabletoyou?

Yes/No?

yes

Warning:

Theresultingpartitionisnotproperlyalignedforbestperformance.

Ignore/Cancel?

Ignore

(parted)print

Model:

DELLPERC6/iAdapter(scsi)

Disk/dev/sda:

500GB

Sectorsize(logical/physical):

512B/512B

PartitionTable:

gpt

NumberStartEndSizeFilesystemNameFlags

117.4kB500GB500GBprimary

(parted)quit

Information:

Youmayneedtoupdate/etc/fstab.

root@node01:

/#fdisk-l

WARNING:

GPT(GUIDPartitionTable)detectedon'/dev/sda'!

Theutilfdiskdoesn'tsupportGPT.UseGNUParted.

Disk/dev/sda:

499.6GB,499558383616bytes

255heads,63sectors/track,60734cylinders

Units=cylindersof16065*512=8225280bytes

Sectorsize(logical/physical):

512bytes/512bytes

I/Osize(minimum/optimal):

512bytes/512bytes

Diskidentifier:

0x00000000

DeviceBootStartEndBlocksIdSystem

/dev/sda1160735487849983+eeGPT

root@node01:

/#mkfs.ext4-Tlargefile/dev/sdb1注:

参数-Tlargefile为快速格式化

mke2fs1.41.12(17-May-2010)

文件系统标签=

操作系统:

Linux

块大小=4096(log=2)

分块大小=4096(log=2)

Stride=0blocks,Stripewidth=0blocks

30490624inodes,121962487blocks

6098124blocks(5.00%)reservedforthesuperuser

第一个数据块=0

Maximumfilesystemblocks=4294967296

3722blockgroups

32768blockspergroup,32768fragmentspergroup

8192inodespergroup

Superblockbackupsstoredonblocks:

32768,98304,163840,229376,294912,819200,884736,1605632,2654208,

4096000,7962624,11239424,20480000,23887872,71663616,78675968,

102400000

正在写入inode表:

完成

Creatingjournal(32768blocks):

完成

Writingsuperblocksandfilesystemaccountinginformation:

完成

Thisfilesystemwillbeautomaticallycheckedevery24mountsor

180days,whichevercomesfirst.Usetune2fs-cor-itooverride.

5.2硬盘分区挂载

root@node01:

/#mkdirthetabin

root@node01:

/#mount/dev/sdb1/thetabin

[root@cdr68~]#df-h

FilesystemSizeUsedAvailUse%Mountedon

/dev/sda3710G15G660G3%/

tmpfs32G260K32G1%/dev/shm

/dev/sda120G201M19G2%/boot

/dev/sdb116T5.4T9.4T37%/thetabin

5.3开机自动挂载

root@node01:

/#vi/etc/fstab

#/etc/fstab:

staticfilesysteminformation.

#Use'blkid-ovalue-sUUID'toprinttheuniversallyuniqueidentifier

#foradevice;thismaybeusedwithUUID=asamorerobustwaytoname

#devicesthatworksevenifdisksareaddedandremoved.Seefstab(5).

#

proc/procprocnodev,noexec,nosuid00

/dev/mapper/node01-root/ext4errors=remount-ro01

#/bootwason/dev/sdb1duringinstallation

UUID=c21707ff-ba0f-43ee-819a-8e72fa0f8500/bootext2defaults02

/dev/mapper/node01-swap_1noneswapsw00

/dev/sda1/export/glusterfs01ext4defaults02

重启就可以自动挂载了!

至此完成。

5.4分区易出现问题以及解决方法

另:

格式化新分区的时候,报错,提示下面的错误,没有这个文件或目录。

Couldnotstat/dev/sda7---Nosuchfileordirectory

Thedeviceapparentlydoesnotexist;didyouspecifyitcorrectly?

[root@yong~]#mke2fs-text4/dev/sda7

mke2fs1.41.12(17-May-2010)

Couldnotstat/dev/sda7---Nosuchfileordirectory

Thedeviceapparentlydoesnotexist;didyouspecifyitcorrectly?

解决方法:

执行partprobe命令

partprobe包含在parted的rpm软件包中。

partprobe可以修改kernel中分区表,使kernel重新读取分区表。

因此,使用该命令就可以创建分区并且在不重新启动机器的情况下系统能够识别这些分区。

查看是否安装过该命令:

[root@yong~]#rpm-qparted

packagepartedisnotinstalled

提示没有安装过,则需要安装parted

安装命令:

#yuminstallparted#前提是保证你的虚拟机可以上网,要从网络下载安装包

[root@yong~]#yuminstallparted

Loadedplugins:

fastestmirror

Loadingmirrorspeedsfromcachedhostfile

*base:

*extras:

*updates:

base|3.7kB00:

00

extras|3.3kB00:

00

updates|3.4kB00:

00

SettingupInstallProcess

ResolvingDependencies

-->Runningtransactioncheck

--->Packageparted.i6860:

2.1-25.el6willbeinstalled

-->FinishedDependencyResolution

DependenciesResolved

=============================================================================

PackageArchVersionRepositorySize

=============================================================================

Installing:

partedi6862.1-25.el6base595k

TransactionSummary

=============================================================================

Install1Package(s)

Totaldownloadsize:

595k

Installedsize:

2.1M

Isthisok[y/N]:

y

DownloadingPackages:

parted-2.1-25.el6.i686.rpm|595kB00:

16

Runningrpm_check_debug

RunningTransactionTest

TransactionTestSucceeded

RunningTransaction

Installing:

parted-2.1-25.el6.i6861/1

Verifying:

parted-2.1-25.el6.i6861/1

Installed:

parted.i6860:

2.1-25.el6

Complete!

安装完成后,再进行查询一次,已经安装成功。

[root@yong~]#rpm-qparted

parted-2.1-25.el6.i686

执行一下该命令:

[root@yong~]#partprobe

Warning:

WARNING:

thekernelfailedtore-readthepartitiontableon/dev/sda(Deviceorresourcebusy).Asaresult,itmaynotreflectallofyourchangesuntilafterreboot.

Warning:

WARNING:

thekernelfailedtore-readthepartitiontableon/dev/sdb(Deviceorresourcebusy).Asaresult,itmaynotreflectallofyourchangesuntilafterreboot.

Warning:

Unabletoopen/dev/sr0read-write(Read-onlyfilesystem)./dev/sr0hasbeenopenedread-only.

Warning:

Unabletoopen/dev/sr0read-write(Read-onlyfilesystem)./dev/sr0hasbeenopenedread-only.

Error:

Invalidpartitiontable-recursivepartitionon/dev/sr0.

然后执行格式化,就OK了,如果还提示出错,重启之后再执行格式化就可以了。

[root@yong~]#mkfs-text4/dev/sda7

mke2fs1.41.12(17-May-2010)

Filesystemlabel=

OStype:

Linux

Blocksize=4096(log=2)

Fragmentsize=4096(log=2)

Stride=0blocks,Stripewidth=0blocks

64384inodes,257032blocks

12851blocks(5.00%)reservedforthesuperuser

Firstdatablock=0

Maximumfilesystemblocks=264241152

8blockgroups

32768blockspergroup,32768fragmentspergroup

8048inodespergroup

Superblockbackupsstoredonblocks:

32768,98304,163840,229376

Writinginodetables:

done

Creatingjournal(4096blocks):

done

Writingsuperblocksandfilesystemaccountinginformation:

done

Thisfilesystemwillbeautomaticallycheckedevery35mountsor

180days,whichevercomesfirst

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2