Unit:VI Server & Printer Management: 6.1 Introduction To APACHE Web Server
Unit:VI Server & Printer Management: 6.1 Introduction To APACHE Web Server
Unit:VI
Server & Printer Management
6.1 Introduction to APACHE Web Server
Apache web server is an open source and cross-platform web server. It is mostly
and widely used server in the world.
It is design and develop by Apache Software Foundation in 1995. It is written in C
& XML and runs widely on Linux distributions.
In this tutorial, we will install apache web server on ubuntu. this whole process
includes the following steps.
Prerequisites
Following are the prerequisites for this installation process.
A system running Ubuntu , any linux distribution
An internet connection
Access to a user account with sudo privileges
# apt-get update
type 'y' and press enter, it will start to download and install apache server to the
system. After this process, We can check that server has installed properly by calling
localhost from the browser. As we did in the following screen-shot.
It shows that apache has installed properly and can be accessed from the browser.
All the configuration files for Apache are located in /etc/httpd/conf and
/etc/httpd/conf.d.
The data for websites you'll run with Apache is located in /var/www by default, but
you can change that if you want.
/etc/httpd/conf : this directory contains the Apache configuration file, httpd.conf.
/etc/rc.d/ : The tree under this directory contains the system startup scripts. The
Apache installs a startup script named httpd for the Web server under the
/etc/rc.d/init.d directory. This script , which we can use to start and stop the server
from the command line, also automatically starts and stops the server when the
computer is halted, started , or rebooted.
/var/www : under this directory installs the default server icons, Common
Gateway Interface(CGI) programs, and HTML file in this location.
/usr/sbin : The executable programs are placed in this directory. This includes
the server executable itself, as well a various utilities.
/usr/bin : some of the utilities from the Apache package are placed here. For
example, the htpasswd program, which is used for generating authentication
Password files.
BSC[CS]TY, LINUX ADMINISTRATION
The Network File System (NFS) is a mechanism for storing files on a network. It
is a distributed file system that allows users to access files and directories located
on remote computers and treat those files and directories as if they were local.
For example, users can use operating system commands to create, remove, read,
write, and set file attributes for remote files and directories.
The NFS software package includes commands and daemons for NFS, Network
Information Service (NIS), and other services. Although NFS and NIS are installed
together as one package, each is independent and each is configured and
administered individually. See Network Information Services (NIS and NIS+) Guide
for details on NIS and NIS+.
• SAMBA runs on most UNIX and UNIX-like systems, such as LINUX, Solaris, AIX
and the BSD variants, including Apple's Mac OS X Server and Mac OS X client.
Samba enables UNIX/LINUX systems to participate in Windows networks as a File
andPrint Server or Client.
BSC[CS]TY, LINUX ADMINISTRATION
• Once SAMBA is installed, we can either create the file /etc/smb.conf or use the
smb.conf file supplied with Samba, which is located by default under the
/etc/samba directory with FEDORA.
# Adrian's
share
[MyShare]
comment = YOUR
COMMENTS path =
/your-share-folder
BSC[CS]TY, LINUX ADMINISTRATION
6. Restart samba.
type: /etc/init.d/smbd restart
7. Create the share folder:
sudo mkdir /your-share-folder
8. Set the permissions:
sudo chmod 0777 /your-share-folder
9. you are all set in Linux
Figure: Use SWAT from your browser to manage your Samba configuration.
The rest of this section describes how to use SWAT to create your configuration
entries (in /etc/samba/smb.conf) and to work with that configuration.
1. In a graphical desktop environment, click Main Menu => System Settings =>
Printing.
2. Type the command redhat-config-printer at a shell prompt (for example, in a
command-line terminal window) to start the graphical version.
Choosing a Printer
If our system has connected with more than one printer, you can choose one of
them to print the particular file. These printers can be connected with different
methods such as parallel, serial, USB port, networking.
The above command will display a list of available printers. The '-p' option is used to
display a list of the printers, and the '=d' option specifies the default printer.
To print a file with a specific printer, execute the lp command with the '-d' option or
lpr command with the '-P' option. Consider the following commands:
To launch system-config-printer, select the Printing menu item from the GNOME
or KDE desktop panel's System Settings menu or use the command line of an X
terminal window like this:
# system-config-printer &
Figure : Click the New toolbar button to start the configuration of a new
printer for your system; when the wizard's dialog appears, click the Forward
button to begin.
BSC[CS]TY, LINUX ADMINISTRATION
Click the Forward button; the Queue Name dialog appears. Type a desired name for
the new printer (such as lp), enter a short description, and then click the Forward
button.
The Queue Type dialog appears, You can configure a local or networked printer
supported by the Common UNIX Printing System (CUPS), the lpd daemon on a
remote server, a Session Message Block (SMB) server, NetWare Core Protocol
(Novell), or a JetDirect interface. To configure a printer attached to your computer,
select the locally connected queue type, click to select the printer device (which
might be /dev/lp0 or /dev/usb/lp0), and then click Forward. You can also use the
Custom Device button to enter a different port, such as /dev/ttyS0, for a serial printer.
BSC[CS]TY, LINUX ADMINISTRATION
The Printer Model dialog shown in Figure : presents a drop-down menu you can use
to choose the manufacturer of your printer, or you can simply choose a generic type
of connected printer.
Figure : Click the drop-down menu to select your printer's
manufacturer or printer type.
BSC[CS]TY, LINUX ADMINISTRATION
Note that you can configure a printer for Fedora even if it is not attached to your
computer. After you select your printer's manufacturer, a list of printers from that
manufacturer (such as HP, as shown in Figure 12.4) appears. Select your printer
from the list, and then click the Forward button.
Figure : Select your printer from the list and click the Forward button to finish the
configuration of a locally connected printer.
Do not worry if you do not see your printer listed in the selection; it is possible to
select a related, although different, printer model and still be able to print to your
printer. For example, many HP printers can be used by selecting the DeskJet 500
for monochrome or 500C model for color printing.
Note
You can also browse to http://www.linuxprinting.org/ to find out what drivers to
use with your printer or to see a cross-referenced listing of printers supported by
each driver. You might also find new and improved drivers for the latest printers
on the market.
You can experiment to see which printer selection works best for your printer if its
model is not listed. You might not be able to use all the features of your printer, but
you will be able to set up printing service. Click Forward when you have made your
choice.
BSC[CS]TY, LINUX ADMINISTRATION
The Finish and Create New Print Queue dialog shows you the printer type, printer
device, and selected printer so that you can confirm the information is correct (see
Figure 12.5). If you need to change the options, click Back to return to previous
dialogs. To create the new print queue, click Finish.
When the print queue has been created, you are asked whether you would like to
print a test page. Click Yes to save your new printer setup and to print a test page.
If you click No, a test page is not printed, and you have to delete the new printer
entry or save or cancel your changes before you quit system-config-printer.
You can see the new printer defined in the system-config-printer main window
as shown in following Figure :
BSC[CS]TY, LINUX ADMINISTRATION