- 系统启动到选择安装方式的时候,选择linux text,文本方式安装。
- 安装过程中,因为是最小化安装,所以语言选择en即可,分区我采用的是默认的没有进行修改,ip是自定义设置的,时间选项选择在上海,去掉了使用UTC的选项,最后选择程序的时候全部不选择。
- 最小化安装速度很快,也就是10分钟左右,基本的系统就能安装好,然后重启。
- 重启后,执行以下操作:
yum install setuptool ntsysv ntp vixie-cron crontabs microcode_ctl wget irqbalance
setuptool:可以让文本方式下的setup管用
ntsysv:在setup下有system service管理
ntp:时间更新服务
vixie-cron,crontabs:cron服务
microcode_ctl:inter CPU的微代码之类的东西
wget:从网上下东西
irqbalance:当服务器CPU为S.M.P架构或支持双核心、HT技术时安装,否则不用。 - 安装完成后,执行如下命令:
setup
其中关闭Firewall,禁用SELinux。
服务只留下:
crond
irqbalance 没装,需要时用yum安装,仅当服务器CPU为S.M.P架构或支持双核心、HT技术时,才需开启,否则关闭。
microcode_ctl
network
sshd
syslog
这样,一个基本的CentOS系统就安装完了,下一篇我们就来说一说安装Apache、PHP、MySql。
附录:
1.使用163的更新源,163的更新源速度很快,虽然内容不是最新的,但是基本的东西都还是有的。
将/etc/yum.repos.d/CentOS-Base.repo 的内容替换成如下内容
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
2.安装vim,并设置高亮。
个人比较喜欢使用vim,可是CentOS默认只安装了vi的基本部分,需要执行下面的命令
yum -y install vim-enhanced
然后在vim中:syntax on就可以设置高亮了。
Related posts:
- 采用yum安装apache、mysql、php环境 1. 更新系统内核到最新. yum -y update 系统更新后,如果yum安装时提示错误信息,请执行以下命令修复. rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY* 这里要看看yum更新镜像服务器地址是否http://centos.ustc.edu.cn/。 如果不是,需要先将yum更新服务器改成http://centos.ustc.edu.cn/。这样更新速度会很快,并且各种软件版本能保持一致。...
Related posts brought to you by Yet Another Related Posts Plugin.