0% found this document useful (0 votes)
81 views103 pages

System Administration Lab Manual

The document is a lab manual for the System Administration Laboratory at K S R Polytechnic College, detailing experiments for Windows Server 2003/2008 and Linux Server. It includes procedures for installation, configuration of various services, and troubleshooting tasks. The manual serves as a practical guide for students in their third year, sixth semester of Computer Engineering.

Uploaded by

Jc.Raaja b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views103 pages

System Administration Lab Manual

The document is a lab manual for the System Administration Laboratory at K S R Polytechnic College, detailing experiments for Windows Server 2003/2008 and Linux Server. It includes procedures for installation, configuration of various services, and troubleshooting tasks. The manual serves as a practical guide for students in their third year, sixth semester of Computer Engineering.

Uploaded by

Jc.Raaja b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 103

K S R POLYTECHNIC COLLEGE

TIRUCHENGODE – 637 215.

DEPARTMENT OF COMPUTER ENGINEERING

25265 - SYSTEM ADMINISTRATION LABORATORY

LAB MANUAL

YEAR: III SEMESTER: VI


K S R POLYTECHNIC COLLEGE
TIRUCHENGODE – 637 215.

RECORD NOTE BOOK

REG NO.

Certified that this is the bonafide record of work done by

Selvan / Selvi ________________________ of the _____________________________

Semester ______________________________________________ Branch during the

Year __________________ in the _________________________ laboratory.

Staff - in - Charge Head of the Department

Submitted for the Practical


Examination on _____________________

Internal Examiner External Examiner


LAB EXERCIES

PART – A WINDOWS 2003/2008 SERVER EXPERIMENTS


Page.
S.No Date Experiment Marks Sign
No

1. Installation of Windows 2003 / 2008 Server.

Installing Hardware, Devices and Drivers using Device manager


2.
and Driver Query
Configure Active Directory Services, create a user and assign
3.
permissions using Logon Script and Group permissions.

4. Automated installation of Windows Server using answer files.

Installing required Windows 2003 server components using


5.
Control panel.

6. Installation and configuration of DHCP server.

Configuring Disks and Volumes using Disk Manger and


7.
Managing disks and volumes from the command prompt.
Installation and Configuration of Mail Server in windows
8.
2003/2008 server environment.
Establish RAID (0, 1 and 5) configuration on windows 2003/2008
9.
server.
Configure a router to connect two different networks and
10.
transfer files between them.
PART - B LINUX SERVER EXPERIMENTS

1. Installation of Red Hat Linux using Graphical mode.

2. Installation of Red Hat Linux using command prompt

3. Creating a user in Linux server and assigning rights

a) Configuring and Troubleshooting of /etc/inittab.


4.
b) Configuring and Troubleshooting of /etc/passwd.

5. Configuring and Troubleshooting of /etc/grub.conf

6. Linux TCP/IP Network Configuration

7. Installation of additional software using RPM

8. Sharing of data using Samba Server.

9. File Data Backup using tar


PART – A WINDOWS 2003/2008 SERVER EXPERIMENTS

Ex. No: 1
Installation of Windows 2003 / 2008 Server
Date:
Aim:
To Install Windows 2003 / 2008 Server.

System Requirement:

Minimum Requirement Recommended Requirement

Minimum CPU speed 133 MHz CPU speed 550 MHz

Minimum RAM 128 MB RAM 256 MB

Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs

OS disk space requirements 1.5 GB


disk space requirements 20 GB Free space
Free space

Procedure:
First insert Windows Server 2003 CD.
Press any key to boot form CD. Is Displayed, We Press any Key to Boot From CD

Set up will load minimum drives from CD.

 Press enter key (↵) to run Setup.


 Press R to Repair
 Press F3 to Quit
Windows licensing agreement is Displayed, We Agree to Press F8

Disk Partition is displayed,


Delete the existing partition & create a new partition.

Format the partition.


NTFS (New Technology File System)
FAT (File Allocation Table)
Separate the head disk space

Set up will format the partition to install windows.

Now Setup Will copying required files for installation.

After copying required files the system will restart automatically.


At this point of time your Screen might flicker your keyboard & mouse may not work for some movement.

It will ask for regional settings don’t worry leave default click on Next.
Give the name & Organizing click on Next.

Enter the product key which you will be provided by Microsoft.

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.

Set the Date & Time Zone & 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.

Give an IP address of your network click on ok.

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.

White for a while the setup will complete.


After completing the system will restart.

This is how the server installation is desktop systems of workstations systems.

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:

Minimum Requirement Recommended Requirement


Minimum CPU speed 133 MHz Recommended minimum CPU speed 550 MHz
Minimum RAM 128 MB Recommended minimum RAM 256 MB
Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs
OS disk space requirements 1.5 GB
disk space requirements 20 GB Free space
Free space

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.

 Interrupt request (IRQ) line numbers


 Direct memory access (DMA) channels
 Input/output (I/O) port addresses
 Memory address ranges

How to Configure a Device in Device Manager


To configure a device in Device Manager, follow these steps.
Log on to your computer as an administrator or as a member of the Administrators group.

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.

6. Click to clear the Use automatic settings check box.


Note The Use automatic settings check box is unavailable and appears dimmed, both on devices
for which there are no other settings to configure and on devices that are controlled by Plug and
Play resources and which do not require user modification.

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.

2. Under System Tools in the console tree, click Device Manager.


3.
The devices that are installed on your computer are listed in the right pane.
4. Double-click the type of device that you want to test -- for example, Sound, video and game
controllers.

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:

Minimum Requirement Recommended Requirement


Minimum CPU speed 133 MHz Recommended minimum CPU speed 550 MHz
Minimum RAM 128 MB Recommended minimum RAM 256 MB
Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs
OS disk space requirements 1.5 GB
disk space requirements 20 GB Free space
Free space

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.

I will be using the following:


Hostname=DC-LAB
IP address=172.16.7.200
Subnet Mask=255.255.0.0
Domain name=LAB.COM
Partition: NTFS ( 8 GB )
The Virtual machine used has been installed as of date when this article was written with a default install of Windows 2003 R2
SP2 + all MS critical updates.
Step 1: Start Windows :)
Step 2: Logon to Windows :)

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.

So Plan! Plan! Plan! If unsure take some professional advice.

Step 4: Running DCPROMO.EXE


This can be done in two ways.

a. Either run Manage Your Server Wizard


b. Run dcpromo.exe from the run menu. ( we will use this option.)

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.

Step 5: The DCPROMO Wizard.

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".

5. Select "Domain in a new Forest"

6. Select "Install and configure DNS server on this computer"


Note: This will prompt you later on in the wizard to copy some files for DNS so keep your Windows 2003 media in hand.
7. Enter your Active Directory domain name here click next.

8. Accept the domain NETBIOS name.


(NetBIOS names provides for down-level compatibility.)

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.

11. 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.

18. Click restart now.

Result:
Ex. No: 4 Automated installation of Windows Server
Date: using answer files.

Aim:
To install Windows Server using answer files.

System Requirement:

Minimum Requirement Recommended Requirement


Minimum CPU speed 133 MHz Recommended minimum CPU speed 550 MHz
Minimum RAM 128 MB Recommended minimum RAM 256 MB
Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs
OS disk space requirements 1.5 GB
disk space requirements 20 GB Free space
Free space

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

 Microsoft Windows Server 2003, Standard Edition (32-bit x86)


 Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
 Microsoft Windows Server 2003, Enterprise x64 Edition
 Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 Microsoft Windows Server 2003, 64-Bit Datacenter Edition
 Microsoft Windows Server 2003, Web Edition
 Microsoft Windows Small Business Server 2003 Standard Edition
 Microsoft Windows Small Business Server 2003 Premium Edition

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:

Minimum Requirement Recommended Requirement


Minimum CPU speed 133 MHz Recommended minimum CPU speed 550 MHz
Minimum RAM 128 MB Recommended minimum RAM 256 MB
Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs
OS disk space requirements 1.5 GB
disk space requirements 20 GB Free space
Free space

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.

3. Select Add/Remove Windows Components from the left pane.


4. Double-click Application Server in the Windows Components Wizard.

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.

6. Double-click Internet Information Services (IIS) and select the following:


 Common Files
 Internet Information Service Manager
 World Wide Web Services
7. Then double-click World Wide Web Services and select World Wide Web Service.

8. Click OK in both dialog boxes to return to the Windows Components Wizard.


9. Double-click Message Queuing and select Common.

10. Click OK to return to the Windows Components Wizard.


11. In the Windows Components Wizard, click OK to continue.
12. Ensure that a check mark is displayed next to the Application Server component. Click Next to continue.
13. The components will start to install. Shortly after installation begins, a message is displayed prompting you to
insert the disk labeledWindows Server 2003. Insert the disk and click OK.
Note: The display of CD/DVD prompts depends on whether automatically running CD/DVDs is enabled on the system.

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:

Minimum Requirement Recommended Requirement


Minimum CPU speed 133 MHz Recommended minimum CPU speed 550 MHz
Minimum RAM 128 MB Recommended minimum RAM 256 MB
Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs
OS disk space requirements 1.5 GB
disk space requirements 20 GB Free space
Free space

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.

Installing DHCP Server is very easy in win server 2003


First you need to go to Start–>All Programs–>Administrative Tools–>Manage Your Server
Here you need to select Add or remove a role

Verify the following steps click on Next

Select Server Role as DHCP Server option click on Next


Summary selection click on Next

Installing DHCP Server in progress

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

Configuring DHCP - Now you need to go to Start—>Administrative Tools—>DHCP

Right Click on your server click on Authorize your DHCP Server

Authorization completed now your DHCP server is up and running

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:

Minimum Requirement Recommended Requirement


Minimum CPU speed 133 MHz Recommended minimum CPU speed 550 MHz
Minimum RAM 128 MB Recommended minimum RAM 256 MB
Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs
OS disk space requirements 1.5 GB
disk space requirements 20 GB Free space
Free space

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.

Using Disk Management


To start Disk Management:
1. Log on as an administrator or as a member of the Administrators group.
2. Click Start, and then click Control Panel.
3. Click Performance and Maintenance, click Administrative Tools, and then double-click Computer Management. In the
console tree, click Disk Management.
NOTE: You can also click Start, point to Run, type diskmgmt.msc, and then click OK.
In Disk Management, the computer's disks and volumes are displayed in a graphical view and in a list view. By default, the local
computer's disks are displayed; however, if you have the required permissions, you can perform this process on remote computer.
To customize the view of the disks and the volumes in the upper and the lower panes of the window, click View, point to Topor
to Bottom, and then click the view that you want.

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-8 The New RAID-5 Volume Wizard


3. Select the disks to use for the new volume. The choices available and the selections you need to make depend on the type
of volume you're creating and the number of available unallocated disks. Figure 19-9 shows a RAID-5 volume being
created.
Figure 19-9 Select the disks that will be part of this volume.
4. On the same page, adjust the size of the new volume. By default, the new volume will use the maximum available space
from each of the selected disks. For spanned volumes, this will be the sum of the free space on the selected disks; for
other types of volumes, it will be the number of disks multiplied by the available space on the smallest of the selected
disks. Click Next.
5. Select either a drive letter or a mount point for the new volume, as shown in Figure 19-10, or opt not to assign a drive
letter or path at this time. With Windows Server 2008, you can "mount" a volume on an empty subdirectory, minimizing
the number of drive letters and reducing the complexity of the storage that is displayed to the user. If you want to take
advantage of this feature, click Browse to locate the directory where you will mount the new volume. Click Next. (See the
Real World sidebar "Mounted Volumes" for more about this subject.)

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

How to Extend a Simple or Spanned Volume


1. If you have not already, you will first need to delete the partition or volume that you want to extend into to make it
unallocated space.
2. Open the Control Panel (icons view), and click on the Administrative Tools icon. then close the Control Panel window.
3. Click on Computer Management in Administrative Tools, then close the Administrative Tools window.
4. In the left pane under Storage, click on Disk Management

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:

Minimum Requirement Recommended Requirement


Minimum CPU speed 133 MHz Recommended minimum CPU speed 550 MHz
Minimum RAM 128 MB Recommended minimum RAM 256 MB
Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs
OS disk space requirements 1.5 GB
disk space requirements 20 GB Free space
Free space

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

mail server fails, notifications will be dropped.

 Allows Stash to email a link to a newly created user, which the user can use to generate their own password.

 Allows a user to reset his or her password if they forget it.

To configure a mail server for Stash, go to the administration area and click Mail server (under 'Settings'). See Supported

platforms for the mail clients supported by Stash.

Fill in the form and click Save.

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).

Username The username to use to connect to the mail server.

Password The password to use to connect to the mail server.

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]).

Configuring the Mail Server to Use GMail


If you wish to connect to a Gmail account for email notifications in Stash, refer to the Configuring the Mail Server to Use
GMail guide.
Configuring your mail server:
To configure a mail server, start the Configure Your Server Wizard by doing either of the following:
 From Manage Your Server, click Add or remove a role. By default, Manage Your Server starts automatically when you log
on. To open Manage Your Server, click Start, click Control Panel, double-click Administrative Tools, and then double-
click Manage Your Server.
 To open the Configure Your Server Wizard, click Start, click Control Panel, double-click Administrative Tools, and then
double-click Configure Your Server Wizard.
 On the Server Role page, click Mail server (POP3, SMTP), and then click Next.

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:

Minimum Requirement Recommended Requirement


Minimum CPU speed 133 MHz Recommended minimum CPU speed 550 MHz
Minimum RAM 128 MB Recommended minimum RAM 256 MB
Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs
OS disk space requirements 1.5 GB
disk space requirements 20 GB Free space
Free space

Procedure:

RAID (Redundant Array of Independent Disks) 0,1 and 5:


This step-by-step article describes how to mirror the system and boot partition in Windows Server 2003. This scenario is based on
the assumption that the system and boot files are located on disk 0 and that disk 1 is unallocated space.
Requirements
 At least two hard-disk drives; IDE, small computer system interface (SCSI), or mixed architecture is permissible.
 The second drive must be at least the size of the volume on which the operating system boot and system files reside to
permit mirroring.
 The Windows Server 2003 system and boot files must reside on the same volume to be mirrored.
Note The memory dump file is written only to the boot hard disk. Windows Server 2003 can continue to work with a mirrored
system disk configuration even if one of the disks in the mirror is removed. However, the memory dump file cannot be written to
the remaining system disk in the mirror. You must schedule a system restart for the memory dump file to be written to the
remaining hard disk.
Set up the disk management system
1. Click Start, point to Administrative Tools, and then click Computer Management to open the Computer Management
console.

2. Expand the Storage node.


3. Click Disk Management.

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:

Minimum Requirement Recommended Requirement


Minimum CPU speed 133 MHz Recommended minimum CPU speed 550 MHz
Minimum RAM 128 MB Recommended minimum RAM 256 MB
Maximum RAM supported 4 GB Multiprocessor support Up to 4 CPUs
OS disk space requirements 1.5 GB
disk space requirements 20 GB Free space
Free space

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.

Streaming the transferred or copied files on your iPad®


The files you’ve successfully uploaded using your computer can be automatically accessed on the iPad® through OPlayerHD Lite.
See below for instructions:
Step 1:
Tap the OPlayerHD Lite icon on your iPad®’s Home screen to open the application.

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:

Component Minimum Requirement


Processor 266 MHz processor
512 MB RAM (1 GB recommended when
Memory
hosting many accounts)
Disk Space 10GB hard disk

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.

POST INSTALLATION CONFIGURATIONS


1. Accept the Red Hat License agreement and click ‘Forward.
2. The next step is regarding the configuration of the Firewall. You can Enable or Disable the firewall according to your preferences
and then click ‘Forward’.

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:

Component Minimum Requirement


Processor 266 MHz processor
512 MB RAM (1 GB recommended when
Memory
hosting many accounts)
Disk Space 10GB hard disk

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/sda of=/tmp/file1 backup content of the harddrive to a file [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]

# restore -if /tmp/home0.bak restoring a backup interactively [man]

# rsync -rogpav --delete /home /tmp synchronization between directories [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

Microsoft Windows Networks(Samba)


Command Description
# mount -t smbfs -o mount a windows network share [man]
username=user,password=pass //WinClient/share
/mnt/share
# nbtscan ip_addr netbios name resolution [man]

# nmblookup -A ip_addr netbios name resolution [man]

# smbclient -L ip_addr/hostname show remote shares of a windows host [man]

# 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]

# ethtool eth0 show network statistics of eth0 [man]

# host www.example.com lookup hostname to resolve name to ip address and viceversa


[man]

# hostname show hostname of system [man]

# ifconfig eth0 show configuration of an ethernet network card [man]

# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 configure IP Address [man]

# ifconfig eth0 promisc configure 'eth0' in promiscuous mode to gather packets (sniffing)
[man]

# ifdown eth0 disable an interface 'eth0' [man]

# ifup eth0 activate an interface 'eth0' [man]

# ip link show show link status of all network interfaces [man]

# iwconfig eth1 show wireless networks [man]

# iwlist scan wifi scanning to display the wireless connections available [man]

# mii-tool eth0 show link status of 'eth0' [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]

# netstat -rn show routing table alike "route -n" [man]

# nslookup www.example.com lookup hostname to resolve name to ip address and viceversa


[man]

# route -n show routing table [man]

# route add -net 0/0 gw IP_Gateway configure default gateway [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]

# echo "1" > /proc/sys/net/ipv4/ip_forward activate ip routing [man]

# tcpdump tcp port 80 show all HTTP traffic [man]

# whois www.example.com lookup on Whois database [man]

RPM Packages(Read Hat Package Manager)


Command Description
# rpm -ivh [package.rpm] install a rpm package [man]
# rpm -ivh --nodeeps [package.rpm] install a rpm package ignoring dependencies requests [man]
# rpm -U [package.rpm] upgrade a rpm package without changing configuration files
[man]
# rpm -F [package.rpm] upgrade a rpm package only if it is already installed [man]
# rpm -e [package] remove a rpm package [man]
# rpm -qa show all rpm packages installed on the system [man]
# rpm -qa | grep httpd show all rpm packages with the name "httpd" [man]
# rpm -qi [package] obtain information on a specific package installed [man]
# rpm -qg "System Environment/Daemons" show rpm packages of a group software [man]
# rpm -ql [package] show list of files provided by a rpm package installed [man]
# rpm -qc [package] show list of configuration files provided by a rpm package installed
[man]
# rpm -q [package] --whatrequires show list of dependencies required for a rpm packet [man]
# rpm -q [package] --whatprovides show capability provided by a rpm package [man]
# rpm -q [package] --scripts show scripts started during installation / removal [man]
# rpm -q [package] --changelog show history of revisions of a rpm package [man]
# rpm -qf /etc/httpd/conf/httpd.conf verify which rpm package belongs to a given file [man]
# rpm -qp [package.rpm] -l show list of files provided by a rpm package not yet installed
[man]
# rpm --import /media/cdrom/RPM-GPG-KEY import public-key digital signature [man]
# rpm --checksig [package.rpm] verify the integrity of a rpm package [man]
# rpm -qa gpg-pubkey verify integrity of all rpm packages installed [man]
# rpm -V [package] check file size, permissions, type, owner, group, MD5 checksum
and last modification [man]
# rpm -Va check all rpm packages installed on the system - use with caution
[man]
# rpm -Vp [package.rpm] verify a rpm package not yet installed [man]
# rpm -ivh /usr/src/redhat/RPMS/`arch`/[package.rpm] install a package built from a rpm source [man]
# rpm2cpio [package.rpm] | cpio --extract --make- extract executable file from a rpm package [man]
directories *bin*
# rpmbuild --rebuild [package.src.rpm] build a rpm package from a rpm source [man]

Shutdown, Restart and Logout of a System


Command Description
# init 0 shutdown system(2) [man]
# logout leaving session [man]
# reboot reboot(2) [man]
# shutdown -h now shutdown system(1) [man]
# shutdown -h 16:30 & planned shutdown of the system [man]
# shutdown -c cancel a planned shutdown of the system [man]
# shutdown -r now reboot(1) [man]
# telinit 0 shutdown system(3) [man]

User and Groups


Command Description
# chage -E 2005-12-31 user1 set deadline for user password [man]
# groupadd [group] create a new group [man]
# groupdel [group] delete a group [man]
# groupmod -n moon sun rename a group from moon to sun [man]
# grpck check correct syntax and file format of '/etc/group' and groups
existence [man]
# newgrp - [group] log into a new group to change default group of newly created
files [man]
# passwd change password [man]
# passwd user1 change a user password (only by root) [man]
# pwck check correct syntax and file format of '/etc/passwd' and users
existence [man]
# useradd -c "User Linux" -g admin -d /home/user1 - create a new user "user1" belongs "admin" group [man]
s /bin/bash user1
# useradd user1 create a new user [man]
# userdel -r user1 delete a user ( '-r' eliminates home directory) [man]
# usermod -c "User FTP" -g system -d /ftp/user1 -s change user attributes [man]
/bin/nologin user1

YUM Packages Tool (Yellowdog Updater, Modified )


Command Description
# yum -y install [package] download and install a rpm package [man]
# yum localinstall [package.rpm] That will install an RPM, and try to resolve all the dependencies for
you using your repositories. [man]
# yum -y update update all rpm packages installed on the system [man]
# yum update [package] upgrade a rpm package [man]
# yum remove [package] remove a rpm package [man]
# yum list list all packages installed on the system [man]
# yum search [package] find a package on rpm repository [man]
# yum clean [package] clean up rpm cache erasing downloaded packages [man]
# yum clean headers remove all files headers that the system uses to resolve
dependency [man]
# yum clean all remove from the cache packages and headers files [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:

Component Minimum Requirement


Processor 266 MHz processor
512 MB RAM (1 GB recommended when
Memory
hosting many accounts)
Disk Space 10GB hard disk

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.

Go to Users and groups application to manage users


In order to create a new user, click add user

Fill in the user info and click ok.

As you can see the new user is created


In order to delete a user click delete.

If you want more user management options select properties

Here we add the user to a group "linuxers"

Result:
Ex. No: 4a
a) Configuring and troubleshooting of /etc/inittab.
Date:

Aim:
To write Configuring and Troubleshooting of /etc/inittab.

System Requirement:

Component Minimum Requirement


Processor 266 MHz processor
512 MB RAM (1 GB recommended when
Memory
hosting many accounts)
Disk Space 10GB hard disk

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

tty1::respawn:/sbin/getty 38400 tty1


tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6

# Put a getty on the serial line (for a terminal)


# uncomment this line if your using a serial console
#::respawn:/sbin/getty -L ttyS0 115200 vt100

::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]

# End /etc/hosts (network card version)


EOF
The [192.168.1.1] and [<HOSTNAME>.example.org] values need to be changed for specific users or requirements (if assigned an IP
address by a network/system administrator and the machine will be connected to an existing network).
If a network card is not going to be configured, create the /etc/hosts file by running:
cat > ${CLFS}/etc/hosts << "EOF"
# Begin /etc/hosts (no network card version)

127.0.0.1 [<HOSTNAME>.example.org] [HOSTNAME] localhost

# End /etc/hosts (no network card version)


EOF

Backup and Cleanup


13.1. Remove Unecessary Files
Well we have this system finished, we can make it smaller by removing files that are not necessary for our build. On this page we
remove the bloat from our build.
Now lets create a backup of our build:
install -dv ${CLFS}-final
cp -arv ${CLFS}/* ${CLFS}-final/
Lets remove the files we don't need anymore:
rm -rfv ${CLFS}-final/cross-tools
rm -rfv ${CLFS}-final/usr/src/*
rm -rfv ${CLFS}-final/usr/include
rm -rfv ${CLFS}-final/usr/man
rm -rfv ${CLFS}-final/usr/share/man
Lets remove the static libaries:
FILES="`ls ${CLFS}-final/lib/*.a ${CLFS}-final/usr/lib/*.a`"
for file in $FILES; do
rm -fv $file
done

Rebooting the System


Now that we have said that, lets move on to booting our shiny new CLFS installation for the first time! Reboot the system with:
shutdown -r now
Assuming the boot loader was set up as outlined earlier, CLFS SVN-0.0.1-20061204 will boot automatically.
When the reboot is complete, the CLFS system is ready for use and more software may be added to suit your needs.
Acronyms and Terms
ABI Application Binary Interface ISO International Organization for Standardization
ALFS Automated Linux From Scratch ISP Internet Service Provider
ALSA Advanced Linux Sound Architecture KB Kilobytes
API Application Programming Interface LED Light Emitting Diode
ASCII American Standard Code for Information Interchange LFS Linux From Scratch
ATA Advanced Technology Attachment (see IDE) LSB Linux Standard Base
BIOS Basic Input/Output System MB Megabytes
BLFS Beyond Linux From Scratch MBR Master Boot Record
BSD Berkeley Software Distribution MD5 Message Digest 5
chroot change root NIC Network Interface Card
CLFS Cross-Compiled Linux From Scratch NLS Native Language Support
CMOS Complementary Metal Oxide Semiconductor NNTP Network News Transport Protocol
COS Class Of Service NPTL Native POSIX Threading Library
CPU Central Processing Unit OF Open Firmware
CRC Cyclic Redundancy Check OSS Open Sound System
DHCP Dynamic Host Configuration Protocol PCH Pre-Compiled Headers
DNS Domain Name Service PCRE Perl Compatible Regular Expression
EGA Enhanced Graphics Adapter PID Process Identifier
ELF Executable and Linkable Format PTY pseudo terminal
EOF End of File QA Quality Assurance
EQN equation QOS Quality Of Service
EVMS Enterprise Volume Management System RAM Random Access Memory
ext2 second extended file system RPC Remote Procedure Call
FAQ Frequently Asked Questions RTC Real Time Clock
FHS Filesystem Hierarchy Standard SCO The Santa Cruz Operation
FIFO First-In, First Out SATA Serial ATA
FQDN Fully Qualified Domain Name SGR Select Graphic Rendition
FTP File Transfer Protocol SHA1 Secure-Hash Algorithm 1
GB Gibabytes SMP Symmetric Multi-Processor
GCC GNU Compiler Collection TLDP The Linux Documentation Project
GID Group Identifier TFTP Trivial File Transfer Protocol
GMT Greenwich Mean Time TLS Thread-Local Storage
HTML Hypertext Markup Language UID User Identifier
IDE Integrated Drive Electronics umask user file-creation mask
IEEE Institute of Electrical and Electronic Engineers USB Universal Serial Bus
IO Input/Output UTC Coordinated Universal Time
IP Internet Protocol UUID Universally Unique Identifier
IPC Inter-Process Communication VC Virtual Console
IRC Internet Relay Chat VGA Video Graphics Array

Ex. No: 4b
b) Configuring and Troubleshooting of /etc/passwd
Date:

Aim:
To write Configuring and Troubleshooting of /etc/passwd

System Requirement:

Component Minimum Requirement


Processor 266 MHz processor
512 MB RAM (1 GB recommended when
Memory
hosting many accounts)
Disk Space 10GB hard disk

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

Your password is stored in /etc/shadow file


Your encrpted password is not stored in /etc/passwd file. It is stored in /etc/shadow file. In the good old days there was no great
problem with this general read permission. Everybody could read the encrypted passwords, but the hardware was too slow to crack
a well-chosen password, and moreover, the basic assumption used to be that of a friendly user-community.
Almost, all modern Linux / UNIX line operating systems use some sort of the shadow password suite, where /etc/passwd has
asterisks (*) instead of encrypted passwords, and the encrypted passwords are in /etc/shadow which is readable by the superuser
only.

Understanding fields in /etc/passwd


The /etc/passwd contains one entry per line for each user (or user account) of the system. All fields are separated by a colon (:)
symbol. Total seven fields as follows.
Generally, passwd file entry looks as follows (click to enlarge image):

(Fig.01: /etc/passwd file format - click to enlarge)


1. Username: It is used when user logs in. It should be between 1 and 32 characters in length.
2. Password: An x character indicates that encrypted password is stored in /etc/shadow file.

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:

Component Minimum Requirement


Processor 266 MHz processor
512 MB RAM (1 GB recommended when
Memory
hosting many accounts)
Disk Space 10GB hard disk

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

Read more: http://linuxpoison.blogspot.in/2008/09/etcgrubconf-explained.html#ixzz2lGNkcO1l

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

title Red Hat Enterprise Linux Server (2.6.17-1.2519.4.21.el5xen)


root (hd0,0)
kernel /xen.gz-2.6.17-1.2519.4.21.el5 com1=115200,8n1
module /vmlinuz-2.6.17-1.2519.4.21.el5xen ro root=/dev/VolGroup00/LogVol00
module /initrd-2.6.17-1.2519.4.21.el5xen.img
Note
Your grub.conf could look very different if it has been manually edited before or copied from an example.
Read Chapter 29, Configuring the Xen kernel boot parameters for more information on using virtualization and grub.
To set the amount of memory assigned to your host system at boot time to 256MB you need to append dom0_mem=256M to
the xen line in your grub.conf. A modified version of the grub configuration file in the previous example:
#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

title Red Hat Enterprise Linux Server (2.6.17-1.2519.4.21.el5xen)


root (hd0,0)
kernel /xen.gz-2.6.17-1.2519.4.21.el5 com1=115200,8n1 dom0_mem=256MB
module /vmlinuz-2.6.17-1.2519.4.21.el5xen ro
root=/dev/VolGroup00/LogVol00
module /initrd-2.6.17-1.2519.4.21.el5xen.img

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:

Component Minimum Requirement

Processor 266 MHz processor

512 MB RAM (1 GB recommended when


Memory
hosting many accounts)

Disk Space 10GB hard disk

Procedure:

. TCP/IP ethernet configuration:


 Network configuration:
/usr/sbin/system-config-network (FC-2/3) GUI shown here --->
/usr/bin/redhat-config-network (/usr/bin/neat) (RH 7.2+ FC-1)
 Text console configuration tool:
/usr/sbin/system-config-network-tui (Text User Interface (TUI) for Fedora Core 2/3)
/usr/bin/redhat-config-network-tui (RH 9.0 - FC-1)
 Text console network configuration tool.
First interface only - eth0: /usr/sbin/netconfig
 /usr/bin/netcfg (GUI) (last available with RH 7.1)
Static IP address assignment:
Choose one of the following methods:
 Command Line:

/sbin/ifconfig eth0 192.168.10.12 net mask 255.255.255.0 broadcast 192.168.10.255

Network address by convention would be the lowest: 192.168.10.0

Broadcast address by convention would be the highest: 192.168.10.255

the gateway can be anything, but following convention: 192.168.10.1

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

Dynamic IP (DHCP) example:


auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
 /usr/bin/gnome-nettool (apt-get install gnome-nettool)

 /usr/bin/network-admin (apt-get install gnome-network-admin)

Assign more than one IP address to one ethernet card:


ifconfig eth0 XXX.XXX.XXX.XXX netmask 255.255.255.0 broadcast XXX.XXX.XXX.255
ifconfig eth0:0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255
ifconfig eth0:1 192.168.10.14 netmask 255.255.255.0 broadcast 192.168.10.255
route add -host XXX.XXX.XXX.XXX dev eth0
route add -host 192.168.10.12 dev eth0
route add -host 192.168.10.14 dev eth0
In this example 0 and 1 are aliases in addition to the regular eth0. The result of the ifconfig command:
eth0 Link encap:Ethernet HWaddr 00:10:4C:25:7A:3F
inet addr:XXX.XXX.XXX.XXX Bcast:XXX.XXX.XXX.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14218 errors:0 dropped:0 overruns:0 frame:0
TX packets:1362 errors:0 dropped:0 overruns:0 carrier:0
collisions:1 txqueuelen:100
Interrupt:5 Base address:0xe400
eth0:0 Link encap:Ethernet HWaddr 00:10:4C:25:7A:3F
inet addr:192.168.10.12 Bcast:192.168.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0xe400

eth0:1 Link encap:Ethernet HWaddr 00:10:4C:25:7A:3F


inet addr:192.168.10.14 Bcast:192.168.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0xe400

DHCP Linux Client: get connection info: /sbin/pump -i eth0 --status


(Red Hat Linux 7.1 and older)
Device eth0
IP: 4.XXX.XXX.XXX
Netmask: 255.255.252.0
Broadcast: 4.XXX.XXX.255
Network: 4.XXX.XXX.0
server 131.XXX.XXX.4
Next server 0.0.0.0
Gateway: 4.XXX.XXX.1
Domain: vz.dsl.genuity.net
Nameservers: 4.XXX.XXX.1 4.XXX.XXX.2 4.XXX.XXX.3
Renewal time: Sat Aug 11 08:28:55 2001
Expiration time: Sat Aug 11 11:28:55 2001

Change the host name using GUI tool: /usr/sbin/system-config-network


(Red Hat / Fedora / CentOS)
Hostname entries are made in two places:
Select the "DNS" tab.

Activating and De-Activating your NIC:

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:

Component Minimum Requirement


Processor 266 MHz processor
512 MB RAM (1 GB recommended when
Memory
hosting many accounts)
Disk Space 10GB hard disk

Procedure:

Installing Fluent Using rpm Package


This article explains how to install the td-agent rpm package, the stable Fluentd distribution package maintained by
Treasure Data, Inc.

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.

Step0: Before Installation


Please follow the Preinstallation Guide to configure your OS properly. This will prevent many unnecessary problems.

Step1: Install from rpm Repository


CentOS and RHEL 5.0+ are currently supported.
Executing install-redhat.sh will automatically install td-agent on your machine. This shell script registers a new rpm repository at
/etc/yum.repos.d/td.repo and installs the td-agent rpm package.
$ curl -L http://toolbelt.treasuredata.com/sh/install-redhat.sh | sh
Step2: Launch Daemon
The /etc/init.d/td-agent script is provided to start, stop, or restart the agent.
$ /etc/init.d/td-agent start
Starting td-agent: [ OK ]
$ /etc/init.d/td-agent status
td-agent (pid 21678) is running...
The following commands are supported:
$ /etc/init.d/td-agent start
$ /etc/init.d/td-agent stop
$ /etc/init.d/td-agent restart
$ /etc/init.d/td-agent status
Please make sure your configuration file is located at /etc/td-agent/td-agent.conf.
Step3: Post Sample Logs via HTTP
By default, /etc/td-agent/td-agent.conf is configured to take logs from HTTP and route them to stdout (/var/log/td-agent/td-
agent.log). You can post sample log records using the curl command.
$ curl -X POST -d 'json={"json":"message"}' http://localhost:8888/debug.test

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.

The rpm -i command syntax is listed below.

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:

Component Minimum Requirement


Processor 266 MHz processor
512 MB RAM (1 GB recommended when
Memory
hosting many accounts)
Disk Space 10GB hard disk

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.

24.3. Connecting to a Samba Share


You can use Nautilus to view available Samba shares on your network. Select Main Menu Button (on the Panel) => Network
Servers to view a list of Samba workgroups on your network. You can also type smb: in the Location: bar of Nautilus to view the
workgroups.
As shown in Figure 24-6, an icon appears for each available SMB workgroup on the network.

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

(replace <servername> and <sharename> with the appropriate values):


smb://<servername>/<sharename>/

Result:
Ex. No: 9
File Data Backup Using Tar
Date:

Aim:
To write File Data Backup using tar

System Requirement:

Component Minimum Requirement


Processor 266 MHz processor
512 MB RAM (1 GB recommended when
Memory
hosting many accounts)
Disk Space 10GB hard disk

Procedure:

Im new to linux backup.


Im thinking of full system backup of my linux server using tar. I came up with the following code:
tar -zcvpf /archive/fullbackup.tar.gz
--exclude=/archive
--exclude=/mnt
--exclude=/proc
--exclude=/lost+found
--exclude=/dev
--exclude=/sys
--exclude=/tmp
/
and if in need of any hardware problem, restore it with
cd /
tar -zxpvf fullbackup.tar.gz

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.

The c option creates the backup file.


The v option gives a more verbose output while the command is running. This option can also be safely eliminated.
The p option preserves the file and directory permissions.
The f option needs to go last because it allows you to specify the name and location of the backup file which follows next in the
command (in our case this is the /backups/fullbackup.tar 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:

You might also like