分类: LINUX
2015-03-24 16:29:57
一、安装环境:虚拟机 VMware? Workstation 7.1.3 build-324285
宿主机:家用主机 AMD Athlon x250+4G+昂达A785GT+ +500G
网络环境:ADSL拨号
二、操作系统镜像:CentOS-6.2-x86_64--DVD1.iso
三、创建虚拟机如图:
三、开始安装:
1.启动虚拟机,按下ESC:进入启动菜单选择项:
2.选择cd-rom drive启动,进入光盘安装界面:
3.按ESC键,进入如下图:输入linux text回车,进入文本安装模式
4.下图界面选择skip跳过关盘介质测试:
5.在下图界面直接OK进入下一步:
6.下图界面选择语言:使用默认语言English
7.选择键盘模式:
8.注意:因为这个虚拟机我之前安装过系统,因此这里会提示是全新安装还是升级现有安装:
9.选择时区:这里选择亚洲/上海
亚洲/重庆
10.设置密码:
11. 提示密码为弱口令:建议生产环境密码使用较为复杂的密码;这里选择use anyway ,继续使用设置的密码;
12.分区类型:选择use entire drive 使用整个磁盘
转载自:Centos文本方式安装情况下lvm分区的创建
http://blog.chinaunix.net/uid-1730385-id-3272488.html
2.其他操作按照标准步骤进行(选择语言en,键盘en...)进行到磁盘分区的时候,按alt+f2(这个时候其实还可以按alt+f1回去刚才的界面 alt+f3,alt+f4,alt+f5,alt+f6 切换tty在本机:alt+F1、F2、F3、F4、F5、F6),切换控制台,这个时候出来一个类似shell的终端.
3.在#后面输入fdisk /dev/sda,手工分区,分两个,1个200m,将来给boot,剩余的分一个区,然后转换分区2的标签为8e(lvm)(貌似不转换也可以,为了方便还是转换吧
千万别把sda1给转换了.
3.分区结束,w保存分区表并退出fdisk.
4.创建pv:在#提示符后面输入 lvm pvcreate /dev/sda2,创建pv
5.创建vg:在#提示符后面输入 lvm vgcreate myvg /dev/sda2,创建vg.
6.创建lv:在#提示符后面输入 lvm lvcreate -L 2G -n lv_swap myvg,lvm lvcreate -L 4G -n lv_root myvg ,lvm lvcreate -L 13G -n lv_home myvg
创建3个lv,分别对应swap,/和home.
7.格式化boot和3个lv,lv_swap用mkswap做成swap分区格式.
8.完成之后,alt+f1,切换回安装界面,选择最下面的项目(自定义分区那个项目).经过扫描,安装程序就可以识别我们手工建立的lvm分区了.
9.按照事前的想法,将sda1挂载到/boot(在分区高亮的情况下,按f3),我的系统是centos5.8,
ext4的/boot不行,报错,后来在edit那个窗口里面格式化成ext3就通过了.其他的,lv的名字已经代表将要挂载的目录了.
直接在lv_home,lv_root高亮的情况下按f3修改挂载点就可以了.
10.按照正常的安装进程,选择安装的类型等,直至安装完成.
系统安装完成截图:
13.写入:选择write changes to disk
14.进入软件包安装阶段:
15.安装完成,按下reboot重启。
安装完成后,登录系统
1.配置IP、网关、DNS:
- ifconfig eth0 192.168.128.10 netmask 255.255.255.0 up
- route add dufault gw 192.168.128.2
- vi /etc/resolv.conf
- nameserver 192.168.128.2
- ping
- [root@localhost ~]# rpm -qa | wc -l
- 208
配置好了以后可以用SshClient通过ssh登录管理。
注:通过ifconfig命令以及route命令设置的ip地址以及默认网关重启后均无效。
2.查看磁盘分区结构:
- Disk /dev/sda: 21.5 GB, 21474836480 bytes
- 255 heads, 63 sectors/track, 2610 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x00039a2f
- Device Boot Start End Blocks Id System
- /dev/sda1 * 1 64 512000 83 Linux
- Partition 1 does not end on cylinder boundary.
- /dev/sda2 64 2611 20458496 8e Linux LVM
- Disk /dev/mapper/VolGroup-lv_root: 18.8 GB, 18832424960 bytes
- 255 heads, 63 sectors/track, 2289 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x00000000
- Disk /dev/mapper/VolGroup-lv_swap: 2113 MB, 2113929216 bytes
- 255 heads, 63 sectors/track, 257 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x00000000
以上为整个安装过程,可以看到整个安装过程中:
1.没有设置分区步骤,系统自动分区;
2.没有自定义选择软件包;
3.总共安装208个软件包;
- setup-2.8.14-13.el6.noarch
- basesystem-10.0-4.el6.noarch
- ncurses-base-5.7-3.20090208.el6.x86_64
- glibc-common-2.12-1.47.el6.x86_64
- glibc-2.12-1.47.el6.x86_64
- -4.1.2-8.el6..x86_64
- libcap-2.16-5.5.el6.x86_64
- info-4.13a-8.el6.x86_64
- popt-1.13-7.el6.x86_64
- libcom_err-1.41.12-11.el6.x86_64
- libacl-2.2.49-6.el6.x86_64
- libsepol-2.0.41-4.el6.x86_64
- glib2-2.22.5-6.el6.x86_64
- sed-4.2.1-7.el6.x86_64
- bzip2-libs-1.0.5-7.el6_0.x86_64
- readline-6.0-3.el6.x86_64
- libudev-147-2.40.el6.x86_64
- libstdc++-4.4.6-3.el6.x86_64
- grep-2.6.3-2.el6.x86_64
- sqlite-3.6.20-1.el6.x86_64
- iptables-1.4.7-4.el6.x86_64
- file-libs-5.04-11.el6.x86_64
- libblkid-2.17.2-12.4.el6.x86_64
- xz-libs-4.999.9-0.3.beta.20091007git.el6.x86_64
- bzip2-1.0.5-7.el6_0.x86_64
- libselinux-utils-2.0.94-5.2.el6.x86_64
- cpio-2.10-9.el6.x86_64
- sysvinit-tools-2.87-4.dsf.el6.x86_64
- pth-2.0.7-9.3.el6.x86_64
- libgcrypt-1.4.5-9.el6.x86_64
- iproute-2.6.32-17.el6.x86_64
- nss-softokn-3.12.9-11.el6.x86_64
- libusb-0.1.12-23.el6.x86_64
- upstart-0.6.5-10.el6.x86_64
- MAKEDEV-3.24-6.el6.x86_64
- procps-3.2.8-21.el6.x86_64
- net-tools-1.60-109.el6.x86_64
- db4-utils-4.7.25-16.el6.x86_64
- libss-1.41.12-11.el6.x86_64
- diffutils-2.8.1-28.el6.x86_64
- m4-1.4.13-5.el6.x86_64
- libxml2-2.7.6-4.el6.x86_64
- groff-1.18.1.4-21.el6.x86_64
- coreutils-libs-8.4-16.el6.x86_64
- cracklib-2.8.16-4.el6.x86_64
- coreutils-8.4-16.el6.x86_64
- module-init-tools-3.9-17.el6.x86_64
- plymouth-scripts-0.8.3-24.el6.centos.x86_64
- logrotate-3.7.8-12.el6_0.1.x86_64
- nss-sysinit-3.12.10-16.el6.x86_64
- libuser-0.56.13-4.el6_0.1.x86_64
- pciutils-libs-3.1.4-11.el6.x86_64
- mingetty-1.08-5.el6.x86_64
- krb5-libs-1.9-22.el6.x86_64
- libssh2-1.2.2-7.el6_1.1.x86_64
- curl-7.19.7-26.el6_1.2.x86_64
- rpm-4.8.0-19.el6.x86_64
- gpgme-1.1.8-3.el6.x86_64
- fipscheck-lib-1.2.0-7.el6.x86_64
- ustr-1.0.4-9.1.el6.x86_64
- gdbm-1.8.0-36.el6.x86_64
- -libs-2.6.6-29.el6.x86_64
- -metadata-parser-1.1.2-16.el6.x86_64
- pygpgme-0.1-18.20090824bzr68.el6.x86_64
- python-pycurl-7.19.0-8.el6.x86_64
- yum-plugin-fastestmirror-1.1.30-10.el6.noarch
- dash-0.5.5.1-3.1.el6.x86_64
- newt-0.52.11-3.el6.x86_64
- plymouth-core-libs-0.8.3-24.el6.centos.x86_64
- centos-release-6-2.el6.centos.7.x86_64
- util-linux-ng-2.17.2-12.4.el6.x86_64
- udev-147-2.40.el6.x86_64
- device-mapper-1.02.66-6.el6.x86_64
- policycoreutils-2.0.83-19.18.el6.x86_64
- device-mapper-event-1.02.66-6.el6.x86_64
- kbd-1.15-11.el6.x86_64
- openssh-5.3p1-70.el6.x86_64
- postfix-2.6.6-2.2.el6_1.x86_64
- cronie-1.4.4-7.el6.x86_64
- dhcp-common-4.1.1-25.P1.el6.x86_64
- libdrm-2.4.25-2.el6.x86_64
- dracut-004-256.el6.noarch
- kernel-2.6.32-220.el6.x86_64
- openssh-server-5.3p1-70.el6.x86_64
- selinux-policy-targeted-3.7.19-126.el6.noarch
- bfa-firmware-3.0.0.0-1.el6.noarch
- iwl100-firmware-39.31.5.1-1.el6.noarch
- b43-openfwwf-5.2-4.el6.noarch
- aic94xx-firmware-30-2.el6.noarch
- iwl1000-firmware-39.31.5.1-1.el6.noarch
- grub-0.97-75.el6.x86_64
- efibootmgr-0.5.4-9.el6.x86_64
- sudo-1.7.4p5-7.el6.x86_64
- e2fsprogs-1.41.12-11.el6.x86_64
- attr-2.4.44-7.el6.x86_64
- iwl5000-firmware-8.83.5.1_1-1.el6_1.1.noarch
- ivtv-firmware-20080701-20.2.noarch
- xorg-x11-drv-ati-firmware-6.14.2-7.el6.noarch
- atmel-firmware-1.3-7.el6.noarch
- iwl4965-firmware-228.61.2.24-2.1.el6.noarch
- iwl3945-firmware-15.32.2.9-4.el6.noarch
- rt73usb-firmware-1.8-7.el6.noarch
- ql23xx-firmware-3.03.27-3.1.el6.noarch
- rootfiles-8.1-6.1.el6.noarch
- libgcc-4.4.6-3.el6.x86_64
- filesystem-2.4.30-3.el6.x86_64
- ca-certificates-2010.63-3.el6_1.5.noarch
- tzdata-2011l-4.el6.noarch
- nss-softokn-freebl-3.12.9-11.el6.x86_64
- ncurses-libs-5.7-3.20090208.el6.x86_64
- libattr-2.4.44-7.el6.x86_64
- zlib-1.2.3-27.el6.x86_64
- audit-libs-2.1.3-3.el6.x86_64
- chkconfig-1.3.47-1.el6.x86_64
- db4-4.7.25-16.el6.x86_64
- nspr-4.8.8-3.el6.x86_64
- libselinux-2.0.94-5.2.el6.x86_64
- gamin-0.1.10-9.el6.x86_64
- shadow-utils-4.1.4.2-13.el6.x86_64
- nss-util-3.12.10-2.el6.x86_64
- g-3.1.7-6.el6.x86_64
- dbus-libs-1.2.24-5.el6_1.x86_64
- pcre-7.8-3.1.el6.x86_64
- lua-5.1.4-4.1.el6.x86_64
- cyrus-sasl-lib-2.1.23-13.el6.x86_64
- libidn-1.18-2.el6.x86_64
- libuuid-2.17.2-12.4.el6.x86_64
- elfutils-libelf-0.152-1.el6.x86_64
- libgpg-error-1.7-4.el6.x86_64
- findutils-4.4.2-6.el6.x86_64
- checkpolicy-2.0.22-1.el6.x86_64
- tcp_wrappers-libs-7.6-57.el6.x86_64
- expat-2.0.1-9.1.el6.x86_64
- dbus-glib-0.86-5.el6.x86_64
- grubby-7.0.15-2.el6.x86_64
- iptables-ipv6-1.4.7-4.el6.x86_64
- gmp-4.3.1-7.el6.x86_64
- libnih-1.0.1-7.el6.x86_64
- libutempter-1.1.5-4.1.el6.x86_64
- -minimal-7.2.411-1.6.el6.x86_64
- psmisc-22.6-15.el6_0.1.x86_64
- tar-1.23-3.el6.x86_64
- e2fsprogs-libs-1.41.12-11.el6.x86_64
- pinentry-0.7.6-6.el6.x86_64
- binutils-2.20.51.0.2-5.28.el6.x86_64
- which-2.19-6.el6.x86_64
- ncurses-5.7-3.20090208.el6.x86_64
- less-436-10.el6.x86_64
- gzip-1.3.12-18.el6.x86_64
- cracklib-dicts-2.8.16-4.el6.x86_64
- pam-1.1.1-10.el6.x86_64
- redhat-logos-60.0.14-10.el6.centos.noarch
- hwdata-0.233-7.6.el6.noarch
- nss-3.12.10-16.el6.x86_64
- openldap-2.4.23-20.el6.x86_64
- libcap-ng-0.6.4-3.el6_0.1.x86_64
- ethtool-2.6.33-0.3.el6.x86_64
- keyutils-libs-1.4-3.el6.x86_64
- openssl-1.0.0-20.el6.x86_64
- libcurl-7.19.7-26.el6_1.2.x86_64
- rpm-libs-4.8.0-19.el6.x86_64
- gnupg2-2.0.14-4.el6.x86_64
- -libs-5.1.52-1.el6_0.1.x86_64
- fipscheck-1.2.0-7.el6.x86_64
- libsemanage-2.0.43-4.1.el6.x86_64
- libffi-3.0.5-3.2.el6.x86_64
- python-2.6.6-29.el6.x86_64
- python-iniparse-0.3.1-2.1.el6.noarch
- rpm-python-4.8.0-19.el6.x86_64
- python-urlgrabber-3.9.1-8.el6.noarch
- yum-3.2.29-22.el6.centos.noarch
- slang-2.2.1-1.el6.x86_64
- newt-python-0.52.11-3.el6.x86_64
- kbd-misc-1.15-11.el6.noarch
- iputils-20071127-16.el6.x86_64
- initscripts-9.03.27-1.el6.centos.x86_64
- device-mapper-libs-1.02.66-6.el6.x86_64
- device-mapper-event-libs-1.02.66-6.el6.x86_64
- selinux-policy-3.7.19-126.el6.noarch
- lvm2-libs-2.02.87-6.el6.x86_64
- rsyslog-4.6.2-12.el6.x86_64
- cyrus-sasl-2.1.23-13.el6.x86_64
- cronie-anacron-1.4.4-7.el6.x86_64
- crontabs-1.10-33.el6.noarch
- kernel-firmware-2.6.32-220.el6.noarch
- plymouth-0.8.3-24.el6.centos.x86_64
- dracut-kernel-004-256.el6.noarch
- dhclient-4.1.1-25.P1.el6.x86_64
- lvm2-2.02.87-6.el6.x86_64
- iwl6000g2b-firmware-17.168.5.2-1.el6.noarch
- iwl5150-firmware-8.24.2.2-1.el6.noarch
- iwl6050-firmware-41.28.5.1-2.el6.noarch
- iwl6000g2a-firmware-17.168.5.3-1.el6.noarch
- iwl6000-firmware-9.221.4.1-1.el6.noarch
- authconfig-6.1.12-5.el6.x86_64
- system-config-firewall-base-1.2.27-5.el6.noarch
- passwd-0.77-4.el6.x86_64
- audit-2.1.3-3.el6.x86_64
- acl-2.2.49-6.el6.x86_64
- ql2400-firmware-5.06.02-1.el6.noarch
- ql2100-firmware-1.19.38-3.1.el6.noarch
- libertas-usb8388-firmware-5.110.22.p23-3.1.el6.noarch
- ql2500-firmware-5.06.02-1.el6.noarch
- zd1211-firmware-1.4-4.el6.noarch
- rt61pci-firmware-1.2-7.el6.noarch
- ql2200-firmware-2.02.08-3.1.el6.noarch
- ipw2100-firmware-1.3-11.el6.noarch
- ipw2200-firmware-3.1-4.el6.noarch
这是因为centos6.2提供的文本安装模式功能受到局限
其不支持设置分区、存储方式以及选择组件。如果需要自定义磁盘分区 切换到第二个终端 输入fdisk命令来分区,以及自定义安装组件还是用图形化安装来的方便。