สาวก Ubuntu มาทบทวนวิธีลงกันดีก่าครับ ผมทำไว้ไม่ได้เอาไว้สอนพวกคุณนะครับเพราะว่าผมไม่เก่ง ผมทำไว้เอาไว้ให้ตัวเองเปิดดูเท่านั้นนะครับ ผิดตรงไหนคอมเม๊นท์แก้ให้ผมหน่อยนะครับ สิ่งที่จะลงก็มีต่อไปนี้ครับ
ดาวโหลดแผ่นได้ที่นี่ครับ
จะข้ามขั้นตอนลงไปเลยนะครับเพราะว่าลงตามแผ่น CD นั้นมันเป็นภาพให้อ่านอยู่ยังไงอ่านแล้วกด next ไปเรื่อยๆแล้วกัน อิอิ พอลงเสร็จแล้วก็มาเริ่มกันต่อเลยนะครับ
Enable The root Account
พิมพ์
#sudo passwd root
เพื่อทำการใส่พาสเวิร์ดของ root หลังจากใส่พาสเวิร์ด root เสร็จแล้วก็
#su root
เพื่อทำการ login เป็น root ครับ
Install The SSH Server
ต่อมาก็ลง ssh เพื่อให้เราทำการ remote เข้าไปได้
#$apt-get install ssh openssh-server
Configure The Network
ให้ทำการใส่ ip ให้เครื่อง server ของเราครับ เป็นการ set ip ให้การ์ด eth0 หากอยากทราบว่า port ของการ์ด lan ไหนทำงานอยู่ก็ให้สั่ง
#mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok
eth1: no link
มันจะบอกประมาณนี้ครับว่า eth0 ทำงานอยู่ ต่อจากนั้นก็พิมพ์
#vi /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
?address 192.168.0.100
?netmask 255.255.255.0
?network 192.168.0.0
?broadcast 192.168.0.255
?gateway 192.168.0.1
พอเชตเสร็จแล้วทำการรีบูตเนตเวิร์คครับ
#/etc/init.d/networking restart
แล้วทำการเชตโฮสเนมของเรา
#vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.222 ns1.gootum.com ns1
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
เป็นต้นหลังจากนั้นก็
echo ns1.gootum.com > /etc/hostname
แล้วทำการรีบูตเครื่อง
#init 6 หรือ shutdown -r now
Edit /etc/apt/sources.list
ทำการปิดคอมเม๊นไม่ให้อัพเดดผ่านแผ่น cd เข้าไปแก้ไขที่ไฟล์
#vi /etc/apt/sources.list
#
# deb cdrom:[Ubuntu-Server 6.10 _Edgy Eft_ - Release i386 (20061025.1)]/ edgy main restricted
#deb cdrom:[Ubuntu-Server 6.10 _Edgy Eft_ - Release i386 (20061025.1)]/ edgy main restricteddeb http://de.archive.ubuntu.com/ubuntu/ edgy main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ edgy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ edgy-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ edgy-updates main restricted
## Uncomment the following two lines to add software from the ‘universe’
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://de.archive.ubuntu.com/ubuntu/ edgy universe
deb-src http://de.archive.ubuntu.com/ubuntu/ edgy universe
## Uncomment the following two lines to add software from the ‘backports’
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://de.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu edgy-security main restricted
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted
deb http://security.ubuntu.com/ubuntu edgy-security universe
deb-src http://security.ubuntu.com/ubuntu edgy-security universe
แก้ไขไฟล์นี้แล้วทำการปิด # คอมเม๊นท์และเอาออกตามตัวอย่างครับ แล้วทำการเชฟไฟล์
Update Your Linux Installation
ทำการอัพเดดและอัพเกรดไฟล์ system ต่างๆครับ
#apt-get update
แล้วต่อด้วย
#apt-get upgrade
Change The Default Shell
ทำการเปลี่ยน Shell ครับ
#rm -f /bin/sh
#ln -s /bin/bash /bin/sh
Install Some Software
ทำการ install packages
#apt-get install binutils cpp cpp-4.0 fetchmail flex gcc gcc-4.0 libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.3-dev libpcre3 libpopt-dev linux-kernel-headers lynx m4 make ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++
Quota
ทำการinstall quota,
#apt-get install quota
แล้วไปแก้ไขไฟล์
#vi /etc/fstab
# /etc/fstab: static file system information.
#
#??? proc /proc proc defaults 0 0
# /dev/sda1
UUID=02cc04f2-98cb-41db-8eb3-94de5f19b22b / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1
# /dev/sda5
UUID=6b011d54-fb37-469d-9fa8-179b185343c1 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/
proc /proc proc defaults 0 0# /dev/sda1UUID=02cc04f2-98cb-41db-8eb3-94de5f19b22b / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1# /dev/sda5UUID=6b011d54-fb37-469d-9fa8-179b185343c1 none swap sw 0 0/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0/dev/
พิมพ์ตามนี้
#touch /quota.user /quota.group
#chmod 600 /quota.*
#mount -o remount /
#quotacheck -avugm
#quotaon -avug
DNS Server
ลง dns server
#apt-get install bind9
ทำการ stop bine9 ก่อน
#/etc/init.d/bind9 stop
แก้ไขfile /etc/default/bind9 แล้วดูบรรทัดนี้ /var/lib/named.เปลี่ยนเป็น OPTIONS=” -u bind” so that it reads OPTIONS=”-u bind -t /var/lib/named”:
#vi /etc/default/bind9
OPTIONS=”-u bind -t /var/lib/named”
# Set RESOLVCONF=no to not run resolvconf
RESOLVCONF=yes
สร้าง directories under /var/lib:
#mkdir -p /var/lib/named/etc
#mkdir /var/lib/named/dev
#mkdir -p /var/lib/named/var/cache/bind
#mkdir -p /var/lib/named/var/run/bind/run
ย้ายconfig directory from /etc to /var/lib/named/etc:
#mv /etc/bind /var/lib/named/etc
สร้างแทนของเก่า
#ln -s /var/lib/named/etc/bind /etc/bind
กำหนด permissions ของ directories
#mknod /var/lib/named/dev/null c 1 3
#mknod /var/lib/named/dev/random c 1 8
#chmod 666 /var/lib/named/dev/null /var/lib/named/dev/random
#chown -R bind:bind /var/lib/named/var/*
#chown -R bind:bind /var/lib/named/etc/bind
แก้ไข /etc/init.d/sysklogd of sysklogdบรรทัด SYSLOGD=”-u syslog”เพิ่มเป็น SYSLOGD=”-u syslog -a /var/lib/named/dev/log”:
#vi /etc/init.d/sysklogd
[...]
SYSLOGD=”-u syslog -a /var/lib/named/dev/log”
[...]
Restart the logging daemon:
#/etc/init.d/sysklogd restart
Start up BIND
#/etc/init.d/bind9 start
MySQL
install MySQL,
#apt-get install mysql-server mysql-client libmysqlclient15-dev
ทำการแก้ไขไฟล์ my.cnf
#vi /etc/mysql/my.cnf
[...]
#bind-address = 127.0.0.1
[...]
restart MySQL
#/etc/init.d/mysql restart
แล้วทำการสร้างพาสเวิร์ดให้ database ครับ
#mysqladmin -u root password yourrootsqlpassword
#mysqladmin -h ns1.gootum.com -u root password yourrootsqlpassword
Apache/PHP5
install Apache:
#apt-get install apache2 apache2-common apache2-doc apache2-mpm-prefork apache2-utils libapr0 libexpat1 ssl-cert
install PHP5:
#apt-get install autoconf automake1.4 autotools-dev libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php-pear php5-ldap php5-mhash php5-mysql php5-mysqli php5-snmp php5-sqlite php5-xmlrpc php5-xsl php5-imap php5-mcrypt php5-pspell
You will be asked the following question:
Continue installing libc-client without Maildir support < — YesNext we edit /etc/apache2/apache2.conf
#vi /etc/apache2/apache2.conf
[...] DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.xhtml [...]
#vi /etc/apache2/ports.conf
Listen 80
Listen 443
ลง mod
#a2enmod ssl
#a2enmod rewrite
#a2enmod suexec
#a2enmod include
#/etc/init.d/apache2 restart
vi /etc/apache2/mods-enabled/php5.conf
# AddType application/x-httpd-php .php .phtml .php3
# AddType application/x-httpd-php-source .phps
#/etc/init.d/apache2 restart
Proftpd
install Proftpd
#apt-get install proftpd proftpd-common ucf
Run proftpd from inetd or standalone < — standalone
#vi /etc/proftpd/proftpd.conf
[...]
DefaultRoot ~
IdentLookups off
ServerIdent on “FTP Server ready.”
[...]
#ln -s /etc/proftpd/proftpd.conf /etc/proftpd.conf
Then restart Proftpd:
#/etc/init.d/proftpd restart
แค่นี้ก็เสร็จแล้วครับ ส่วนที่เหลือก็ไม่มีอะไรมากไปหาลงเพิ่มเติมเอานะครับ
Popularity: 11% [?]
Blog Related Content
install MySQL server 4.1 on Ubuntu Edgyเอาเครื่อง Server ไปวางที่ INETเอา Server ไปวางที่ INetReview Server AsrockWebmin Installation in Debian and Ubuntu Linux


















ดีมากเลยค่ะ แต่ฉันเป็นมือใหม่หัดใช้ กำลังลองติดตั้งใน vmware ติดปัญหามันไม่บูตจากแผ่น Cd ต้องทำอย่างงัยค่ะ
ขอบคุณมากค่ะ