CIS 240 Introduction to UNIX Instructor: Sue Sampson
CIS240 – UNIX and WWW Internet aka World Wide Web Network of clients and servers Servers provide web pages Clients view web pages
CIS240 – UNIX and WWW Common Web Servers Apache Runs on UNIX and Microsoft platforms Most popular web server “Free” – bundled with RH9 Internet Information Services (IIS) Server Runs on Microsoft platforms only Gaining in popularity Bundled with Windows operating systems
CIS240 – UNIX and WWW Common Web Clients Netscape – not supported as of 6/04 Microsoft Internet Explorer Konquerer – KDE project Mozilla Opera
CIS240 – UNIX and WWW How it Works The server listens for web page requests on port 80 The client sends requests for web pages to port 80 on the server The server returns the web page to the client The client displays the web page
CIS240 – UNIX and WWW HTTP The exchange of data between client and server is controlled by a set of rules, implemented in software The set of rules governing the transfer of web pages is called hypertext transfer protocol (http for short)
CIS240 – UNIX and WWW HTML Stands for HyperText Markup Language Tag-based language HTML pages are written as text and saved in files with extensions of html or htm Files are viewed by using a web browser The web browser interprets the HTML and acts on the information in the tags
CIS240 – UNIX and WWW Basic Tags Open HTML tag Close HTML tag Open Header tag Close Header tag Open Title tag Close Title tag Open Body tag Close Body tag
CIS240 – UNIX and WWW Sample HTML Program This is a sample HTML program This is my program
CIS240 – UNIX and WWW Using the Apache Web Server with Linux The Apache server must be installed The httpd service must be running The server must be pointed to the directory where the web pages are stored Clients must have connectivity with the server
CIS240 – UNIX and WWW Controlling Services – Console /sbin/chkconfig --list displays current status of services httpd0:off1:off2:off3:off4:off5:off6:off syslog0:off1:off2:on3:on4:on5:on6:off iptables0:off1:off2:on3:on4:on5:on6:off 7 Runlevels, each has own default set of services 0: Halt – in the process of shutting down 1: Single-user – limited services, use for critical system maintenance 2: Multiuser/sans file services – most services, no network file services 3: Full multiuser – full file services, no XWindows 4: User-defined 5: Full multiuser with XWindows – default run level 6: Reboot
CIS240 – UNIX and WWW Controlling Services – Console Most common services = httpd – Apache web server sendmail – SMTP mail server nfs – file server named – DNS server sshd – secure shell server telnet vsftpd
CIS240 – UNIX and WWW Controlling Services – Console Turning services on: sbin/chkconfig httpd on Check? /sbin/chkconfig --list | grep httpd httpd0:off1:off2:on3:on4:on5:on6:off Turning services off: /sbin/chkconfig httpd off Starting services: /sbin/service httpd start Starting httpd:[ OK ] Stopping services: /sbin/service httpd stop Stopping httpd:[ OK ]
CIS240 – UNIX and WWW Controlling Services – Desktop Environment Starting Desktop Environment from console: /]# startx -- only one session available -- to end, click on Red Hat ( ), logout
CIS240 – UNIX and WWW Controlling Services – Desktop Environment -> System Tools-> System Monitor - displays current status of services -> System Settings-> Services – enable, start, stop, restart services
CIS240 – UNIX and WWW A Typical Apache Installation The default path for web pages is: /var/www/html