0% found this document useful (0 votes)
71 views3 pages

Linux

The document provides instructions for configuring several common server services and applications including: 1) Configuring the hostname and IP address on a Linux server. 2) Installing and configuring DHCP, DNS, and a web server. Steps include installing packages, editing configuration files, and starting services. 3) Installing and configuring a mail server using Postfix and the mail transfer agent Dovecot. 4) Installing and configuring the Squid proxy server by editing the configuration file and setting the port number.

Uploaded by

Truc Pham
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views3 pages

Linux

The document provides instructions for configuring several common server services and applications including: 1) Configuring the hostname and IP address on a Linux server. 2) Installing and configuring DHCP, DNS, and a web server. Steps include installing packages, editing configuration files, and starting services. 3) Installing and configuring a mail server using Postfix and the mail transfer agent Dovecot. 4) Installing and configuring the Squid proxy server by editing the configuration file and setting the port number.

Uploaded by

Truc Pham
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

dat ten may: b1> vi /etc/sysconfig/network b2> reboot b3> kt ten may: hostname =========== dat ip address b1>

c1: vi /etc/sysconfig/network-scripts/ifcfg-eth0/1/2/3... c2: go lenh setup b2> service network restart kt ip address: ifconfig hoac ifconfig eth0/1/2... hoac cat /etc/sysconfig/network-scripts/ifcfg-eth0/1/2.. ============ cai dhcp: -cai goi dhcp-3.0.5-7.el5.i386.rpm -file cau hinh: cat /etc/dhcpd.conf(file cau hinh` nay chua co gi) -copy file cau hinh path nay: /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf -cau hinh dhcp:vi /etc/dhcpd.conf -service dhcpd start -chkconfig dhcpd on -chkconfig --list dhcpd ============ cai dns: -cai goi sau day +bind-9.3.3-10.el5.i386.rpm +bind-libs-9.3.3-10.el5.i386.rpm +bind-devel-9.3.3-10.el5.i386.rpm +bind-chroot-9.3.3-10.el5.i386.rpm -chep file named.conf vao duong dan: /var/named/chroot/etc -chep file nhung tap tin con` lai vao duong dan: /var/named/chroot/var/named -vi /var/named/chroot/etc/named.conf -file phan giai thuan:vi /var/named/chroot/var/named/nhatnghe.db -file phan giai nghich: vi /var/named/chroot/var/named -khoi dong dns:service named start -khoi dong dns cung voi linux:chkconfig named on ============= cai web server I> +cai goi httpd-2.2.3-11.eel5.centos.i386.rpm -tao trang web home.htm voi 1 noi dung tuy` y -cap quyen 755 cho trang home.htm. -trang cau hinh` chinh cho website: vi /etc/httpd/conf/httpd.conf dong` 265: xoa dau # va sua lai tren trang web dong` 281 va` dong 306: sua lai duong` dan chua file html dong` 391: sua lai trang chu mac dinh service httpd start chkconfig httpd on II> Tao allias -Tao 2 thu muc admin va` forum -Tao 2 trang admin.htm va` forum.htm tuong ung voi 2 thu muc tren. -File config: /etc/httpd/conf/httpd.conf +go lenh sau:":539,546t547" de copy va edit. +copy voi lenh nhu tren va edit tiep. -Tao trang web default go lenh: directoryIndex

-service httpd restart -tao va dat pass cho 2 user. -htpasswd -c /etc/httpd/conf/password "user", cac lan` sau bo "-c" trong command . -cat /etc/httpd/conf/password -vi /etc/httpd/conf/httpd.conf +them nhung lenh sau day alias cua admin -authType basic -authName admin -authUserFile "/etc/httpd/conf/password" -require user admin1 -service httpd restart =============== cai` mail(postfix) -cai postfix-2.3.3-2.i386.rpm -stop service sendmail: service sendmail stop -ko cho sendmail khoi dong cung` system: chkconfig send mail off -chuyen sendmail sang postfix:alternatives --config mta -file config mail postfix:vi /etc/postfix/main.cf +dong 70: xoa dau # va edit thanh` myhostname = mail.trungtruc.com +dong 71:data_directory=/usr/lib/postfix +dong 77:xoa dau # va sua thanh ten domain cua minh +dong 93:xoa dau #, bien $mydomain da khai bao o tren. +dong 107:bo dau #, tuc la` chap nhan ca yeu cau` tren tat ca cac interf ace +dong 110:them dau # +dong 155:them dau # +dong 156:bo dau # +dong 255: khai bao mang internal -service postfix start -chkconfig postfix on -add 2 user -kiem tra xem port 25 bat chua:netstat -an | prep:25 command send mail telnet mail.trungtruc.com 25 helo mail.trungtruc.com mail from:[email protected] rcpt to:[email protected] data <noidung cua mail> . quit -command check mail:mail -u nv2 -exit ============== cai dovecot(dich vu mail ho tro pop3 va imap) -dovecot-1.0-1.2.rc15.el5.i386.rpm -file config:vi /etc/dovecot.conf +dong 17:bo dau # -service dovecot start -chkconfig dovecot on -netstat -an | grep :110 -netstat -an | grep :143 ============= cai squid(proxy server) -cai squid-2.6.STABLE6-4.el5.i386.rpm -file config:vi /etc/squid/squid.conf +dong` 73:edit port default(3128)==>port 8080 luu y:sua port tuy` y, ko bat buoc 8080

+dong` 738:edit cache_mem(cache trong ram) +dong` 993:100(dung luong tren hdd) 16(thu muc cap 1) 256(thu muc cap 2) +dong` 2522:khai bao internal network +dong` 2523:+bo dau #, +dong` nay` la` rule cho phep internal network truy cap mang . +dong` 2837:

You might also like