sandy report

43
ACKNOWLEDGEMENT The special thank goes to my helpful course coordinator Mr kausik Mondal The support that he gave truly help the progression and smoothness of the internship program. The co-operation is much indeed appreciated. My grateful thanks also go to both librarian and lab assistant. A big contribution and hard worked from both of you during the FIVE week is very great indeed. All projects during the program would be nothing without the enthusiasm and imagination from both of you. Besides, this internship program makes me realized the value of working together as a team and as a new experience in working environment, which challenges us every minute. Not forget, great appreciation go to the rest of CMC's staff that help me from time to time during the project. The whole program really brought us together to appreciate the true value of friendship and respect of each other Great deals appreciated go to the contribution of my faculty - Faculty of Management (FOM). I am also would like to thankful the Coordinator of CMC (FOM) - Mr. S.NANDY, Assistant Director of CMC, and all the staff in the CMC office that patient in helping us complete this program. Last but not least I would like to thank my friends especially those who work together as interns at CMC– X & Y for the wise idea throughout the project.

Upload: sandeepkumar907

Post on 24-May-2015

422 views

Category:

Documents


0 download

DESCRIPTION

web server & mail server configuration in RHEL 4.0

TRANSCRIPT

Page 1: Sandy Report

ACKNOWLEDGEMENT

The special thank goes to my helpful course coordinator Mr kausik Mondal The support that he gave truly help the progression and smoothness of the internship program. The co-operation is much indeed appreciated.

My grateful thanks also go to both librarian and lab assistant. A big contribution and hard worked from both of you during the FIVE week is very great indeed. All projects during the program would be nothing without the enthusiasm and imagination from both of you. Besides, this internship program makes me realized the value of working together as a team and as a new experience in working environment, which challenges us every minute. Not forget, great appreciation go to the rest of CMC's staff that help me from time to time during the project. The whole program really brought us together to appreciate the true value of friendship and respect of each other

Great deals appreciated go to the contribution of my faculty - Faculty of Management (FOM). I am also would like to thankful the Coordinator of CMC (FOM) - Mr. S.NANDY, Assistant Director of CMC, and all the staff in the CMC office that patient in helping us complete this program.

Last but not least I would like to thank my friends especially those who work together as interns at CMC– X & Y for the wise idea throughout the project.

Page 2: Sandy Report

CONTENT

Basic networking Ip addressing Tcp-ip model Topology Linux RHEL4 RHEL4:basic command,installation,configuration Group ownership File permission Linux file system & handling Linux user administration Linux services & configuration FTP server,telnet,squid,web server,mail sever,DHCP,samba Concept of virtualization & implementation Project on Mail server & Webserver

Page 3: Sandy Report

RHEL4(RED HAT LINUX ENTERPRISE VER 4)

BASIC COMMAND:

A> FILE MANAGEMENT AND MANIPULATION:

Copy Files: cp The cp command is used to copy files. It has a substantial number of options. See its man page for additional details. By default, this command works silently, only displaying status information if an error condition occurs. Following are the most common options for cp: Option for cp Description -f Forces copy; does not ask for verification -I Interactive copy; before each file is copied, verifies with user

Page 4: Sandy Report

First, let’s use the touch command to create an empty file called kumar.txt in the user yyang’s home directory. Type [root@sandeep ~]# touch foo.txt To use the cp (copy) command to copy foo.txt to foo.txt.html, type [root@sandeep ~]# cp foo.txt foo.txt.html To interactively copy all files ending in .html to the /tmp directory, type this command: [root@sandeep ~]# cp -i *.html /tmp

Page 5: Sandy Report

Move Files: mv The mv command is used to move files from one location to another. Files can be moved across partitions/file systems as well. Moving files across partitions involves a copy operation, and as a result, the move command may take longer. But you will find that moving files within the same file system is almost instantaneous. Following are the most common options for mv: Option for mv Description -f Forces move -I Interactive move To move a file named foo.txt.html from /tmp to your present working directory, use this command: [root@sandeep ~]# mv /tmp/foo.txt.html .

Page 6: Sandy Report

Display a File One Screen at a Time: more The more command works in much the same way the DOS version of the program does. It takes an input file and displays it one screen at a time. The input file can come either from its stdin or from a command-line parameter. Additional command-line parameters, though rarely used, can be found in the man page. To view the /etc/passwd file one screen at a time, use this command: [root@sandeep ~]# more /etc/passwd To view the directory listing generated by the ls command one screen at a time, enter [root@sandeep ~]# ls | more

Page 7: Sandy Report

Show the Directory Location of a File: which The which command searches your entire path to find the name of an executable specified on the command line. If the file is found, the command output includes the actual path to the file. Use the following command to find out which directory the binary for the rm command is located in: [root@sandeep ~]# which rm /bin/rm You may find this similar to the find command. The difference here is that since which only searches the path, it is much faster. Of course, it is also much more limiting than find, but if all you’re looking for is a program, you’ll find it to be a better choice of commands.

Page 8: Sandy Report

Disk Free: df The df program displays the amount of free space partition by partition (or volume by volume). The drives/partitions must be mounted in order to get this information. Network File System (NFS) information can be gathered this way as well. Some parameters for df are listed here; additional (rarely used) options are listed in the df manual page. Option for df Description -h Generates free-space amount in human-readable numbers rather than free blocks. -l Lists only the locally mounted file systems. Does not display any information about network-mounted file systems.

Page 9: Sandy Report

Create a Directory: mkdir The mkdir command in Linux is identical to the same command in other flavors of UNIX, as well as in MS-DOS. An often-used option of the mkdir command is the -p option. This option will force mkdir to create parent directories if they don’t exist already. Show Present Working Directory: pwd It is inevitable that you will sit down in front of an already logged-in workstation and not know where you are in the directory tree. To get this information, you need the pwd command. Its only task is to print the current working directory. To display your current working directory, use this command: [root@sandeep ~]# pwd /home/yyang

Page 10: Sandy Report

Who Is Logged In: who On systems that allow users to log into other users’ machines or special servers, you will want to know who is logged in. You can generate such a report by using the who command: [root@sandeep ~]# who yyang pts/0 2010-10-08 15:24 (10.35.35.51) yyang pts/1 2010-10-08 16:07 (10.35.35.51) A Variation on who: w The w command displays the same information that who does and a whole lot more. The details of the report include who is logged in, what their terminal is, where they are logged in from, how long they’ve been logged in, how long they’ve been idle, and their CPU utilization. The top of the report also gives you the same output as the uptime command. [root@sandeep ~]# w 16:11:24 up 1:10, 2 users, load average: 0.04, 0.01, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT yyang pts/0 192.168.99.51 15:24 0.00s 0.12s 0.01s w yyang pts/1 192.168.99.51 16:07 3:35 0.04s 0.04s -bash

Page 11: Sandy Report

EDITORS

vi The vi editor has been around UNIX-based systems since the 1970s, and its interface shows it. It is arguably one of the last editors to actually use a separate command mode and data entry mode; as a result, most newcomers find it unpleasant to use. But before you give vi the cold shoulder, take a moment to get comfortable with it. In difficult situations, you may not have a pretty graphical editor at your disposal, and vi is ubiquitous across all UNIX systems. The version of vi that ships with Linux distributions is vim (VI iMproved). It has a lot of what made vi popular in the first place and many features that make it useful in today’s typical environments (including a graphical interface if the X Window System is running). To start vi, simply type [root@sandeep ~]# vi

Page 12: Sandy Report

Creating Users with useradd

Add new user accounts and assign passwords with the useradd and passwd commands. 1. Create a new user whose full name is “Ying Yang,” with the login name (account name) of yyang. Type [root@sandeep ~]# useradd -c "Ying Yang" yyang This command will create a new user account called yyang. The user will be created with the usual Fedora default attributes. The entry in the /etc/passwd file will be yyang:x:500:500:Ying Yang:/home/yyang:/bin/bash From this entry, you can tell these things about the Fedora (and RHEL) default new user values: ▼ The UID number is the same as the GID number. ■ The default shell for new users is the bash shell (/bin/bash). ▲ A home directory is automatically created for all new users (e.g., /home/ yyang). 2. Use the passwd command to create a new password for the username yyang. Set the password to be 19ang19, and repeat the same password when prompted. Type [root@sandeep ~]# passwd yyang Changing password for user yyang. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully

Page 13: Sandy Report

Creating Groups with groupadd

Next, create a couple of groups: nonsystem and system. 1. Create a new group called research. Type [root@sandeep ~]# groupadd research 2. Examine the entry for the research group in the /etc/group file. Type [root@sandeep ~]# grep research /etc/group research:x:501: This output shows that the group ID for the research group is 501.

Page 14: Sandy Report

Modifying User Attributes with usermod

Now try using usermod to change the user and group IDs for a couple of accounts. 1. Use the usermod command to change the user ID (UID) of the bogususer to 600. Type [root@sandeep ~]# usermod -u 600 bogususer 2. Use the id command to view your changes. Type [root@sandeep ~]# id bogususer The output shows the new UID (600) for the user. 3. Use the usermod command to change the primary group ID (GID) of the bogususer account to that of the bogus group (GID = 101) and to also set an expiry date of 12-12-2010 for the account. Type [root@sandeep ~]# usermod -g 497 -e 2010-12-12 bogususer 4. View your changes with the id command. Type [root@sandeep ~]# id bogususer 5. Use the chage command to view the new account expiration information for the user. Type [root@sandeep ~]# chage -l bogususer Last password change : Sep 23, 2009 Password expires : never Password inactive : never Account expires : Dec 12, 2010 Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7

Page 15: Sandy Report

Modifying Group Attributes with groupmod

Now try using the groupmod command. 1. Use the groupmod command to rename the bogus group to bogusgroup. Type [root@sandeep ~]# groupmod -n bogusgroup bogus 2. Again use the groupmod command to change the group ID (GID) of the bogusgroup to 600. Type [root@sandeep ~]# groupmod -g 600 bogusgroup 3. View your changes to the bogusgroup in the /etc/group file. Type [root@sandeep ~]# grep bogusgroup /etc/group

Page 16: Sandy Report

Deleting Groups and Users with groupdel and userdel

Try using the groupdel and userdel commands to delete groups and users, respectively. 1. Use the groupdel command to delete the bogusgroup group. Type [root@sandeep ~]# groupdel bogusgroup You will notice that the bogusgroup entry in the /etc/group file will be removed accordingly. 2. Use the userdel command to delete the user bogususer that you created previously. At the shell prompt, type [root@sandeep ~]# userdel -r bogususer

Page 17: Sandy Report

GROUP OWNERSHIP

Change Ownership: chown The chown command allows you to change the ownership of a file to someone else. Only the root user can do this. (Normal users may not give away file ownership or steal ownership from another user.) The syntax of the command is as follows: [root@sandeep ~]# chown [-R] username filename where username is the login of the user to whom you want to assign ownership, and filename is the name of the file in question. The filename may be a directory as well. The -R option applies when the specified filename is a directory name. This option tells the command to recursively descend through the directory tree and apply the new ownership, not only to the directory itself, but also to all of the files and directories within it.

Page 18: Sandy Report

GROUP OWNERSHIP& FILE PERMISSION (Change Group: chgrp)

The chgrp command-line utility lets you change the group settings of a file. It works much like chown. Here is the format: [root@sandeep ~]# chgrp [-R] groupname filename where groupname is the name of the group to which you want to assign filename ownership. The filename may be a directory as well. The -R option applies when the specified filename is a directory name. As with chown, the -R option tells the command to recursively descend through the directory tree and apply the new ownership, not only to the directory itself, but also to all of the files and directories within it.

Page 19: Sandy Report

• GROUP OWNERSHIP& FILE PERMISSION (Change Mode: chmod)

Directories and files within the Linux system have permissions associated with them. By default, permissions are set for the owner of the file, the group associated with the file, and everyone else who can access the file (also known as owner, group, and other, respectively). When you list files or directories, you see the permissions in the first column of the output. Permissions are divided into four parts. The first part is represented by the first character of the permission. Normal files have no special value and are represented with a hyphen (-) character. If the file has a special attribute, it is represented by a letter. The two special attributes we are most interested in here are directories (d) and symbolic links (l). The second, third, and fourth parts of a permission are represented in three-character chunks. The first part indicates the file owner’s permission. The second part indicates the group permission. The last part indicates the world permission. In the context of UNIX, “world” means all users in the system, regardless of their group settings. Following are the letters used to represent permissions and their corresponding values. When you combine attributes, you add their values. The chmod command is used to set permission values. Letter Permission Value R Read 4 W Write 2 X Execute 1

Page 20: Sandy Report

GROUP OWNERSHIP& FILE PERMISSION

The following list shows the most common combinations of the three permissions. Other combinations, such as -wx, do exist, but they are rarely used. Letter Permission Value --- No permissions 0 r-- Read only 4 Rw- Read and write 6 Rwx Read, write, and execute 7 r-x Read and execute 5 --x Execute only 1

Page 21: Sandy Report

FILE SYSTEM & HANDLING

File systems are the mechanisms by which the data on a storage medium gets organized. They provide all of the abstraction layers above sectors and cylinders of disks. In this section, we’ll discuss the composition and management of these abstraction layers supported by Linux. Particular attention will be given to the default Linux file system, ext2/ext3.

Page 22: Sandy Report

The /etc/fstab File

As mentioned earlier, /etc/fstab is a configuration file that mount can use. This file contains a list of all partitions known to the system. During the boot process, this list is read and the items in it are automatically mounted with the options specified therein. Here’s the format of entries in the /etc/fstab file: /dev/device /dir/to/mount fstype Parameters fs_ freq fs_ passno 1) /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 2) LABEL=/boot /boot ext3 defaults 1 2 3) devpts /dev/pts Devpts gid=5,mode=620 0 0 4) tmpfs /dev/shm tmpfs defaults 0 0 5) /dev/VolGroup00/LogVol02 /home ext3 defaults 1 2 6) proc /proc proc defaults 0 0 7) sysfs /sys sysfs defaults 0 0 8) /dev/VolGroup00/LogVol03 /tmp ext3 defaults 1 2 9) /dev/VolGroup00/LogVol01 swap swap defaults 0 0 10) /dev/sr0 /media/cdrom auto user,noauto,exec 0 0

Page 23: Sandy Report

Creating a Partition

1. Begin by running fdisk with the -l parameter to list the current partition table. Type [root@sandeep ~]# fdisk -l /dev/sda Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00005158 Device Boot Start End Blocks Id System /dev/sda1 * 1 25 200781 83 Linux /dev/sda2 26 1200 9438187+ 8e Linux LVM 2. Next, we begin the actual repartitioning process using fdisk again. Type [root@sandeep ~]# fdisk /dev/sda The number of cylinders for this disk is set to 1305. ...(OUTPUT TRUNCATED)... 2) booting and partitioning software from other operating systems (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): You will be presented with a simple fdisk prompt “Command (m for help):”. 3. Print the partition table again while inside the fdisk program. Type p at the fdisk prompt to print the partition table

Page 24: Sandy Report

Creating a Partition

Command (m for help): p Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00005158 Device Boot Start End Blocks Id System /dev/sda1 * 1 25 200781 83 Linux /dev/sda2 26 1200 9438187+ 8e Linux LVM A few facts worthy of note regarding this output: ▼ The total disk size is approximately 10.7GB. ■ There are currently two partitions defined on the sample system: /dev/sda1 and /dev/sda2. ■ The /dev/sda1 partition is of the type “Linux” (0x83), and the /dev/sda2 partition is of the type “Linux LVM” (0x8e).

Page 25: Sandy Report

Creating a Partition

■ From the partitioning scheme we chose during the OS installation, we can deduce that /dev/sda1 houses the /boot file system and /dev/sda2 houses everything else (see the output of the df command for reference). ■ The entire disk spans 1305 cylinders. ▲ The last partition, i.e., /dev/sda2, ends at the 1200-cylinder boundary. Therefore, there is room to create a partition that will occupy the space from cylinder 1201 to the last cylinder on the disk (i.e., 1305). 4. Type n at the prompt to create a new partition. Command (m for help): n

Page 26: Sandy Report

Creating a Partition

5. Type p to select a primary partition type. Command action e extended P primary partition (1-4) P 6. We want to create the third primary partition. Type 3 when prompted for a partition number: Partition number (1-4): 3 7. The next step is to specify the partition size. First we choose the lower limit. Accept the default value for the first cylinder. Type 1201. First cylinder (1201-1305, default 1201): 1201 8. Instead of designating a megabyte value for the size of this partition, we enter the last cylinder number, thus taking up the remainder of the disk. Accept the default suggested for the last cylinder. On our sample system, this value is 1305. Type 1305. Last cylinder or +size or +sizeM or +sizeK (1201-1305, default 1305): 1305 9. By default, fdisk creates ext2-type partitions (i.e., 0x83). But we want to create a partition of type “Linux LVM.” Change the partition type from the default Linux (0x83) to the “Linux LVM” type. To do this, we use the t (change partition type) command. Type t. Command (m for help): t

Page 27: Sandy Report

Creating a Partition

10. Enter the partition number whose type you want to change. We want to change the type for the /dev/hda3 partition that was just created, so type 3 when prompted for a partition number. Partition number (1-4): 3 11. Enter the partition type for “Linux LVM”. Type 8e at the prompt: Hex code (type L to list codes): 8e 12. View the changes you’ve made by viewing the partition table. Type p. Command (m for help): p Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00005158 Device Boot Start End Blocks Id System /dev/sda1 * 1 25 200781 83 Linux /dev/sda2 26 1200 9438187+ 8e Linux LVM /dev/sda3 1201 1305 843412+ 8e Linux LVM 13. Once you are satisfied with your changes, commit or write the changes you’ve made to the disk’s partition table using the w (write table to disk) command: Command (m for help): w 14. Quit the fdisk utility. Type q. Command (m for help): q 15. When you are back at the shell prompt, reboot the system to allow the Linux kernel to properly recognize the new partition table. Type [root@sandeep ~]# reboot

Page 28: Sandy Report

The /etc/shadow File

Just as in the /etc/passwd file, each line in the /etc/shadow file represents information about a user. The lines are made up of various standard fields, with each field delimited by a colon. The fields are ▼ Login name ■ Encrypted password ■ Days since January 1, 1970, that password was last changed ■ Days before password may be changed ■ Days after which password must be changed ■ Days before password is to expire that user is warned ■ Days after password expires that account is disabled ■ Days since January 1, 1970, that account is disabled ▲ A reserved field A sample entry from the /etc/shadow file is shown here for the user account mmel: mmel:$1$HEWdPIJ.$qX/RbB.TPGcyerAVDlF4g.:12830:0:99999:7:::

Page 29: Sandy Report

THE INIT PROCESS

The init process is the first non-kernel process that is started, and, therefore, it always gets the process ID number of 1. init reads its configuration file, /etc/inittab, and determines the runlevel where it should start. Essentially, a runlevel dictates the system’s behavior. Each level (designated by an integer between 0 and 6) serves a specific purpose. A runlevel of initdefault is selected if it exists; otherwise, you are prompted to supply a runlevel value. The runlevel values are as follows: 0 Halt the system 1 Enter single-user mode 2 Multiuser mode, but without Network File System (NFS) 3 Full multiuser mode (normal) 4 Unused 5 Same as runlevel 3, except using an X Window System login rather than a text-based login 6 Reboot the system

Page 30: Sandy Report

FTP SERVER

The File Transfer Protocol (FTP) has existed for the Internet since around 1971. Remarkably, the protocol has undergone little change since then. Clients and servers, on the other hand, have been almost constantly improved and refined. This chapter covers the Very Secure FTP Daemon (vsftpd) software package. The vsftpd program is a fairly popular FTP server and is being used by major FTP sites such as kernel.org, redhat.com, isc.org, and openbsd.org. The fact that these sites run the software attests to its robustness and security. As the name implies, the vsftpd software was designed from the ground up to be fast, stable, and secure.

Page 31: Sandy Report

OBTAINING AND INSTALLING VSFTPD

First we discuss the process of installing the software from a Red Hat Package Manager (RPM) binary. 1. While logged into the system as the superuser, use the yum command to simultaneously download and install vsftpd. Type (enter y for “yes” when prompted) [root@sandeep ~]# yum -y install vsftpd ...<OUTPUT TRUNCATED>... 2. Confirm that the software has been installed. Type [root@sandeep ~]# rpm -q vsftpd vsftpd-*

Page 32: Sandy Report

Starting and Testing the FTP Server

So let’s start a sample anonymous FTP session. But first we’ll start the FTP service. 1. Start the FTP service. Type [root@serverA ~]# service vsftpd start Starting vsftpd for vsftpd: [ OK ]

2. Launch the command-line FTP client program, and connect to the local FTP server as an anonymous user. Type [root@serverA ~]# ftp localhost Connected to localhost (127.0.0.1). 220 (vsFTPd 2.0.8) Name (localhost:root): ...<OUTPUT TRUNCATED>... 3. Enter the name of the anonymous FTP user when prompted; i.e., type ftp. Name (localhost:root): ftp 331 Please specify the password. 4. Enter anything at all when prompted for the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files.

Page 33: Sandy Report

Starting and Testing the FTP Server

5. Use the ls (or dir) FTP command to perform a listing of the files in the current directory on the FTP server.

ftp> ls 227 Entering Passive Mode (127,0,0,1,63,215). 150 Here comes the directory listing. drwxr-xr-x 2 0 0 4096 Aug 29 06:18 pub 226 Directory send OK. 6. Use the pwd command to display your present working directory on the FTP server. ftp> pwd 257 "/“ 7. Using the cd command, try to change to a directory outside of the allowed anonymous FTP directory; e.g., try to change your directory to the /boot directory of the local file system. ftp> cd /boot 550 Failed to change directory. 8. Log out of the FTP server using the bye FTP command. ftp> bye 221 Goodbye.

Page 34: Sandy Report

SAMBA CONFIGURATION

Installing Samba package via RPM Precompiled binaries for Samba exist for most Linux distributions. This section will show how to install Samba via Red Hat Package Manager (RPM) on a Fedora distribution. To provide the server-side services of Samba, three packages are needed on Fedora and Red Hat Enterprise Linux (RHEL)–type systems. They are ▼ samba*.rpm This package provides an SMB server that can be used to provide network services to SMB/CIFS clients. ■ samba-common*.rpm This package provides files necessary for both the server and client packages of Samba—files such as configuration files, log files, man pages, PAM modules, and other libraries. ▲ samba-client*.rpm It provides the SMB client utilities that allow access to SMB shares and printing services on Linux and non-Linux-type systems. The package is used on Fedora, OpenSuSE, and other RHEL-type systems.

Page 35: Sandy Report

SAMBA CONFIGURATION

rpm –ivh sam* --force –aid If already install rpm –qa sam* Create directory: Mkdir /samba Give write permission: Chmod 0+w /samba Create a new user: Useradd testsamba Smbpasswd –a ******* Open smb.conf file to edit: Vi /etc/samba/smb.conf

Page 36: Sandy Report

Smb.conf file

Host allow :172.0. 127 Domain logons : yes Create account info:i. Path - /sambaii. Public- yesiii. User-testsambaiv. Writable –yesv. Printable-no After making any configuration changes to Samba, you can restart it with this command to make the changes go into effect: [root@sandeep ~]# service smb restart Chkconfig smb on

Page 37: Sandy Report

CONFIGURE DISK QUOTA

Enter single user mode or GUI mode Edit /etc/fstab fileAdd ,usrqouta after defaults in New /etc/fstab fileLABEL=/ / ext3 defaults,usrquota 1,2 • Remount file system:# mount –o remount /• Create aquota.user or aquota.group files:Quotacheck-mcvu /• Make Linux read the aquota.user file# quotacheck –vagum• Modify users quota information# edquota –u• # setquota –u a 500 1000 10 15 /• The above command will invoke the vi editor which will allow you to edit a number of fields.• # quotaon –av (to on the disk quota)• # quotaoff –av (to off the disk quota)• # repquota –av (to view the diskquota)

Page 38: Sandy Report

PROJECT ON MAIL SERVERPROJECT ON MAIL SERVER & WEB SERVER & WEB SERVER

A.A. CONFIGURE A WEB SERVER SUCH THAT ONLY ONE CAN ACCESS YOUR SERVER AT THE SAME CONFIGURE A WEB SERVER SUCH THAT ONLY ONE CAN ACCESS YOUR SERVER AT THE SAME NETWORKNETWORK

Host two websitesHost two websites

1.1. www.summertraining.com

2.2. www.linux.com

DEVELOP INDEX.HTML(Homepage)DEVELOP INDEX.HTML(Homepage)

B.B. CONFIGURE SMTP & POP & POP3 ,SO THAT ANY ONE CAN SEND OR RECEIVE MAIL THROUGH CONFIGURE SMTP & POP & POP3 ,SO THAT ANY ONE CAN SEND OR RECEIVE MAIL THROUGH WEB.WEB.

CONFIGURE ANY MAIL ACCOUNT IN OUTLOOK EXPRESS OR WINDOWS LIVECONFIGURE ANY MAIL ACCOUNT IN OUTLOOK EXPRESS OR WINDOWS LIVE

CONFIGURE YOUR SERVER AS A PROXY SERVER SO THAT ANY ONE CAN ACCESS CONFIGURE YOUR SERVER AS A PROXY SERVER SO THAT ANY ONE CAN ACCESS www.summertraining.com BUT NOT ACCESS BUT NOT ACCESS www.linux.com

Page 39: Sandy Report

PROJECT

EDIT /etc/httpd/conf/httpd.conf file . Then change the following lines: #NameVirtualHost *:80 #<VirtualHost *:80> # ServerAdmin [email protected] # DocumentRoot /summertraining.com # ServerName www.summertraining.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common

Page 40: Sandy Report

PROJECT

EDIT /etc/httpd/conf/httpd.conf file . Then change the following lines: #NameVirtualHost *:3128 #<VirtualHost *:3128> # ServerAdmin [email protected] # DocumentRoot /linux.com # ServerName www.linux.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common

Page 41: Sandy Report

PROJECT

After editing /etc/httpd/conf/httpd.conf file then make a two directory in root.

i. summertraining.com

ii. linux.com

Then create index.html1 & index.html2 (homepage) respectively in linux.com & summertraining.com

Then enter the following command

[root@sandeep ~]#/etc/init.d/httpd restart

Then change proxy and port number in my web browser

Then view the 2 websites.

Page 42: Sandy Report

SQUID CONFIGURATION

Configure /etc/squid/squid.conf file [root@sandeep ~]#/etc/squid/squid.conf. Then change the following line: http port :3128 #Recommended minimum configuration: acl CONNECT method CONNECT acl test src 172.0.0.0/255.255.0.0 acl blocklist dstdomain www.linux.com # And finally deny all other access to this proxy http_access allow localhost http_access allow blocklist http_access allow test http_access deny all After editing the file enter

[root@sandeep ~]#service squid restart

Stopping squid: [OK] init_cache_dir /var/spool/squid... Starting squid: . [ OK ]

Page 43: Sandy Report

MAIL SERVER

Package installation: [root@sandeep ~]# rpm -qa sendmail

sendmail-8.13.1-3.2.el4 [root@sandeep ~]# rpm -qa dov*

dovecot-0.99.11-8.EL4 [root@sandeep ~]# rpm -qa squir*

squirrelmail-1.4.8-4.el4

Then go to web browser and type :

http://127.0.1.88

http://127.0.1.88/webmail/src/login.php

Then enter into it and and send mail to any other user connected,if with same ip then no domain name required,otherwise domainname required.