![]() |
|
|
#1 (permalink) |
|
Senior Member
|
Chào các bạn bắt đầu từ hôm nay tôi sẽ bắt đầu loạt bài của tôi về cách cài đăt và cấu hình một Server hoàn chỉnh trên Linux cũng như cách để quản trị Server từ xa qua giao diện Web hay qua CLI. Đồng thời tôi cũng cố gắng hoàn thành trong thời gian sớm cách cài các Desktop chạy Linux trên các hệ điều hành thổ biến như Fedora Core 6, Mandriva 2007 hay Ubuntu 6.10...
Mong các bạn sẽ ủng hộ tôi.
__________________
Ai thấy bài của tớ hay, thanks cho tớ phát Quyết tâm kiếm cái CCNP .
|
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Senior Member
|
Trước khi bắt đầu vào để làm các bạn nên có các chương trình sau
VMWare: [Only registered and activated users can see links. ] Đây là phần mềm giúp giả lập PC ảo trên PC thật của mình cũng như giúp các bạn tạo cho mình được một mạng LAN ảo nhỏ nếu như PC thật của bạn đủ mạnh. Đa số trong số chúng ta đều chưa thạo về Linux lắm vì vậy việc làm trên PC thật là rất nguy hiểm có thể làm các bạn bị mất dữ liệu. Vì vậy việc làm trên VMWare là một giải pháp tối ưu. PuTTY: [Only registered and activated users can see links. ] Đây là một trình Telnet và SSH client giúp các bạn có thể làm việc từ xa với máy chạy Linux thông qua giao diện dòng lệnh WinSCP: [Only registered and activated users can see links. ] ScreenShots: [Only registered and activated users can see links. ] Đây là một chương trình giúp bạn truy xuất vào máy chạy Linux để coppy hay xóa file tương tự như khi chúng ta làm việc với chương trình NC hay Total Commander cũng như Windows Explorer. Chương trình này chạy trên họ điều hành Windows. Tiếp theo là bộ cài của các hệ điều hành, có thể là các đĩa CD/DVD hay cũng có thể là các file .ISO mà các bạn có thể tải về từ trang chủ của mỗi hệ điều hành. Cái này đến mỗi bài cụ thể tôi sẽ đưa link cho các bạn load. Cuối cùng là cái mà các bạn nên có là 1 đường truyền tốc độ khá để các bạn có thể Update các bản vá lỗi mới nhất, cũng như có thể lên mạng để đọc tìm hiểu thêm về nó và nếu có thể khi đã làm xong thì vào trang web của chúng ta và thanks cho tôi 1 cái. Đã xong công tác chuẩn bị. Chúng ta bắt tay vào làm thôi.
__________________
Ai thấy bài của tớ hay, thanks cho tớ phát Quyết tâm kiếm cái CCNP .
|
|
|
|
|
|
#4 (permalink) |
|
Senior Member
|
Trong bài đầu tiên này chúng ta sẽ thiết lập một Server hoàn chỉnh chạy trên Ubuntu 6.10 Server. Tại sao tôi lại chọn Ubuntu? Đó là trước hết đây là một bản Distro dành cho Server mạnh mà miễn phí khác với Redhat Enterprise hay Mandrivar Enterprise. Sau nữa là nó khá mạnh nhưng mà hết sức gọn nhẹ, bộ cài chỉ có 1 CD trong khi các hệ điều hành khác thì có từ 4-5CD. Tuy nhiên cũng do nhẹ mà nó có một nhược điểm khiến cho nhưng ai khi mới bắt đầu dùng nó gặp khó khăn đó là nó hoàn toàn không có giao diện đồ họa. Tất cả những gì mà chúng ta làm là lệnh và lệnh. Tuy nhiên không có gì phải lo lắng cả các bạn cứ làm đi rồi sẽ thấy mọi thứ đơn giản và Linux hay tới đâu.
Chúng ta nói qua chút về hệ điều hành này.Ubuntu là một bản phân phối của Linux hoàn toàn miễn phí được phát triển trên nền tảng của hệ điều hành Debian vốn nổi tiếng là an toàn và ổn định. Tuy nó mới ra đời nhưng đã tạo được một tiếng vang lớn trong cộng đồng người sử dụng Linux.Các bạn có thể xem thêm chi tiết tại [Only registered and activated users can see links. ] và tải bản cài tại [Only registered and activated users can see links. ] .Sau khi download về các bạn có thể burn ra đĩa để cài trên PC hoặc là add image để cài trên VMWare. Tiện đây nếu bạn nào mà chưa rõ về cách thiết lập VMware thì có thể chờ tôi ít bữa nữa tôi sẽ có bài về chủ đề này. Server mà chúng ta cài sẽ bao gồm các thành phần sau: •Web Server: Apache 2.0 •Database Server: MySQL 5.0 •Mail Server: Postfix •DNS Server: BIND9 •FTP Server: proftpd •POP3/IMAP: . •Webalizer cho thống kê web Để quản lý từ xa chúng ta sẽ cài Webmin và ISPconfig. Cách cài sau đây tôi thực hiện trên bản 32bit. Tuy nhiên đối với bản 64 bit thì nó cũng không có nhiều điểm khác lắm và cách cài này cũng không phải là cách duy nhất. Các bạn hoàn toàn có thể cài đặt theo ý các bạn. Chú ý trong bài này tôi sẽ sử dụng host name là server1.example.com và IP là 192.168.0.100, gateway là 192.168.0.1 Bắt đầu cài: Bạn cho đĩa Ubuntu Server vào ổ chọn boot FromCd. Màn hình hiện ra chọn Install to the hard disk ![]() Tiếp theo trình cài đặt sẽ yêu cầu bạn chọn ngôn ngữ: ![]() Lựa chọn location ![]() ![]() Chọn bàn phím ![]() ![]() ![]() ![]() Tiếp theo trình cài đặt sẽ kiểm tra CD, HDD, phần cứng của bạn và cấu hình network theo DHCP nếu DHCP của bạn hoạt động. Trong suốt quá trình cấu hình cài đặt chúng chương trình không cho ta cấu hình IP mà phải sau khi cài xong thì chúng ta mới cấu hình được ![]() ![]() Điền hostname. Trong ví dụ này tôi sử dụng hệ thống của tôi là server1.example.com nên tôi điền là server1 ![]() Bây giờ chúng ta phải phân vùng cho đĩa cứng. Ở đây tôi dùng một phân vùng lớn cho điểm gắn kết / và một phân vùng nhỏ =2 lần dung lượng của RAM cho phân vung Swap. Do đó chúng ta sẽ chọn Erase entire disk ![]() ![]() Tiếp theo là cấu hình đồng hồ hệ thống: ![]() Tiếp theo la tạo User ví dụ như user hanh_bk với tên là Thinh Hanh. Tuyệt đối bạn không đặt được là admin vì nó đã được đặt trước trên hệ thống. ![]() ![]() ![]() ![]() Bây giờ là các file cở bản của hệ thống được cài. ![]() ![]() Chúng ta sẽ sử dụng các dịch vụ DNS và LAMP seerver nhưng mà sẽ không chọn bất kì một lựa chọn nào dưới đây. Vì theo cài đặt mặc định nó sẽ cái thiếu một số gói. Chúng ta sẽ cài đặt nó một cách thủ công sau: ![]() ![]() GRUB boot loader được cài đặt ![]() Hệ thống cở bản là đã được cài xong.. Bạn hãy bỏ CD ra và nhấn Continue để khởi động lại máy. ![]() ![]() Đến đây bạn đã cài xong phần cở bản của của Ubuntu 6.10 Server. Tiếp theo chúng ta sẽ cấu hình nó.
__________________
Ai thấy bài của tớ hay, thanks cho tớ phát Quyết tâm kiếm cái CCNP .
|
|
|
|
|
|
#5 (permalink) |
|
Senior Member
|
Giờ chúng ta đến phần cấu hình cho OS.
Sau khi máy khởi động lại bạn chỉ có thể login với Acc đã tạo trong quá trình cài. Ubuntu không cho bạn login với tài khoản root. Vì vậy để có thể có quyền root access sau khi boot máy thì chúng ta làm như sau: Code:
sudo passwd root Sau đó để lấy quyền root ta dùng lệnh Code:
su Để có thể làm việc được từ xa bạn cần phải cài SSH Server: Code:
apt-get install ssh openssh-server Tiếp theo là cấu hình cho Mạng. Do trong quá trình cài đặt Card mạng của bạn sẽ được cấu hình thông qua DHCP mà Server phải có Ip tĩnh do vậy chúng ta sẽ phải cấu hình lại. Tất cả cấu hình về mạng được lưu tại file /etc/network/interfaces và chúng ta sẽ chỉnh lại nó. Chúng ta sẽ dùng IP 192.168.0.100 cho server. Chúng ta dùng trình soạn thảo vi để chỉnh lại file cấu hình Code:
vi /etc/network/interfaces Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# 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
Code:
/etc/init.d/networking restart Tiếp theo chúng ta câu hình lại file /etc/hosts Code:
vi /etc/hosts Code:
127.0.0.1 localhost.localdomain localhost 192.168.0.100 server1.example.com server1 # 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 Code:
echo server1.example.com > /etc/hostname Code:
shutdown -r now Code:
hostname hostname -f Giờ là lúc Update cho server. Chúng ta cần chỉnh lại đôi chút cho file source update Code:
vi /etc/apt/sources.list Code:
# # 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 restricted deb 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 Code:
apt-get update apt-get upgrade /bin/sh tương tự như /bin/dash, tuy nhiên chúng ta cần /bin/bash, chứ không phải là /bin/dash. Vì vậy chúng ta cần làm như sau: Code:
rm -f /bin/sh ln -s /bin/bash /bin/sh Thế đã mỏi tay quá. Tiếp theo chúng ta sẽ cài các service khác.
__________________
Ai thấy bài của tớ hay, thanks cho tớ phát Quyết tâm kiếm cái CCNP .
|
|
|
|
|
|
#7 (permalink) | |
|
Senior Member
|
Trích:
Bài còn khá dài, các bạn cứ theo dõi nhé. Mình mấy hôm nay hơi bận nên có lẽ sẽ không làm nhanh được.
__________________
Ai thấy bài của tớ hay, thanks cho tớ phát Quyết tâm kiếm cái CCNP .
|
|
|
|
|
|
|
#8 (permalink) |
|
Senior Member
|
Tiếp theo đây chúng ta sẽ cài thêm một số thư viện và các gói cần thiết cho sau này. Các bạn copy cả đoạn lệnh sau làm một lần nhé:
Code:
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++ Code:
apt-get install quota Code:
vi /etc/fstab Code:
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> 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/ /media/floppy0 auto rw,user,noauto 0 0 Code:
touch /quota.user /quota.group chmod 600 /quota.* mount -o remount / quotacheck -avugm quotaon -avug Code:
apt-get install bind9 Code:
/etc/init.d/bind9 stop Code:
vi /etc/default/bind9 Code:
OPTIONS="-u bind -t /var/lib/named" # Set RESOLVCONF=no to not run resolvconf RESOLVCONF=yes Code:
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 Code:
mv /etc/bind /var/lib/named/etc Code:
ln -s /var/lib/named/etc/bind /etc/bind Code:
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 Chúng ta cần sửa lại file cấu hình khởi động /etc/init.d/sysklogd để nó có thể ghi lại được những thông tin của hệ thống. Code:
vi /etc/init.d/sysklogd Code:
[...] SYSLOGD="-u syslog -a /var/lib/named/dev/log" [...] Code:
/etc/init.d/sysklogd restart Code:
/etc/init.d/bind9 start
__________________
Ai thấy bài của tớ hay, thanks cho tớ phát Quyết tâm kiếm cái CCNP .
|
|
|
|
|
|
#9 (permalink) |
|
Senior Member
|
Mấy hôm nay bận quá không thể viết liên tục đươc. Các bạn thông cảm nhẹ
Giờ tôi lại tiếp tục viết tiếp. Chúng ta đã cài đặt thành công cho DNS tiếp theo chúng ta sẽ cài MySQL, Apache, postfix.. Cài MySQL: Để cài đặt các gói cho MySQL ta chạy lệnh sau: Code:
apt-get install mysql-server mysql-client libmysqlclient15-dev Code:
vi /etc/mysql/my.cnf Code:
[...] #bind-address = 127.0.0.1 [...] Code:
/etc/init.d/mysql restart Code:
netstat -tap Code:
tcp 0 0 *:mysql *:* LISTEN 4997/mysqld Tiếp theo chúng ta cần đặt mật khẩu truy xuất MySQL của root: Code:
mysqladmin -u root password yourrootsqlpassword mysqladmin -h server1.example.com -u root password yourrootsqlpassword Tiếp theo là cài MailServer Như đã nói ở trên Mail Server mà chúng ta dùng là Postfix. Chúng ta sẽ cài Postfix với SMTP-AUTH và TLS Code:
apt-get install postfix libsasl2 sasl2-bin libsasl2-modules libdb3-util procmail Code:
General type of configuration? Internet Site Mail name? server1.example.com Code:
dpkg-reconfigure postfix Code:
General type of configuration? Internet Site Where should mail for root go NONE Mail name? server1.example.com Other destinations to accept mail for? (blank for none) server1.example.com, localhost.example.com, localhost Force synchronous updates on mail queue? No Local networks? 127.0.0.0/8 Use procmail for local delivery? Yes Mailbox size limit 0 Local address extension character? + Internet protocols to use? all Code:
postconf -e 'smtpd_sasl_local_domain =' postconf -e 'smtpd_sasl_auth_enable = yes' postconf -e 'smtpd_sasl_security_options = noanonymous' postconf -e 'broken_sasl_auth_clients = yes' postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination' postconf -e 'inet_interfaces = all' echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf Code:
mkdir /etc/postfix/ssl cd /etc/postfix/ssl/ openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024 chmod 600 smtpd.key openssl req -new -key smtpd.key -out smtpd.csr openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt openssl rsa -in smtpd.key -out smtpd.key.unencrypted mv -f smtpd.key.unencrypted smtpd.key openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650 Code:
postconf -e 'smtpd_tls_auth_only = no' postconf -e 'smtp_use_tls = yes' postconf -e 'smtpd_use_tls = yes' postconf -e 'smtp_tls_note_starttls_offer = yes' postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key' postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt' postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem' postconf -e 'smtpd_tls_loglevel = 1' postconf -e 'smtpd_tls_received_header = yes' postconf -e 'smtpd_tls_session_cache_timeout = 3600s' postconf -e 'tls_random_source = dev:/dev/urandom' postconf -e 'myhostname = server1.example.com' Code:
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = server1.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server1.example.com, localhost.example.com, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
Code:
/etc/init.d/postfix restart Code:
mkdir -p /var/spool/postfix/var/run/saslauthd Code:
vi /etc/default/saslauthd Code:
# This needs to be uncommented before saslauthd will be run automatically START=yes PARAMS="-m /var/spool/postfix/var/run/saslauthd -r" # You must specify the authentication mechanisms you wish to use. # This defaults to "pam" for PAM support, but may also include # "shadow" or "sasldb", like this: # MECHANISMS="pam shadow" MECHANISMS="pam" Code:
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
Code:
/etc/init.d/saslauthd start Code:
telnet localhost 25 Code:
ehlo localhost 250-STARTTLS và 250-AUTH Như vậy là mọi thứ đều tốt đẹp. ![]() Đến đây các bạn đánh lệnh quit để trở về system's shell Cài Courier-IMAP/Courier-POP3 Chạy các lện sau để cài Courier-IMAP/Courier-IMAP-SSL (cho IMAPs trên port 993) và Courier-POP3/Courier-POP3-SSL (cho POP3s trên port 995): Code:
apt-get install courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0-0 Code:
Create directories for web-based administration ? No SSL certificate required Ok Code:
postconf -e 'home_mailbox = Maildir/' postconf -e 'mailbox_command =' /etc/init.d/postfix restart
__________________
Ai thấy bài của tớ hay, thanks cho tớ phát Quyết tâm kiếm cái CCNP .
|
|
|
|
|
|
#10 (permalink) |
|
Senior Member
|
Hôm nay tôi lại tiếp tục bài viết với các công việc đang làm dở của bài trước:
Cài Apache và PHP5: Chác các bạn còn nhớ trong lần cài đầu tiên ta có thấy chỗ lựa chọn để cài có 1 chỗ là cài LAMP Server nhưng mà tôi nói là chúng ta không nên cài. Giờ là lúc cài nó: Cài apache: Code:
apt-get install apache2 apache2-common apache2-doc apache2-mpm-prefork apache2-utils libapr0 libexpat1 ssl-cert Code:
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 Code:
Continue installing libc-client without Maildir support? Tiếp theo chúng ta cần chỉnh lại file cấu hình của apache để nó nhận các file index: Code:
vi /etc/apache2/apache2.conf Code:
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.xhtml Tiếp theo ta chỉnh lại file /etc/apache2/ports.conf để Apache lắng nghe trên cổng 443 cho HTTPS: Code:
vi /etc/apache2/ports.conf Code:
Listen 80 Listen 443 Code:
a2enmod ssl a2enmod rewrite a2enmod suexec a2enmod include Code:
/etc/init.d/apache2 force-reload Các bạn chú ý là bước này chì làm khi bạn chạy ISPConfig. Vì ISPConfig là một chương trình quản lý Server, giống như khi bạn thuê host sharing. Trên một Server có thể có nhiều Website cùng chạy nhưng khi bạn thuê ít tiền thì không có PHP chẳng hạn, nên để quản lý ISPConfig yêu cầu bạn phải Disable PHP Globally. Để Disable PHP Globally chúng ta cần Edit lại file /etc/mime.types và comment vào các dòng application/x-httpd-php : Code:
vi /etc/mime.types Code:
[...] #application/x-httpd-php phtml pht php #application/x-httpd-php-source phps #application/x-httpd-php3 php3 #application/x-httpd-php3-preprocessed php3p #application/x-httpd-php4 php4 [...] Code:
<IfModule mod_php5.c> # AddType application/x-httpd-php .php .phtml .php3 # AddType application/x-httpd-php-source .phps </IfModule> Code:
/etc/init.d/apache2 restart Code:
apt-get install proftpd proftpd-common ucf Code:
Run proftpd from inetd or standalone? Để tăng tính bảo mật cho Server ta edit lại file /etc/proftpd/proftpd.conf với nội dung như sau: Code:
[...] DefaultRoot ~ IdentLookups off ServerIdent on "FTP Server ready." [...] Code:
ln -s /etc/proftpd/proftpd.conf /etc/proftpd.conf Code:
/etc/init.d/proftpd restart Code:
- IPv6 getaddrinfo 'server1.example.com' error: Name or service not known Đến đây nói chung là chúng ta đã cài xong cơ bản về Server. Nhưng mà chúng ta cần phải làm nhiều việc nữa như là quản lý nó qua web chẳng hạn nên chúng ta cần phải cài thêm một số dịch vụ nữa: Webalizer Code:
apt-get install webalizer Code:
apt-get install ntp ntpdate Code:
apt-get install libhtml-parser-perl libdb-file-lock-perl libnet-dns-perl
__________________
Ai thấy bài của tớ hay, thanks cho tớ phát Quyết tâm kiếm cái CCNP .
|
|
|
|
|
|
|