บทความนี้จะแนะนำการติดตั้งและใช้งาน CentOS http://www.centos.org/
ซึ่งเป็น Linux สาย Redhat ตัวหนึ่ง ในการนำมาใช้ทำเป็น Server
โดยจะแบ่งเนื้อหาออกเป็นตอนๆ เพื่อความสะดวกของคนเขียน (ผมเอง)
โดยจะมีเนื้อหาทั้งหมดคราวๆ ตามหัวข้อดังนี้
* CentOS Minimal Installation
* Web Server: Apache and PHP
* Secure Web Server : Apache & Mod SSL
* Database: MySQL & PHP MySQL Extension
* Database: Oracle & PHP OCI8 Extension
* Mail Server: Postfix
* DNS Server: BIND
* FTP Server: ProFTPD
* User & Group Management
เราจะเริ่มตั้งแต่ขั้นตอนการติดตั้งกันก่อน โดยจะทำการติดตั้งแบบ
Minimal ซึ่งเป็นแบบที่ติดตั้งองค์ประกอบต่างๆน้อยที่สุด ไม่มี GUI ให้ใช้
เหมาะกับการเอาไปทำ Server เป็นอย่างยิ่ง และโปรแกรมอื่นๆที่จำเป็น
เราจะมาทำการติดตั้งเพิ่มเติมเองในภายหลัง
อย่างแรกเราต้องทำการ Download ตัวติดตั้งมาก่อน ซึ่งจะมีให้เลือก
Download อยู่ 2 แบบหลักๆ ตามชนิดของ CPU ของเราคือ i386 จะใช้สำหรับ CPU
32 บิท และ x86_64 จะใช้สำหรับ CPU แบบ 64 บิท
# i386 สำหรับ CPU 32 บิท
http://mirror.centos.org/centos/6.2/isos/i386/
# x86_64 สำหรับ CPU 64 บิท
http://mirror.centos.org/centos/6.2/isos/x86_64/
จากนั้นทำการ Download CentOS-6.2-i386-minimal.iso หรือ CentOS-6.2-x86_64-minimal.iso ตามชนิดของ CPU ของเรา
ขั้นตอนแรกเลือก Install or upgrade an existing system
Skip ไปเลยเพราะว่าเราไม่ต้องการทำการตรวจสอบแผ่น
เข้าสู่หน้าจอการติดตั้งแบบกราฟฟิกอันสวยงาม กด Next
ทำการเลือกภาษา
จากนั้นเลือก Keyboard Layout
ทำการเลือก Basic Storage Device เพราะว่าเราใช้ Hard Disk ธรรมดาๆ
กด Yes, discard any data เพื่อยืนยันว่าถ้ามีข้อมูลอยู่ใน Hard Disk ตัวนี้เราไม่เอามันแล้วนะให้ลบเลย
ทำการตั้งชื่อเครื่อง ในที่นี้ผมตั้งว่า centos.unzeen.com
จากนั้นคลิกที่ Configure Network เพื่อทำการกำหนด IP Address โดยเลือกไปที่ Wired และคลิก Edit ที่ eth0 ซึ่งเป็นการ์ดแลนของเราเอง
ทำการคลิกถูกที่ Connect automatically (อันนี้ห้ามลืมเลยนะ)
จากนั้นเลือกไปที่แท็บ IPv4 Setting กำหนดข้อมูลในช่อง Method เป็น Manual
และทำการเพิ่ม IP Address, Netmask, Gateway, DNS Server
โดยของผมกำหนดดังนี้
1 2 3 4 | IP Address : 192.168.10.10 Netmask : 24 Gateway : 192.168.10.1 DNS Server : 8.8.8.8 //อันนี้ของกูเกิลเลยนะ |

ต่อไปทำการเลือกประเทศ

กำหนดรหัสผ่านสำหรับ root //ตั้งรหัสผ่านยากๆ ไว้

เลือก Use All Space เพราะว่าเราต้องการติดตั้งโดยไม่แบ่ง partition แต่ถ้าใครเชียวชาญมากแล้วก็เลือก Create Custom Layout ได้เลยไม่ว่ากัน

คลิก Write changes to disk

ระบบเริ่มทำการติดตั้ง CentOS ลงบน Hard Disk ของเรา รอสักครู่……

เมื่อติดตั้งเรียบร้อยแล้วคลิก Reboot

เมื่อ Reboot เรียบร้อยแล้วเราจะเห็นหน้าจอให้ใส่ Username และ Password (ไม่มีหน้าจอแบบ GUI ให้นะจ้ะ เพราะว่าเราจะเอามาทำ Server หน้าจอกราฟฟิกแบบ GUI คงไม่จำเป็น)

ขั้นตอนต่อไปทำการลงโปรแกรมแรกในเครื่องกันก่อน อันนี้ผมลง nano เอาไว้แก้ไขเท็กไฟล์ต่างๆ เพราะผมใช้ vi หรือ vim ไม่คล่อง แต่สัญญาว่าจะหัดใช้ – -’
1 | # yum install nano
|

จากนั้นทำการ Disable SELinux โดยเข้าไปแก้ไขไฟล์คอนฟิกที่ /etc/selinux/config โดยแก้ไขให้ SELINUX=disabled (ใน nano ให้กด CTRL+O เพื่อทำการ save และกด CTRL+X เพื่อออกจากโปรแกรม)
1 | # nano /etc/selinux/config
|

ต่อไปทำการ Disable Firewall
1 | # chkconfig iptables off
|

เมื่อแก้ไขค่าต่างๆเรียบร้อยแล้วทำการ restart สักหนึ่งรอบ
1 | # shutdown -r now
|

เมื่อ Reboot เครื่องเสร็จแล้ว เราสามารถทำการ SSH เพื่อเข้าใช้งานได้

เสร็จสินขั้นตอนการติดตั้ง CentOS 6.2 แบบ Minimal เพียงเท่านี้ คราวหน้าเราจะมาติดตั้ง Apache, mod_ssl และ php กันต่อ ^^
1 comments:
Beginner's Guide to Baccarat and Why We - Worrione
In the USA, the casino is a full-fledged casino, and you can play slots and 카지노사이트 live casino games 제왕카지노 in 바카라 this country. As a
Post a Comment