Transcript ntsys

實驗十:以Linux架設Internet/Intranet伺服器
教師:
助教:
1
Outline
Background
Linux system
Popular Internet services
Internet services
Internet
HTTP
Database
Mail
FTP
Intranet
File
Installation
2
Background
 Fedora Linux




UNIX-Like environment
Open source and FREE
Powerful networking functionalities
Frequently used as networking server
 Popular Internet Services




WWW & FTP – Apache Web Server & vsFTPd Server
Database – MySQL Database Server
Mail – Sendmail
Network File System – Samba Server
 Goal
 Build a Linux server offering those services
3
Internet Services – HTTP & Database
 Futures
 HTTP
 Interactive interface
 Combine text, image, multimedia, and file
 Programmable and can combine much application or services
 Database
 Client-Server coordination model
 Multiple user and multiple connection
 Provide database server functionality
 Apache Web Server
 A famous web server for UNIX-Like Systems
 Open source and FREE
 MySQL Database Server
 A basic database server on UNIX-Like System
 Provide open source and FREE edition
4
Internet Services - Mail
 Futures
 Can arrived after about 5 minutes
 Qmail Mail Server
 A free, small, easy to use mail server
 Support SSL, POP3 Server
5
Internet Services - FTP
 Futures
 Quick, easy, and high efficient for file transmit
 Text-base commands for control
 Service mode
 Active
 Passive
 Vsftpd FTP Server




Small for purposes of speed and security
Virtual IP configurations & Virtual users
Per-source-IP configurability and limits
Encryption support through SSL integration
6
Internet Services –File System
Futures
Share , access, or manage our data and devices
Easy to access remote resources
Usually using in local network (Intranet)
Can build a small group for a part of users
Samba File System
Bridge Windows file system and UNIX’s
Like a bridge between every computer
Also can bridge the printer or other devices
7
Installation – WWW & Database
 Apache + SSL + PHP + MySQL




Install all the rpm files
Reboot computer and open the test website
Setup the root’s password of MySQL
Write a script file of php to test the MySQL
 Configurations
 httpd.conf – Configure file of Apache Web Site
 Port 80
 DocumentRoot "/var/www/html“
 DirectoryIndex index.html index.htm
 UserDir public_html
8
Installation – Qmail
 Installation






Prepare all the source file
Create the required users and groups for Qmail
Compile and install the source code
Complete the configuration for system and each user
Stop the sendmail services and replace by Qmail
Setup the pop-3 service
 Configurations




/var/qmail/control/me – host name of local host
/var/qmail/control/rcpthosts – mail forwarding parents
/var/qmail/control/locals – address of local areas
/var/qmail/badmailfrom – deny source address
9
Installation – vsftpd
Installation
Prepare the rpm file of vsftpd
Install it
Use ntsys program to enable the vsftpd service
Configurations
/etc/vsftpd/vsftpd.conf – main configuration file
/etc/pam.d/vsftpd – permission configure file
/etc/vsftpd/ftpusers – ftp user accounts
10
Installation – Samba
 Installation
 Prepare the rpm file of Samba client and server edition
 Install it
 Use ntsys program to enable the smb service
 Modify ‘/etc/samba/smb.conf’ to set the authentication
 Start the samba service and test by Windows’ station
 Configurations
 /etc/samba/smb.conf – configuration file
 /etc/rc.d/init.d/smb – script file of server control
 /etc/lmhosts – mapping file of NETBIOS name and ip address
11