Cài đặt Centos 5.1 Desktop

Tháng tư 1st, 2008 posted by admin (500 lần xem)

CentOS (tên viết tắt của Community ENTerprise Operating System) là một phân phối Linux tập trung vào lớp doanh nghiệp, xây dựng từ nhiều nguồn miễn phí (theo GPL và một số bản quyền tương tự) của Red Hat Enterprise Linux (RHEL).

Centos 5.1 ra mắt chính thức ngày 02.12.2007

Bài viết này hướng dẫn các bạn cài đặt Centos 5.1 cho Desktop.

1. Phương tiện cài đặt:

Bạn có thể dùng CD hoặc DVD để cài đặt. Ở đây mình dùng DVD, được download tại http://isoredirect.centos.org/centos/5/isos/i386/

2. Cài đặt:

Khởi động từ đĩa DVD

Centos 5.1 Desktop - 1

Enter để tiếp tục cài đặt

Kiểm tra đĩa nếu muốn, bạn có thể Skip để bỏ qua bước này

Centos 5.1 Desktop - 2

Nhấn Next để tiếp tục cài đặt

Centos 5.1 Desktop - 3

Chọn ngôn ngữ, chọn English (English)

Centos 5.1 Desktop - 4

Chọn bàn phím, thông thường chọn US English

Centos 5.1 Desktop - 5

Chọn phân vùng cài đặt

Centos 5.1 Desktop - 6

Bạn có thể chọn phân chia phân vùng cài đặt tự động hoặc mình có thể tự chia và chọn phân vùng cài đặt theo ý mình. Sau đó nhấn Next để tiếp tục

Centos 5.1 Desktop - 7

Tại bước này mình có thể điều chỉnh thông số cho card mạng hoặc có thể cài đặt thông số sau khi cài đặt xong. Nhấn Next để tiếp tục

Centos 5.1 Desktop - 8

Chọn TimeZone. Sau bước này bạn sẽ đặt password cho user Root

Centos 5.1 Desktop - 9

Sau đó bạn chọn gói cài đặt cho mình, và không quên chọn Desktop-Gnome để cài đặt giao diện.

Centos 5.1 Desktop - 10

Bạn có thể chọn Customize now để chọn các gói cài đặt theo ý mình.

Centos 5.1 Desktop - 11

Nhấn vào Optional packages để chọn chi tiết gói cài đặt

Centos 5.1 Desktop - 12

Sau khi chọn xong các gói cài đặt nhấn Next để kiểm tra các gói kèm theo

Centos 5.1 Desktop - 13

Sau đó nhấn Next để bắt đầu cài đặt

Centos 5.1 Desktop - 14

Quá trình chia phân vùng cài đặt

Centos 5.1 Desktop - 15

Quá trình cài đặt lên đĩa

Centos 5.1 Desktop - 16

Centos 5.1 Desktop - 17

Centos 5.1 Desktop - 18

Centos 5.1 Desktop - 19

Centos 5.1 Desktop - 20

Sau một thời gian chờ đợi thì quá trình cái đặt cũng xong, nhấn reboot để khởi động lại.

3. Khởi động đầu tiên

Centos 5.1 Desktop - 21

Hệ thống bắt đầu

Centos 5.1 Desktop - 22

Centos 5.1 Desktop - 23

Centos 5.1 Desktop - 24

Nhấn Forward để bắt đầu cấu hình Firewall. Bạn có thể Enable Firewall và có thể mở port cho hệ thống của mình.

Centos 5.1 Desktop - 25

Chọn Disabled cho SELinux

Centos 5.1 Desktop - 26

Centos 5.1 Desktop - 27

Chọn thời gian cho hệ thống

Centos 5.1 Desktop - 28

Bạn có thể chọn Enable Network Time Protocol để đồng bộ giờ với server thời gian.

Centos 5.1 Desktop - 29

Tiếp theo tạo user cho hệ thống

Centos 5.1 Desktop - 30

Nhấn Forward để hệ thống kiểm tra driver âm thanh

Centos 5.1 Desktop - 31

Bạn có thể cài đặt thêm các gói từ đĩa ở bước này

Centos 5.1 Desktop - 32

Reboot lại hệ thống và bắt đầu tận hưởng Centos 5.1

Centos 5.1 Desktop - 33

Sau khi hệ thông khởi động lại bạn sẽ tới màn hình đăng nhập, bạn nhập Username và Password cho user mà bạn tạo ở bước trên.

Centos 5.1 Desktop - 34

Login thành công bạn sẽ vào giao diện của Centos 5.1.

Centos 5.1 Desktop - 35

4. Cấu hình cơ bản

Bạn có thể chuyển sang user root từ Terminal

Centos 5.1 Desktop - 36

Centos 5.1 Desktop - 37

Gõ lệnh

$ su -

($ là dấu nhắc lệnh, không có nhập vào)

Sau đó nhập password của user root để bắt đầu chuyển sang user root

Cài đặt một số package cần thiết

$ yum install yumex yum-fastestmirror yum-skip-broken yum-kmod yum-kernel-module yum-priorities

Cài đặt RPMforge-repository để có thể download nhiều package khác.

# rpm -ivh http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

(# là dấu nhắc lệnh của user root)

Chỉnh độ ưu tiên cho các repositories trong file /etc/yum.repos.d/CentOS-Base.repo, bạn có thể dùng lệnh vi để chỉnh sửa (Sẽ hướng dẫn cách dùng lệnh vi trong bài viết sau).

Nội dung file như sau:
#
# 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/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
#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/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
#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/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
#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/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
#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/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=2

# Name: RPMforge RPM Repository for Red Hat Enterprise 5 - dag
# URL: http://rpmforge.net/
[rpmforge]
name = Red Hat Enterprise $releasever - RPMforge.net - dag
#baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
priority=11

Trước khi bạn update cho hệ thống lần đầu tiên, ta nên kiểm tra một số ứng dụng, services và gói mà mình không cần thiết.

Centos 5.1 Desktop - 39Centos 5.1 Desktop - 38

Vào Services để disable một số services khởi động mặc định, bạn sẽ được hỏi password của user để su lên quyền root.

Centos 5.1 Desktop - 40Centos 5.1 Desktop - 40

Chọn “RunLevel All”

Centos 5.1 Desktop - 41

Centos 5.1 Desktop - 42

Tại đây ta Enable services Network Manager và Network Manager Dispatcher, đồng thời Disable các services

bluetooth (Nếu bạn không dùng bluetooth cho các thiết bị ngoại vi)

firstboot (Services này không cần thiết)

mdmonitor (Nếu bạn không dùng RAID)

pcscd (Nếu không có thiết bị smart-card)

restorecond (Nếu không deactive SELinux)

sshd (Nếu không dùng ssh để connect máy tính từ xa)

Bây giờ bạn có thể tiến hành update cho hệ thống của mình.

Chúc các bạn thành công!!!