System Administration Lab Manual
System Administration Lab Manual
LAB MANUAL
REG NO.
Ex. No: 1
Installation of Windows 2003 / 2008 Server
Date:
Aim:
To Install Windows 2003 / 2008 Server.
System Requirement:
Procedure:
First insert Windows Server 2003 CD.
Press any key to boot form CD. Is Displayed, We Press any Key to Boot From CD
It will ask for regional settings don’t worry leave default click on Next.
Give the name & Organizing click on Next.
This will ask you how clients & servers are connected to your network so it will keep track or license of your clients & Server.
Now it will prompt for computer Name & to set the password click on Next.
Select the typical for standalone select custom for Network configuration.
Typical Setting is Default Setting.
Select Internet Protocol (TCP/IP) click on properties.
This step is Network Configuration method.
Click on next to finish the wizard. Connecting the Domain format Step.
If you have a domain controller give the domain name to join this serve to domain.
It will prompt for user credential type the user name & password
it will be joined to domain click o next & finish the wizard.
RESULT:
Ex. No: 2 Installing Hardware, Devices and Drivers using Device
Date: manager and Driver Query
Aim:
To Install Hardware, Devices and Drivers using Device manager and Driver Query
System Requirement:
Procedure:
This step-by-step article describes how to use Device Manager to configure the hardware devices that
are installed on your Windows Server 2003-based computer.
1. Click Start, point to Administrative Tools, and then click Computer Management.
2. Under System Tools in the console tree, click Device Manager.
The devices that are installed on your computer are listed in the right pane.
3. Double-click the type of device that you want to configure -- for example, Ports (COM & LPT).
4. Right-click the device that you want to configure, and then click Properties.
5. Click the Resources tab.
7. In the Settings based on box, click the hardware configuration that you want to modify -- for
example, Basic configuration 0000.
8. Under Resource type in the Resource settings box, click the type of resource that you want to
modify -- for example,Interrupt Request.
9. Click Change Setting.
10. In the Edit Resource dialog box, type the value that you want for the resource, and then click OK.
11. Repeat steps 8 through 11 to configure the resource settings that you want for the device.
12. Quit Device Manager.
Use Device Manager to Search for Device Conflicts
A device conflict occurs when the same resources are allocated to two or more devices. Use Device
Manager to search
for device conflicts. To do so, follow these steps:
1. Click Start, point to Administrative Tools, and then click Computer Management.
5. Right-click the device that you want to test for conflicts, and then click Properties.
6. Click the Resources tab.
any conflicts that exist for the device are listed under Conflicting device list.
Result:
Ex. No: 3 Configure Active Directory Services, create a user and assign
Date: permissions using Logon Script and Group permissions.
Aim:
To Configure Active Directory Services, create a user and assign permissions using Logon Script and Group
permissions.
System Requirement:
Procedure:
How to install Active Directory on Windows 2003
Before you start following this article you must be aware this is simply a lab setup and you need to assign relevant ip
address, hostnames & domain names which are relavant to your enviroment / organisation.
Step 3: Go to the command prompt. start > run > cmd > click ok
Ensure the hostname is configured correctly. This can be changed at a later date once it has been made a DC but I
personally recommend NOT doing so. Get it right the first time is always recommended. The ip address, subnet mask, DG & DNS
has been set correctly according to your network ip addressing plan.
Oops did I say "Plan" Yes I did, make sure you plan your AD / Network before you get all excited and dive into installing your
domain or else get ready for some horrible nightmares.
I have come across all sorts of networks where so called :) IT administrators have assigned public ip address on the LAN. This
should only be done if the ISP has assigned a range to your office and the network design has a need for the same. Specifically the
networks I refer to have NOT been assigned any public ip's from there ISP and they have taken it upon themselves to use any
numbers they liked :) & had all sorts of problems with there network or dns lookups. Some are still stuck with these problems as
there networks have grown beyond control and extremely complex & simply to implement a change management & rectify this
mistake would cost them a lot more than they ever imagined.
The above screen shot "Manage you Server" is not an additional component it is pre installed with windows 2003 and it appears
under Start > Programs > Administrative tools > Manage You Server.
1. If you have not read any notes or seem unclear and still have doubts click on "Active Directory Help" when you see the first
window shown above.
2. If you are comfortable with the information you have in hand go to the next step.
3. Click next.
4. Select "Domain controller for a new domain".
9. Click next.
Note: If your AD has been planned and the growth factor has been taken into account I would recommend to plan these locations
right from the begining. Logs and database should be on a different partition. This will improve performance.
10. Click next.
12. Type a password (record this password part of your secure server documentation) click next.
Note: This password does not need to be the same as your domain administrator password. To read more regarding this topic click
on the "AD help link" on the same window.
13. View the Summary than click next.
14. Once you click next you will see a series of task performed by the wizard and it will start preparing AD.
15. You than be prompted for Windows 2003 SP2 cd as indicated in point 6 earlier in this article.
16. Insert the cd in your cd rom drive click next. The wizard will start copying the required files for DNS and configured DNS on your
behalf.
17. The wizard completes successfully click finish.
Result:
Ex. No: 4 Automated installation of Windows Server
Date: using answer files.
Aim:
To install Windows Server using answer files.
System Requirement:
Procedure:
This article describes how to install Setup Manager and use it to create an answer file. An answer file (the Unattend.txt file)
helps automate Windows installations by providing Windows Setup with the information that it needs during an unattended
installation.
How to Install and Run Setup Manager
By default, Setup Manager is not installed. To install and run Setup Manager:
1. Insert the Windows Server 2003 CD-ROM into the computer's CD-ROM drive or DVD-ROM drive. Press and hold down the
SHIFT key as you insert the CD to prevent it from starting automatically.
2. Start Windows Explorer, and then open the Support\Tools folder on the Windows Server 2003 CD-ROM.
3. In the right pane, double-click the Deploy.cab file to open it.
4. On the Edit menu, click Select All.
5. On the Edit menu, click Copy.
6. Create a new folder on your local hard disk. To do this:
a. Click Local Disk (C:), or click the drive in which you want to create the new folder.
b. On the File menu, point to New, and then click Folder.
c. In the New Folder name box, type the name that you want, and then press ENTER.
Right-click the new folder that you created, and then click Paste.
Double-click the new folder to open it, and then double-click the Setupmgr.exe file. The Setup Manager wizard starts.
Follow the instructions in the wizard to create an answer file.
Additional support information and sample answer files are available on the Windows Server 2003 CD-ROM in the following
locations:
I386\Unattend.txt
Support\Tools\Deploy.cab\Ref.chm
Support\Tools\Deploy.cab\Deploy.chm
Article ID: 323438 - Last Review: December 3, 2007 - Revision: 7.3
APPLIES TO
Windows AIK Version 1.0 was released with Windows Vista. New or redesigned tools and technologies included Windows
System Image Manager (Windows SIM), SysPrep,ImageX, and Windows Preinstallation Environment (WinPE) v2.0.[2]
Windows AIK Version 1.1 was released with Windows Vista SP1 (and Windows Server 2008). A number of new tools were
introduced, including PostReflect and VSP1Cln. The new WinPE 2.1 could be more customized. [3]Supported operating systems
include Windows Server 2008, Windows Vista, Windows Vista SP1, Windows Server 2003 SP1, Windows Server 2003 SP2 and
Windows XP SP2.
Windows AIK Version 2.0 was released with Windows 7 beta. Significantly, a single new tool, DISM, replaced several earlier
tools including PEImg and IntlCfg, which were deprecated. The new WinPE 3.0 has AeroSnaps—a Windows 7 feature. The User
State Migration Tool (USMT) was added to this WAIK. [4] Supported operating systems include Windows Server 2003 R2 SP2,
Windows Vista SP1, Windows Server 2008 family, Windows 7 family and Windows Server 2008 R2 family of operating systems.
Windows AIK version 3.0 is exactly the same as 2.0. The version number has only been updated to correspond with the release of
Service.[5] Microsoft has also released a Windows Automated Installation Kit Supplement for Windows 7 SP1. Windows
Automated Installation Kit Readme references the WAIK Supplement, which optionally adds WinPE v3.1 to a previously installed,
compatible WAIK.
The AIK has been renamed The Windows Assessment and Deployment Kit (ADK) for Windows 8 and now includes the
Windows OEM Preinstallation Kit. [6]
The Sysprep tool is not included with WAIK, but is instead included on the Operating System installation media (DVD).
Result:
Ex. No: 5 Installing required Windows 2003 server components
Date: using Control panel.
Aim:
To Install required Windows 2003 server components using Control panel.
System Requirement:
Procedure:
Installing Windows Components
To install Windows Components on a Windows Server 2003 system:
1. Log on to the computer as an administrator.
2. Select Start > Control Panel > Add or Remove Programs from the Toolbar.
5. Select the components to install by selecting the check box next to the following components:
Application Server Console
ASP.NET
Enable network COM+ access
Enable network DTC access
Internet Information Services (IIS)
Message Queuing
Note: The Message Queuing component is only required if the EdgeSight for NetScaler Report Console component is to be
installed on the target machine. The Message Queuing component is not required if only the Database or Data Collector
components are to be installed.
After the components are selected, click OK to continue.
14. After you insert the Windows Server 2003 CD/DVD, you must specify the location of the i386 folder.
Click Browse to locate the folder.
15. The location of the i386 folder on the Windows Server 2003 CD/DVD is based on the setup of the server and
where the files are stored. The directory you specified is shown in the Copy files from field. Click Open.
16. Click OK in the Files Needed dialog to continue.
17. After the installation is complete, the Completing the Windows Components Wizard box is displayed. Click Finish to close
the Windows Component Wizard.
Result:
Ex. No: 6 Installation and configuration of DHCP server.
Date:
Aim:
To Install and configure DHCP server. Dynamic Host Configuration Protocol (DHCP)
System Requirement:
Procedure:
A DHCP Server assigns IP addresses to client computers. This is very often used in enterprise networks to reduce
configuration efforts. All IP addresses of all computers are stored in a database that resides on a server machine.
Now this will prompt new scope welcome scree click next
A scope is a collection of IP addresses for computers on a subnet that use DHCP.
enter the name and description of your scope click next
Now you need to define the range of addresses that the scope will distribute across the network, the subnet
mask for the IP address . Enter the appropriate details and click next.
Enter the IP address range that you want to exclude and click on next
Select lease duration how long a client can use an IP address assigned to it from this scope. It is recommended to add longer
leases for a fixed network (in the office for example) and shorter leases for remote connections.
You are given a choice of whether or not you wish to configure the DHCP options for the scope now or later. You can select Yes,I
want to… radion button and click next
Enter the router, or gateway, IP address click next. The client computers will then know which router to use and click next
Enter the DNS and domain name settings can be entered.
The DNS server IP address will be distributed by the DHCP server and given to the client click next
If you have WINS setup then here is where to enter the IP Address of the WINS server. You can just input the server name into the
appropriate box and press Resolve” to allow it to find the IP address itself click next
Now you need to activate this scope now and click next
DHCP Server new scope installation was finished and clicks finish, Now your server is now a DHCP server message and click finish
DHCP servers permit you to reserve an IP address for a client. This means that the specific network will have the same IP
for as long as you wanted it to. To do this you will have to know the physical address (MAC) of each network card. Enter the
reservation name, desired IP address,
MAC address and description – choose whether you want to support DHCP or BOOTP and press add.
The new reservation will be added to the list.
Result:
Ex. No: 7 Configuring Disks and Volumes using Disk Manger and
Date: Managing disks and volumes from
the command prompt.
Aim:
To Configuring Disks and Volumes using Disk Manger and Managing disks and volumes from
the command prompt.
System Requirement:
Procedure:
Dynamic Disks and Volumes
Dynamic disk storage supports volume-oriented disks. You create the following volume types only on dynamic disks:
New simple volumes.
Volumes that span multiple disks (spanned volumes and striped volumes).
Volumes that are fault-tolerant (mirrored volumes and RAID-5 volumes).
Volumes on dynamic disks are called dynamic volumes. Dynamic disks can support up to 2,000 dynamic volumes per disk (although
the recommended number of volumes is 32 or less per disk).
Local access to dynamic volumes (and to the data that the dynamic volumes contain) is limited to Microsoft Windows 2000
and Microsoft Windows XP Professional-based computers. You cannot create dynamic volumes on (or access dynamic volumes
from) a Windows XP Professional-based computer that has one or more of the following operating systems running:
Microsoft Windows XP Home Edition
Microsoft Windows NT 4.0 and earlier
Microsoft Windows Millennium Edition
Microsoft Windows 98 Second Edition and earlier
MS-DOS
You can create dynamic disks by using the Convert to Dynamic Disk command in Disk Management to convert a basic disk.
NOTE: It is recommended that you perform a full backup of disk contents before you make any changes to disks, volumes, or
partitions.
How to Create a Simple Volume or a Spanned Volume
To create a simple volume or a spanned volume:
1. In Disk Management, perform one of the following steps:
To create a simple volume, right-click unallocated space on the dynamic disk on which you want to create the simple
volume, and then click New Volume.
Use Disk Management Tool (Utility) of Windows to create new simple volume
To use Disk Management Tool (Utility) of Windows to create new simple volume, enter Windows Computer Management interface
firstly, and then choose the desired dynamic disk and right click:
As shown above, click "New Volume…" on pop-up menu, and New Volume Wizard will appear. Please follow its prompts to set
properties for new created simple volume.
2. Select the type you want to create. The New Volume Wizard for that specific type of volume will open. Figure 19-8 shows
the New RAID-5 Volume Wizard.
Figure 19-10 Select a drive letter or mount point for the new volume.
6. Select the formatting options you want (shown in Figure 19-11). Even when mounting the volume rather than creating a
new drive, you can choose your format type without regard to the underlying format of the mount point. Click Next.
Figure 19-11 Set the formatting options for the new volume.
7. On the confirmation page, if all the options are correct, click Finish to create and format the volume. If the type you've
selected requires that the disks be converted to dynamic disks, you'll see a confirmation message from Disk Management,
as show in Figure 19-12.
Figure 19-12 Before converting disks to dynamic, you must confirm the change.
8. Once the volume is created, it's displayed in Disk Management, as shown in Figure 19-13.
Figure 19-13 The new RAID-5 volume being created
In the middle pane, right click on the partition or volume directly adjacent (left) of the unallocated space that you want to extend
into, and click on Extend Volume
Type in how many MB (1 GB = 1024 MB) you want to use from the unallocated space to extend the selected partition (step 5) into,
then click on the Next button
Click on the Finish button
The partition or volume has now been extended into the assigned unallocated
Result:
Ex. No: 8 Installation and Configuration of Mail Server in windows
Date: 2003/2008 server environment.
Aim:
To Installation and Configuration of Mail Server in windows 2003/2008 server environment.
System Requirement:
Procedure:
Setting up Stash to use your SMTP mail server:
Allows Stash to send notifications about events to do with pull requests. See Using pull requests in Stash. Note that if the
Allows Stash to email a link to a newly created user, which the user can use to generate their own password.
To configure a mail server for Stash, go to the administration area and click Mail server (under 'Settings'). See Supported
Hostname The hostname of the mail server (for example "localhost" or "192.168.1.15").
Port The port of the mail server (if unspecified, the port 25 will be used).
Use TLS Check if the SMTP server you are connecting to uses TLS.
Email from Specifies the 'From' header in notification emails (for example: [email protected]).
Searching Mail Server (POP3, SMTP) Next selecting mail server (POP3, SMTP)
Type the email domain name in local Windows account. Next install POP3 simple mail transfer protocol
Appling Selection for POP3. Finish this server is now a mail server.
Result:
Ex. No: 9 Establish RAID (0, 1 and 5) configuration on windows
Date: 2003/2008 server.
Aim:
To Establish RAID (0, 1 and 5) configuration on windows 2003/2008 server.
System Requirement:
Procedure:
4. On the View menu, point to Top, and then click Disk List.
In the right pane, the attributes of each disk in the system are displayed.
5. On the View menu, point to Bottom, and then click Graphical View.
At the bottom of the right pane, a color-coded graphical view of the disks on the system is displayed:
o Disk description panel: The disk description panel (which is gray) is located to the left of the volume description,
which is in color. The disk description contains information about each disk's disk number, whether its configuration
is basic or dynamic, its size, and its online or offline status.
o Volume description panel: The volume description panels are color-coded. They hold information about each
volume, such as the drive letter (if assigned), whether the volume is allocated or unallocated, the partition or volume
size, and the health status of the volume.
Upgrade to dynamic disks
To upgrade a basic disk to a dynamic disk, follow these steps:
1. Before you upgrade disks, quit any programs that are running on those disks.
2. Right-click the gray disk description panel, and then click Upgrade to Dynamic Disk.
3. If the second disk is not a dynamic disk, follow these steps to upgrade it to a dynamic disk.
Mirror the boot and system volume
In this scenario, disk 1 is the disk on which the image of disk 0 will be mirrored.
Note Partitions are referred to as volumes when the disks are dynamic.
1. Disk 1 must be unallocated space before you can proceed with mirroring.
2. Right-click disk 0 (which contains the boot and system files), and then click Add Mirror.
3. A dialog box opens in which any disk on your system that is available for mirroring is displayed. Select the disk of your
choice (in this example, it is disk 1), and then click Add Mirror.
Both disk 0 and disk 1 will now have the same color code, the same drive letter, and the volumes will have the status note
"Regenerating" displayed while the information is being copied from the first disk to the second disk. The system will
automatically size the volume of the new mirror to the same size as that of the original boot and system volume.
4. If you now want to boot from the new mirrored disk, you have to change the Boot.ini ARC path that points the computer
to the partition in which the system files are located.
Troubleshooting
How to Make Sure That Disks Are Set Up to Support RAID-5
Disks: You must have a minimum of three disks to support striping.
Type: Any disks involved in striping must be dynamic. Conversion from basic to dynamic goes very quickly without data
loss. After you complete this procedure, you must restart the computer.
Capacity: The RAID-5 volume can take the whole disk or as little as 20 megabytes (MB) for each disk.
Unallocated space: Any disks that you want to upgrade to a dynamic disk must contain at least 1 MB of free space at the
end of the disk for the upgrade to succeed. Disk Management automatically reserves this free space when it creates
partitions or volumes on a disk, but disks with partitions or volumes that are created by other operating systems might not
have this free space available.
Status: The status of all disks involved in a stripe volume must be online when you create the striped volume.
Device Type: You can install striping on any dynamic disk even if there are mixed drive architectures on the computer. For
example, IDE, EIDE, and SCSI drives can all be used in one stripe volume.
To upgrade a basic disk to a dynamic disk:
1. Before you upgrade disks, quit any programs that are running on those disks.
2. Right-click the gray Disk Description pane that is located to the left of the color-coded volume panes, and then
clickUpgrade to Dynamic Disk.
3. If the second disk in not a dynamic disk, follow the steps earlier in this article to upgrade it to a dynamic disk.
How to Convert to RAID-5
In the Disk Management tool, right-click the unallocated space on one of the dynamic disks where you want to create the RAID-5
volume, and then click Create Volume.
1. After the Create Volume Wizard starts, click Next.
2. Click RAID-5 volume, and then click Next.
3. Click the disks in the left pane under All Available Dynamic Disks, and then click the Add tab.
The disks that are displayed in the right pane are labeled Selected.
4. Look at the bottom of the Select Disk dialog box under the Size label.
The For All Selected Disks box displays the maximum size of the RAID-5 volume that you can make.
Click Next. At this time, you may want to assign a drive letter (you can also do this at any other time). To do so, clickAssign
Drive Letter, and then enter an available drive letter.
Alternatively, you can click Do not assign drive letter or path. You can also click Mount this volume on an empty folder that
supports drive paths. However, this selection is beyond the scope of this article.
5. Click Next.
6. Click Format this partition with the following settings, and then follow these steps:
Type the file system type; FAT32 or NTFS is acceptable.
Leave the default selection in the Allocation Unit Size box.
In the Volume Label box, you can keep the default "New Volume" label or you can type your own label.
At this time, you can click to select the Quick Format check box and the File and Folder Compression check box.
You can also defer both of these tasks if you like.
Click Next, check your selection in the Summary window, and then click Finish.
Result:
Ex. No: 10 Configure a router to connect two different networks and
Date: transfer files between them.
Aim:
To Configure a router to connect two different networks and transfer files between them.
System Requirement:
Procedure:
Step 1:
Tap the OPlayerHD Lite icon on your iPad®’s Home screen to open the application.
Step 2:
Tap the WiFi Transfer icon at the bottom part of your screen.
Step 3:
Take note of the information displayed on the WiFi Transfer window since you will use this to access the iPad® using your
computer to transfer and upload files.
NOTE: The address will be automatically assigned by the application.
QUICK TIP: Ensure that the WiFi Transfer window stays open when accessing the iPad® and copying or transferring files.
Otherwise, there is a possibility that the connection will be lost.
Step 4:
On your computer, open up a browser such as Safari, Mozilla Firefox, Internet Explorer or Chrome and enter the IP address
displayed on the WiFi Transfer screen then press[Enter] on your keyboard. Safari is used here as an example.
Step 5:
Drag and drop your desired files to the field provided.
Step 6:
Wait until your file is successfully transferred and copied from the computer to your iPad®.
NOTE: The file will be listed on the computer screen once done.
QUICK TIP: Aside from dragging and dropping, you can also use the button to transfer and
copy files. To do this, follow the steps below:
Step 1:
Click the Upload File button then select your desired file.
Step 2:
Wait until your file is successfully transferred and copied from the computer to your iPad®.
NOTE: The file will be listed on the computer screen once the file transfer is done.
Step 2:
Tap the Folder icon on the upper left corner of your screen.
Step 3:
Tap My Documents and you will see all the files transferred and copied from your computer.
Step 4:
Tap the desired file to stream/play it to your iPad®.
You can now stream/play files from your computer using the iPad®.
Extending your wireless network
Streaming and transferring files require fast and reliable connection. Sometimes, it is necessary to extend the wireless network to
reach the places outside your router’s range. TheLinksys RE1000 Wireless-N Range Extender lets you repeat the wireless signal of
any access point or router to provide Internet connectivity to hard to reach areas through a wired or wireless connection. To know
more about this product, click here.
Result:
PART – B LINUX SERVER EXPERIMENTS
Ex. No: 1(a)
Installation of Red Hat Linux using Graphical mode.
Date:
Aim:
To Install Red Hat Linux using Graphical mode.
System Requirement:
Procedure:
Step 1 – Insert the Red Hat Linux DVD into the DVD-drive of your computer. As soon as the following screen pops up, press ‘Enter’
to install Red Hat Enterprise Linux (RHEL) through GUI mode.
Step 2- RHEL installer would then prompt you conduct a check as to whether the CD media from which you’re installing is
functioning correctly or not. Choose ‘Skip’, press enter and the installation would begin.
Step 3- Next, we need to select the language- English or any other language as per your preference, and then press ‘Next’.
Step 4- In this step, the RHEL installer would ask you about the appropriate type of keyboard for the system. We take the ‘US
English’ keyboard, you can pick any other option depending on the type of your keyboard. Then press ‘Next’ to move to the next
step.
Step 5- Next, the installer would ask for an ‘installation number’ if you wish to install full set of Red Hat functionalities. Enter the
installation number and press ‘OK’ if you have an officially licensed installation number(for corporate clients that buy Red Hat’s
backup support and full features).
Step 6- The Red Hat installer would then require you to create partitions in your computer’s hard disk for the installation. You can
do it in four ways but the simplest way is to select ‘Use free space on selected drives and create default layout’ as this option will
not affect any other OS residing in your system.
Check the ‘review and modify portioning layout’ to create partitions and click next.
Step 7- In this step you must create the required system partitions and mount points such as ‘/boot’, ‘/home’, ‘swap’ etc which are
required for the Linux’s proper functioning.
To create different partitions such as /home, /var etc, click on ‘New’ to create the partitions.
Then, select /home in the mount point and choose ‘ext3’ as the file system and give the desired size for it and then click ‘OK’.
Similarly also create /boot and /var.
Also, create a swap partition by clicking on ‘New’ and then choosing the filesystem as ‘swap’ and also give the size of Swap
partition.(Usually size of swap partition SHOULD BE twice the size of RAM available to the system but you can keep its size less than
that too)
Once you have made all the desired partitions and given their mount points,
click ‘Next’ to continue installation.
Step 8- This step pertains to the default OS that will be loaded by the GRUB loader
(Note- If you have multiple Operating Systems installed, you would see multiple options here and you have to check in front of the
OS name that you want to be loaded by default when the system is started.)
Click ‘Next’ to continue.
Step 9- This step pertains to the network settings of the Linux system that you are going to install. You can select the Ethernet
devices through which the system would communicate with other devices in the network.
You can also provide the hostname, Gateway address and DNS address to the system during this step. (However it’s better to adjust
these settings once the system has been fully installed).
Step 10- The next step is to adjust the system clock to your particular time zone. Select your time zone and then click ‘Next’.
Step 11 – This is a very important step that deals with the root(super-user) password for the system . Type the password and
confirm it and then click next.
Step 12 – The RHEL installer would then prompt you about if you wish to install some extra ‘Software Development’ or ‘Web Server’
features. By default, keep it at ‘Customize later’ and press ‘Next’.
Step 13- This next step will initiate the installation of Red Hat Linux, press ‘Next’ to begin the process.
Step 14- Upon the completion of installation you should the following screen. Press Reboot and you’d be ready to use your newly
installed Red Hat Linux OS.
5. Next, adjust the time and date settings, and then click ‘Forward’.
6. The next step is for software updates from Red Hat, at this point you should skip the registration and register at a later time and
then click ‘Forward’.
7. This step is to create a non-admin user for the system. Enter the details and click ‘Forward’.
8. This step is about configuration of your Sound Card, choose a sound device and then click ‘Forward’.
9. Click ‘Forward’ to complete the configurations and start using your Red Hat Linux OS.
(Note- On clicking ‘Finish’ the system would require a reboot if you have made changes to the configurations of Firewall or SE
Linux.)
Your Red Hat Linux OS is now all installed and configured, ready to be used. Good luck using and exploring various features of
Red Hat Linux.
Result:
Ex. No: 2
Installation of Red Hat Linux using command prompt
Date:
Aim:
To write Installation of Red Hat Linux using command prompt
System Requirement:
Procedure:
BACKUP
Command
Description
# find /var/log -name '*.log' | tar cv --files-from=- | bzip2 > find all files with '.log' extention and make an bzip archive
log.tar.bz2 [man]
# find /home/user1 -name '*.txt' | xargs cp -av --target- find and copy all files with '.txt' extention from a directory to
directory=/home/backup/ --parents another [man]
# dd bs=1M if=/dev/hda | gzip | ssh user@ip_addr 'dd make a backup of a local hard disk on remote host via ssh
of=hda.gz' [man]
# dd if=/dev/hda of=/dev/fd0 bs=512 count=1 make a copy of MBR (Master Boot Record) to floppy [man]
# dd if=/dev/fd0 of=/dev/hda bs=512 count=1 restore MBR from backup copy saved to floppy [man]
# dump -0aj -f /tmp/home0.bak /home make a full backup of directory '/home' [man]
# dump -1aj -f /tmp/home0.bak /home make a incremental backup of directory '/home' [man]
# rsync -rogpav -e ssh --delete /home ip_address:/tmp rsync via SSH tunnel [man]
# rsync -az -e ssh --delete ip_addr:/home/public synchronize a local directory with a remote directory via ssh and
/home/local compression [man]
# rsync -az -e ssh --delete /home/local synchronize a remote directory with a local directory via ssh and
ip_addr:/home/public compression [man]
# tar -Puf backup.tar /home/user make a incremental backup of directory '/home/user' [man]
# ( cd /tmp/local/ && tar c . ) | ssh -C user@ip_addr 'cd copy content of a directory on remote directory via ssh [man]
/home/share/ && tar x -p'
# ( tar c /home ) | ssh -C user@ip_addr 'cd /home/backup- copy a local directory on remote directory via ssh [man]
home && tar x -p'
FILE SEARCH
Command Description
# find / -name file1 search file and directory into root filesystem from '/' [man]
# find / -user user1 search files and directories belonging to 'user1' [man]
# find /home/user1 -name \*.bin search files with '. bin' extension within directory '/ home/user1'
[man]
# find /usr/bin -type f -atime +100 search binary files are not used in the last 100 days [man]
# find /usr/bin -type f -mtime -10 search files created or changed within 10 days [man]
# find / -name *.rpm -exec chmod 755 '{}' \; search files with '.rpm' extension and modify permits [man]
# find / -xdev -name \*.rpm search files with '.rpm' extension ignoring removable partitions as
cdrom, pen-drive, etc.… [man]
# locate \*.ps find files with the '.ps' extension - first run 'updatedb' command
[man]
# whereis halt show location of a binary file, source or man [man]
# which halt show full path to a binary / executable [man]
IPTABLES (firewall)
Command Description
# iptables -t filter -L show all chains of filtering table [man]
# iptables -t nat -L show all chains of nat table [man]
# iptables -t filter -F clear all rules from filtering table [man]
# iptables -t nat -F clear all rules from table nat [man]
# iptables -t filter -X delete any chains created by user [man]
# iptables -t filter -A INPUT -p tcp --dport telnet -j ACCEPT allow telnet connections to input [man]
# iptables -t filter -A OUTPUT -p tcp --dport http -j DROP block HTTP connections to output [man]
# iptables -t filter -A FORWARD -p tcp --dport pop3 -j ACCEPT allow POP3 connections to forward chain [man]
# iptables -t filter -A INPUT -j LOG --log-prefix Logging on input chain [man]
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE configure a PAT (Port Address Traslation) on eth0 masking
outbound packets [man]
# iptables -t nat -A PREROUTING -d 192.168.0.1 -p tcp -m tcp redirect packets addressed to a host to another host [man]
--dport 22 -j DNAT --to-destination 10.0.0.2:22
# smbget -Rr smb://ip_addr/share like wget can download files from a host windows via smb [man]
Networking (LAN / Wifi)
Command Description
# dhclient eth0 active interface 'eth0' in dhcp mode [man]
# ifconfig eth0 promisc configure 'eth0' in promiscuous mode to gather packets (sniffing)
[man]
# iwlist scan wifi scanning to display the wireless connections available [man]
# netstat -tup show all active network connections and their PID [man]
# netstat -tupl show all network services listening on the system and their PID
[man]
# route add -net 192.168.0.0 netmask 255.255.0.0 gw configure static route to reach network '192.168.0.0/16' [man]
192.168.1.1
# route del 0/0 gw IP_gateway remove static route [man]
Result:
Ex. No: 3
Creating a user in Linux server and assigning rights
Date:
Aim:
To write Creating a user in Linux server and assigning rights
System Requirement:
Procedure:
Lets get straight to the task. Just follow the following steps to learn about adding or removing user accounts in Linux using a GUI.
Here I will use GNOME desktop environment but similar steps can be taken in other Desktop Environments to do the same.
Result:
Ex. No: 4a
a) Configuring and troubleshooting of /etc/inittab.
Date:
Aim:
To write Configuring and Troubleshooting of /etc/inittab.
System Requirement:
Procedure:
Create /etc/inittab
Now we will create the inittab file for use with our system:
cat > ${CLFS}/etc/inittab<< "EOF"
# /etc/inittab
::sysinit:/etc/rc.d/startup
::shutdown:/etc/rc.d/shutdown
::ctrlaltdel:/sbin/reboot
EOF
Setting Hostname
Part of the job of the bootscripts is setting the system's hostname. This needs to be configured in the /etc/HOSTNAME file.
Create the HOSTNAME file and enter a hostname by running:
echo "[clfs]" > ${CLFS}/etc/HOSTNAME
[lfs] needs to be replaced with the name given to the computer. Do not enter the Fully Qualified Domain Name (FQDN) here. That
information will be put in the /etc/hosts file in the next section.
Customizing the /etc/hosts File
If a network card is to be configured, decide on the IP address, FQDN, and possible aliases for use in the /etc/hosts file. The syntax
is:
<IP address> myhost.example.org aliases
Unless the computer is to be visible to the Internet (i.e., there is a registered domain and a valid block of assigned IP addresses—
most users do not have this), make sure that the IP address is in the private network IP address range. Valid ranges are:
Class Networks
A 10.0.0.0
B 172.16.0.0 through 172.31.0.255
C 192.168.0.0 through 192.168.255.255
A valid IP address could be 192.168.1.1. A valid FQDN for this IP could be www.linuxfromscratch.org (not recommended because
this is a valid registered domain address and could cause domain name server issues).
Even if not using a network card, an FQDN is still required. This is necessary for certain programs to operate correctly.
Create the /etc/hosts file by running:
cat > ${CLFS}/etc/hosts << "EOF"
# Begin /etc/hosts (network card version)
127.0.0.1 localhost
[192.168.1.1] [<HOSTNAME>.example.org] [HOSTNAME]
Ex. No: 4b
b) Configuring and Troubleshooting of /etc/passwd
Date:
Aim:
To write Configuring and Troubleshooting of /etc/passwd
System Requirement:
Procedure:
You can read /etc/passwd file using the while loop and IFS separator as follows:
#!/bin/bash
# seven fields from /etc/passwd stored in $f1,f2...,$f7
#
while IFS=: read -r f1 f2 f3 f4 f5 f6 f7
do
echo "User $f1 use $f7 shell and stores files in $f6 directory."
done < /etc/passwd
3. User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for
other predefined accounts. Further UID 100-999 are reserved by system for administrative and system accounts/groups.
4. Group ID (GID): The primary group ID (stored in /etc/group file)
5. User ID Info: The comment field. It allow you to add extra information about the users such as user's full name, phone
number etc. This field use by finger command.
6. Home directory: The absolute path to the directory the user will be in when they log in. If this directory does not exists
then users directory becomes /
7. Command/shell: The absolute path of a command or shell (/bin/bash). Typically, this is a shell. Please note that it does not
have to be a shell.
Follow and type the commands EXACTLY as they appear in red (including spaces, hyphens, and any other characters in red)
1. Start up in single-user mode by pressing and holding Apple S
2. Type: mount -uw /
3. Press Return
4. Type: ln -s /private/etc/ etc
5. Press Return
6. Type: mv /var /var.delete
7. Press Return
8. Type: ln -s /private/var var
9. Press Return
10. Type: ls -l | grep ">"
note: the character before the grep is a pipe character ("|"), which is usually located
above the Return key.
11. Press Return
Look for these two items in the output on the bottom:
private/etc
private/var
If any of these aren't present, repeat the necessary steps above until they are.
12. Type reboot
13. Press Return
Result:
Ex. No: 5
Configuring and Troubleshooting of /etc/grub.conf
Date:
Aim:
To write Configuring and Troubleshooting of /etc/grub.conf
System Requirement:
Procedure:
The following example shows the structure of a GRUB menu file. The example installation has a Linux boot partition under
/dev/sda5, a root partition under /dev/sda7, and a Windows installation under /dev/sda1.
gfxmenu (hd0,4)/boot/message
color white/blue black/light-gray
default 0
timeout 8
title linux
root (hd0,4)
kernel /boot/vmlinuz root=/dev/sda7 vga=791 resume=/dev/sda9
initrd /boot/initrd
title windows
rootnoverify (hd0,4)
chainloader(hd0,0)+1
Our discussion on Linux troubleshooting will continue in this post. Today we’ll see what to do if our grub.conf file is deleted.
I spent hours to learn to overcome this problem and now I will tell you the solution so that you need not spend hours like I did.
So don’t be a chicken-hearted fellow and delete your /boot/grub/grub.conf file and let the action begin.
Once you have deleted the grub.conf you’ll get grub prompt upon next boot.Now the problem is how to boot into our
machine.
To do so you need to issue following commands on your grub menu:
kernel /vmlinuz-2.6.18-128.el5
initrd /initrd-2.6.18-128.el5.img
boot
I know that it’s not possible to remember the full name of kernel and initrd image.
The value shown here is for my system and it may vary on your system. Don’t worry as you can use tab to complete the
name.For kernel press tab after /v and it will auto-complete the name and for initrd you can press tab after typing /i.
After this the normal booting process starts but the problem is that you’ll have to do this every time you boot
because there is no grub.conf file present in your system at this point of time.So it’s time to create it
manually by using vim /boot/grub/grub.conf command and write down-
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5
initrd /initrd-2.6.18-128.el5.img
Now save this file and reboot and now you can access your machine normally. Congrats as we have successfully recovered from
missing grub.conf problem.
This section describes how to safely and correctly change your /etc/grub.conf file to use the virtualization kernel. You must use
the xen kernel to use the Xen hypervisor. Copy your existing xen kernel entry make sure you copy all of the important lines or your
system will panic upon boot (initrd will have a length of '0'). If you require xen hypervisor specific values you must append them to
the xen line of your grub entry.
The output below is an example of a grub.conf entry from a system running the kernel-xen package. The grub.conf on your system
may vary. The important part in the example below is the section from the title line to the next new line.
#boot=/dev/sda
default=0
timeout=15
#splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=10 serial console
Result:
Ex. No: 6
Linux TCP/IP Network Configuration
Date:
Aim:
To write Linux TCP/IP Network Configuration. TCP/IP stands for Transmission Control Protocol/Internet Protocol.
System Requirement:
Procedure:
Options:
File: /etc/network/interfaces
Static IP example:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 208.88.34.106
netmask 255.255.255.248
broadcast 208.88.34.111
network 208.88.34.104
gateway 208.88.34.110
Result:
Ex. No: 7
Installation of additional software using RPM
Date:
Aim:
To write Installation of additional software using RPM (Red Hat Package Manager)
System Requirement:
Procedure:
What is td-agent?
Fluentd is written in Ruby for flexibility, with performance sensitive parts written in C. However, casual users may have difficulty
installing and operating a Ruby daemon.
That’s why Treasure Data, Inc is providing the stable distribution of Fluentd, called td-agent. The differences between Fluentd and
td-agent can be found here.
Download your desired RPM package. There are many RPM depositories on the Internet, but if you're looking for Red Hat
RPM packages, you can find them here:
o The Red Hat Enterprise Linux installation media, which contain many installable RPMs.
o The initial RPM repositories provided with the YUM package manager.
o The Extra Packages for Enterprise Linux (EPEL) provides high-quality add-on packages for Red Hat Enterprise
LInux.
Install the RPM package. Once downloaded, you have two options:
o Double-click the package. A package management window will appear with instructions to guide you through the
process.
o Open a terminal window, and type rpm -i *package_location_and_name* (without the spaces in and )
EditMethod 2 of 3: Removal
1.
Open a terminal window, and type: rpm -e *package name*. Do not type the extension on the file. For example: rpm -e
gedit
EditMethod 3 of 3: rpm codes
1.
2.
3.
Result:
Ex. No: 8
Sharing of Data Using Samba Server.
Date:
Aim:
To write Installation of additional software using RPM (Red Hat Package Manager)
System Requirement:
Procedure:
What is Samba?
As the front page at samba.org says, "Samba is an Open Source/Free Software suite that provides seamless file and print
services to SMB/CIFS clients." Samba is freely available, unlike other SMB/CIFS implementations, and allows for interoperability
between Linux/Unix servers and Windows-based clients.
Adding a Share
To add a share, click the Add button. The Basic tab configures the following options:
Directory — the directory to share via Samba. The directory must exist.
Descriptions — A brief description of the share.
Basic Permissions — whether users should only be able to read the files in the shared directory or whether they should be
able to read and write to the shared directory.
On the Access tab, select whether to allow only specified users to access the share or whether to allow all Samba users to access
the share. If you select to allow access to specific users, select the users from the list of available Samba users.
The share is added immediately after clicking OK.
Double-click one of the workgroup icons to view a list of computers within the workgroup.
As you can see from Figure 24-7, there is an icon for each machine within the workgroup. Double-click on an icon to view the
Samba shares on the machine. If a username and password combination is required, you are prompted for them.
Alternately, you can also specify the Samba server and sharename in the Location: bar for Nautilus using the following syntax
Result:
Ex. No: 9
File Data Backup Using Tar
Date:
Aim:
To write File Data Backup using tar
System Requirement:
Procedure:
In these examples, I will use the following file structure: a top level directory called DIR1 containing the files picture.jpg,
document.doc and database.db.
DIR1/
DIR1/picture.jpg
DIR1/document.doc
DIR1/database.db
It's a good idea to do a full backup of the hard-drive after the initial installation as well as when you finally get your
server set up the way you want. Having a snapshot of your system right after the initial installation gives you something to revert
back to should you want to reconfigure your server without starting from scratch. Linux has many backup utilities but the old
standard is still the favorite of admins because of the flexibility offered by its myriad of options.
Then use the nano editor to create our shell script file with the command:
nano fullserver.sh
and enter the following command into it (and don't miss that period at the end of the command):
tar -cvpf /backups/fullbackup.tar --directory=/ --exclude=proc
--exclude=sys --exclude=dev/pts --exclude=backups .
The above command is on multiple lines for readability. Enter everything on the same line when entering the command in the
editor. Once entered, exit the editor (Ctrl-X) saving the file.
In addition to holding your backup file, the /backups directory now holds your script file also. You have to make your script
executable before you can run it. To do that and run it enter the following two commands:
chmod 750 /backups/fullserver.sh
./backups/fullserver.sh
To restore your "tar ball" you need to copy it to the top-most point in the file tree that it backed up. In our case the --directory
option told tar to start backing up from the root of the file system so that's where we would want to copy the tar ball to. Then
simply replace the c option with the x parameter line so:
tar -xvpf /fullbackup.tar
Having a backup file is nice but not of much use if the hard-drive itself fails. If your server is running the wu-ftpd FTP server daemon,
you should FTP the tar ball off of your server so that it is stored on a different system.
Result: