Web Server Administration Chapter 9 Extending the Web Environment 1 Overview Understand File Transfer Protocol (FTP) services Install and configure an VSFTP server in Linux Install and configure FTP client on Linux Understand News servers Configure remote access to a server Understand streaming media servers Understand e-commerce software 2 Understanding FTP Services FTP is used to transfer files from a server to a client (download) and transfer files from a client to a server (upload) FTP client is the browser Also command-line and GUI clients FTP servers can operate as anonymous servers or they can require a valid logon FTP servers are not secure; user names and passwords are not sent encrypted 3 Understanding FTP Services FTP uses 2 ports: Data port & Control port Control port (port 21) – client connects originally Data port (port 20) – client connects for data 2 types: Active FTP Passive FTP (data port is not port 20) Client initiates both port connections Most web based ftp clients use passive 4 Active FTP Step 1, the client's command port contacts the server's command port and sends the command PORT 1027. Step 2, The server then sends an ACK back to the client's command port. Step 3 the server initiates a connection on its local data port to the data port the client specified earlier. Step 4, Finally, the client sends an ACK back. 5 Passive FTP Step 1, the client contacts the server on the command port and issues the PASV command. Step 2, The server then replies with PORT 2024, telling the client which port it is listening to for the data connection. Step 3 the client then initiates the data connection from its data port to the specified server data port. Step 4, the server sends back an ACK. 6 Communicating with FTP Command Description Example ftp host Initiates a connection to FTP server ftp 192.168.0.100 open host Once the FTP client has been started, opens a connection open 192.168.0.100 close Closes the connection but does not exit the FTP client close quit or bye Closes the connection and exits the FTP client bye ls filenames Displays filenames and can use wildcards ls *.rpm dir filenames Displays the long listing of files and their properties, such as the size and date the file was created dir *.rpm 7 Communicating with FTP Command Description Example binary Transfer files in binary mode binary ascii Transfer files in text mode ascii get filename Downloads a single file get test.rpm put filename Uploads a single file put testapp.zip Mget filenames Downloads multiple files; used with wildcards mget sendmail*.rpm mput filenames Uploads multiple files; used with wildcards mput *.tif prompt no Stops prompting for each file when used before you use mget or mput prompt no prompt Starts prompting prompt 8 Communicating with FTP Command Description Example hash Displays a hash symbol as files are being downloaded hash cd directory Moves to another directory on the FTP server cd /software lcd directory Moves to another directory on the client lcd /docs pwd Displays the current directory on the server pwd help command Finds very brief help on FTP commands; if used without a reference to a command, it will give you a list of commands available help mget 9 Understanding News Servers News servers allow threaded discussions You post messages in a newsgroup A newsgroup focuses on a single topic There are more than 40,000 public newsgroups There are hundreds of gigabytes of information generated per day News servers can be set up for use within an organization 10 Configuring Telnet in Linux By default, telnet is installed but not enabled Telnet should not be used in a non-secure environment such as over the Internet because user names and passwords are not encrypted chkconfig telnet on service xinetd restart ssh is a secure replacement (described in Chapter 10) You cannot log on as root However, you can log on as another user and "su root" 11 Understanding Streaming Media Services Used to transfer video and audio By default, UDP is used Although TCP and HTTP can be used because of firewall issues in an organization No single standard exists as is true with SMTP, HTTP, POP3, and others Broadcast methods unicast – each packet is sent individually to each client multicast – each packet is sent to many clients 12 Understanding Streaming Media Services Helix Universal Server from Real Networks is popular Recognizes both Real Networks protocols (RTSP, PNA) and the Microsoft protocol (MMS) Windows Media Services is a Windows component Creates a folder called \ASFRoot to store Advanced Streaming Format (ASF) files 13 Understanding E-Commerce Servers Can be as simple as a product list and a shopping cart Can be as complex as amazon.com or dell.com Microsoft Commerce Server is an add-on to IIS Incorporates a number of features required for a typical e-commerce site Highly customizable 14 Summary Use FTP to transfer files You use News servers to set up threaded discussions on a variety of topics Telnet and Windows Terminal Services allow you to remotely administer a server Streaming media servers are used for video and audio E-commerce servers focus on selling and in general, communicating with customers 15