Tuesday, July 29, 2008

mysql

Mysql

These are the rpms need to install mysql

[root@localhost ~]# rpm -qa |grep -i mysql
mysql-5.0.45-4.fc8
php-mysql-5.2.4-3
mysql-libs-5.0.45-4.fc8
mysql-server-5.0.45-4.fc8
perl-DBD-MySQL-4.005-2.fc8.1

There are 2 default account in mysql

1: root -- permits full access to mysql database
2: anonymous -- permits only access to test database


Note: 1: all the commnad in mysql ends with semicolon(;)
2: In its default state connection can only be made from localhost
3: Mysql security is not contigent upon OS security


Some important commands

1: mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.05 sec)

2: mysql> select user();
+----------------+
| user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)

3: mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-07-29 13:21:28 |
+---------------------+
1 row in set (0.00 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| proc |
| procs_priv |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
17 rows in set (0.00 sec)

2 ways to set root password

1: mysqladmin -u root password 'r00t'
2: set password for 'root'@'localhost'=password('abc123')


Removing anonymous user

mysql> delete from user where user=' ';

mysql> flush privileges; (To re-read the grant tables)
Query OK, 0 rows affected (0.00 sec)

Grant Table

There are3 main grant table

1:mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| | db |
| host |
| user |
+---------------------------+


mysql> desc user;
+-----------------------+-----------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+-----------------------------------+------+-----+---------+-------+
| Host | char(60) | NO | PRI | | |
| User | char(16) | NO | PRI | | |
| Password | char(41) | NO | | | |
| Select_priv | enum('N','Y') | NO | | N | |
| Insert_priv | enum('N','Y') | NO | | N | |
| Update_priv | enum('N','Y') | NO | | N | |
| Delete_priv | enum('N','Y') | NO | | N | |
| Create_priv | enum('N','Y') | NO | | N | |
| Drop_priv | enum('N','Y') | NO | | N | |
| Reload_priv | enum('N','Y') | NO | | N | |
| Shutdown_priv | enum('N','Y') | NO | | N | |
| Process_priv | enum('N','Y') | NO | | N | |
| File_priv | enum('N','Y') | NO | | N | |
| Grant_priv | enum('N','Y') | NO | | N | |
| References_priv | enum('N','Y') | NO | | N | |
| Index_priv | enum('N','Y') | NO | | N | |
| Alter_priv | enum('N','Y') | NO | | N | |
| Show_db_priv | enum('N','Y') | NO | | N | |
| Super_priv | enum('N','Y') | NO | | N | |
| Create_tmp_table_priv | enum('N','Y') | NO | | N | |
| Lock_tables_priv | enum('N','Y') | NO | | N | |
| Execute_priv | enum('N','Y') | NO | | N | |
| Repl_slave_priv | enum('N','Y') | NO | | N | |
| Repl_client_priv | enum('N','Y') | NO | | N | |
| Create_view_priv | enum('N','Y') | NO | | N | |
| Show_view_priv | enum('N','Y') | NO | | N | |
| Create_routine_priv | enum('N','Y') | NO | | N | |
| Alter_routine_priv | enum('N','Y') | NO | | N | |
| Create_user_priv | enum('N','Y') | NO | | N | |
| ssl_type | enum('','ANY','X509','SPECIFIED') | NO | | | |
| ssl_cipher | blob | NO | | | |
| x509_issuer | blob | NO | | | |
| x509_subject | blob | NO | | | |
| max_questions | int(11) unsigned | NO | | 0 | |
| max_updates | int(11) unsigned | NO | | 0 | |
| max_connections | int(11) unsigned | NO | | 0 | |
| max_user_connections | int(11) unsigned | NO | | 0 | |
+-----------------------+-----------------------------------+------+-----+---------+-------+
37 rows in set (0.01 sec)


mysql> select user,host,password from user;
+----------+-----------------------+------------------+
| user | host | password |
+----------+-----------------------+------------------+
| root | localhost | 39aa9eb5065367ed |
| root | localhost.localdomain | 4b5698aa4603595b |
| root | 127.0.0.1 | 4b5698aa4603595b |
| prashant | localhost | 4b5698aa4603595b |
| prashant | % | 4b5698aa4603595b |
+----------+-----------------------+------------------+
5 rows in set (0.00 sec)


How to create user in mysql

Step1: mysql> show grants;
+---------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost |
+---------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '39aa9eb5065367ed' WITH GRANT OPTION |
+---------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Step2: mysql> GRANT ALL PRIVILEGES ON *.* TO 'pankaj'@'localhost' IDENTIFIED BY 'panku' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> select user,host from user;
+----------+-----------------------+
| user | host |
+----------+-----------------------+
| prashant | % |
| root | 127.0.0.1 |
| pankaj | localhost |
| prashant | localhost |
| root | localhost |
| root | localhost.localdomain |
+----------+-----------------------+
6 rows in set (0.00 sec)

Labels:

Creating swap partitions

How to create swap partitions

Step1: [root@localhost ~]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000030ad

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 523 4096575 83 Linux
/dev/sda3 524 905 3068415 83 Linux
/dev/sda4 906 1305 3213000 5 Extended
/dev/sda5 906 1032 1020096 83 Linux
/dev/sda6 1033 1096 514048+ 82 Linux swap / Solaris
/dev/sda7 1097 1109 104391 83 Linux
/dev/sda8 1110 1122 104391 83 Linux
[root@localhost ~]#

Step2: [root@localhost ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
First cylinder (1123-1305, default 1123):
Using default value 1123
Last cylinder or +size or +sizeM or +sizeK (1123-1305, default 1305): +100M

Step3: Command (m for help): l

0 Empty 1e Hidden W95 FAT1 80 Old Minix be Solaris boot
1 FAT12 24 NEC DOS 81 Minix / old Lin bf Solaris
2 XENIX root 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
5 Extended 41 PPC PReP Boot 85 Linux extended c7 Syrinx
6 FAT16 42 SFS 86 NTFS volume set da Non-FS data
7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set db CP/M / CTOS / .
8 AIX 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f4 SpeedStor
16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT
1c Hidden W95 FAT3 75 PC/IX

Step4: Command (m for help): t
Partition number (1-9): 9
Hex code (type L to list codes): 82 ( Code 82 Linux swap)
Changed system type of partition 9 to 82 (Linux swap / Solaris)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

Step5: [root@localhost ~]# mkswap /dev/sda9 (to create swap file system)
Setting up swapspace version 1, size = 106889 kB
no label, UUID=b6bffd7b-bea9-4236-a7cf-3be7fd241dc9

Step6: To permanently mount the partitions in /etc/fstab

/dev/sda9 swap swap defaults 0 0

Step7: [root@localhost ~]# swapoff -a
[root@localhost ~]# swapon -a
[root@localhost ~]# swapon -s
Filename Type Size Used Priority
/dev/sda6 partition 514040 0 -2
/dev/sda9 partition 104380 0 -3

Note: It read all these entries from
[root@localhost ~]# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda6 partition 514040 0 -2
/dev/sda9 partition 104380 0 -3

Labels:

fstab file

File System Attributes(fstab)

mount,fsck and umount consult this file /etc/fstab

[root@localhost ~]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/var /var ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda6 swap swap defaults 0 0


1st field represent the location of harddisk
2nd field where we need to mount the partition
3rd filed represent filesystem(for eg: ext3)
4th field represent writing permission(defaults(rw))
5th field presnt take a dump(1 represent take dump 1st using dump command
6th field represent file system check sequence (fsck 1 check first)

Labels: ,

Creating a new partitions

File System Tools

How to create new partition using fdisk

Step1: [root@localhost bash]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000030ad

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 523 4096575 83 Linux
/dev/sda3 524 905 3068415 83 Linux
/dev/sda4 906 1305 3213000 5 Extended
/dev/sda5 906 1032 1020096 83 Linux
/dev/sda6 1033 1096 514048+ 82 Linux swap / Solaris
/dev/sda7 1097 1109 104391 83 Linux

Step2: [root@localhost bash]# fdisk /dev/sda

The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):


Step3: Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Step4: Command (m for help): n ( n add a new partition)
First cylinder (1110-1305, default 1110):

Step5: First cylinder (1110-1305, default 1110):
Using default value 1110
Last cylinder or +size or +sizeM or +sizeK (1110-1305, default 1305): +100M (We are adding 100MB partitions)

Step6: Command (m for help): p

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000030ad

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 523 4096575 83 Linux
/dev/sda3 524 905 3068415 83 Linux
/dev/sda4 906 1305 3213000 5 Extended
/dev/sda5 906 1032 1020096 83 Linux
/dev/sda6 1033 1096 514048+ 82 Linux swap / Solaris
/dev/sda7 1097 1109 104391 83 Linux
/dev/sda8 1110 1122 104391 83 Linux (This is the new partitions we have created)

Step7: Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.


Step8: Reboot the system

Step9: Creating the file system

[root@localhost ~]# mke2fs -j /dev/sda8 (If we dont give -j it will create ext2 based file system)
mke2fs 1.40.2 (12-Jul-2007)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
26104 inodes, 104388 blocks
5219 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
13 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


Step10: Temporarily mount the partition
[root@localhost ~]# mount /dev/sda8 /mnt


Step11: If we want permanent mounting or the mounting exist after reboot we need the entry in /etc/fstab

/dev/sda8 /mnt ext3 defaults 0 0

Step12:

[root@localhost ~]# mount
/dev/sda3 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda5 on /var type ext3 (rw)
/dev/sda2 on /usr type ext3 (rw)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sr0 on /media/Fedora 8 i386 DVD type iso9660 (ro,nosuid,nodev,uhelper=hal,uid=0)
/dev/sda7 on /media/disk type ext3 (rw,nosuid,nodev,uhelper=hal)
/dev/sda8 on /mnt type ext3 (rw) After that we see that mounted partitions

Step13: If we create a partitions having filesystem which is ext2 based we can convert it to ext3 by using following command

tune2fs -j /dev/sda8

Labels: , ,

Positional Parameters

A positional parameter is a parameter denoted by one or more digits, other than the single digit 0. Positional parameters are assigned from the shell's arguments when it is invoked

The shell maintains a variable called $# that contains the number of items on the command line in addition to the name of the command

For eg: If i write a simple program
#!/bin/bash
echo $#

and try to execute it

[root@localhost bash]# . test.sh # Since no variable is passed so output is 0
0

[root@localhost bash]# . test.sh 1 # Since 1 variable is passed so output is 1
1

[root@localhost bash]# . test.sh 2 # Since 1 variable is passed so output is 1
1

[root@localhost bash]# . test.sh 3 # Since 1 variable is passed so output is 1(independent of value if i passed 3 here the o/p is same 1)
1

[root@localhost bash]# . test.sh 2 5 #Sincei passed 2 variables(2and5)hence o/p is 2
2



The example script to determine positional parameters

#!/bin/bash
BADPARAM=165 # if no value is passed the output status is 165 (echo $?)
if [ $# != 2 ] # No of variables need to pass to script
then
echo "This script require at least 2 arguments"
echo "You have entered $# arguments"
exit $BADPARAM
fi
seq $1 $2

[root@localhost bash]# . posparam.sh 1 4
1
2
3
4

Labels: , , ,

RPM

Redhat Package Manager(RPM)

RPM Characterstics:

1: Resolve the dependecy control
2: It provide compression
3: Provide metadata for the included application
4: Version Control


If we do which rpm
[root@localhost ~]# which rpm
/bin/rpm


1: [root@localhost ~]# rpm -qf /bin/rpm
rpm-4.4.2.2-3.fc8

f -- is a switch used to query file
q-- is a switch used for query

2: [root@localhost ~]# rpm -qi httpd
Name : httpd Relocations: (not relocatable)
Version : 2.2.6 Vendor: Fedora Project
Release : 3 Build Date: Tue 18 Sep 2007 01:27:59 PM IST
Install Date: Sun 27 Jul 2008 02:08:33 AM IST Build Host: xenbuilder1.fedora.redhat.com
Group : System Environment/Daemons Source RPM: httpd-2.2.6-3.src.rpm
Size : 2551734 License: ASL 2.0
Signature : DSA/SHA1, Thu 25 Oct 2007 08:38:40 AM IST, Key ID b44269d04f2a6fd2
Packager : Fedora Project
URL : http://httpd.apache.org/
Summary : Apache HTTP Server
Description :
The Apache HTTP Server is a powerful, efficient, and extensible
web server.

i-- is used for install,when used with q used to give metadata information about that particular rpm

3: [root@localhost ~]# rpm -qa |grep httpd
httpd-tools-2.2.6-3
httpd-2.2.6-3

a-- all it stored all the information in /var/lib/rpm database

This is the location where the rpm database is stored

[root@localhost ~]# ls -l /var/lib/rpm
total 39932
-rw-r--r-- 1 root root 5300224 2008-07-28 21:57 Basenames
-rw-r--r-- 1 root root 12288 2008-07-28 00:09 Conflictname
-rw-r--r-- 1 root root 24576 2008-07-29 11:29 __db.001
-rw-r--r-- 1 root root 1318912 2008-07-29 11:29 __db.002
-rw-r--r-- 1 root root 450560 2008-07-29 11:29 __db.003
-rw-r--r-- 1 root root 1359872 2008-07-28 21:57 Dirnames
-rw-r--r-- 1 root root 5275648 2008-07-28 21:57 Filemd5s
-rw-r--r-- 1 root root 24576 2008-07-28 21:57 Group
-rw-r--r-- 1 root root 16384 2008-07-28 21:57 Installtid
-rw-r--r-- 1 root root 40960 2008-07-28 21:57 Name
-rw-r--r-- 1 root root 28286976 2008-07-28 21:57 Packages
-rw-r--r-- 1 root root 335872 2008-07-28 21:57 Providename
-rw-r--r-- 1 root root 90112 2008-07-28 21:57 Provideversion
-rw-r--r-- 1 root root 12288 2008-07-27 01:48 Pubkeys
-rw-r--r-- 1 root root 405504 2008-07-28 21:57 Requirename
-rw-r--r-- 1 root root 196608 2008-07-28 21:57 Requireversion
-rw-r--r-- 1 root root 86016 2008-07-28 21:57 Sha1header
-rw-r--r-- 1 root root 45056 2008-07-28 21:57 Sigmd5
-rw-r--r-- 1 root root 12288 2008-07-27 02:25 Triggername

4: [root@localhost bash]# rpm -qpi nfs-utils-1.1.0-6.fc8.i386.rpm
warning: nfs-utils-1.1.0-6.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Name : nfs-utils Relocations: (not relocatable)
Version : 1.1.0 Vendor: Fedora Project
Release : 6.fc8 Build Date: Thu 18 Oct 2007 05:04:20 AM IST
Install Date: (not installed) Build Host: xenbuilder4.fedora.phx.redhat.com
Group : System Environment/Daemons Source RPM: nfs-utils-1.1.0-6.fc8.src.rpm
Size : 517868 License: GPL
Signature : DSA/SHA1, Thu 25 Oct 2007 10:10:15 AM IST, Key ID b44269d04f2a6fd2
Packager : Fedora Project
URL : http://sourceforge.net/projects/nfs
Summary : NFS utilities and supporting clients and daemons for the kernel NFS server
Description :
The nfs-utils package provides a daemon for the kernel NFS server and
related tools, which provides a much higher level of performance than the
traditional Linux NFS server used by most users.

This package also contains the showmount program. Showmount queries the
mount daemon on a remote host for information about the NFS (Network File
System) server on the remote host. For example, showmount can display the
clients which are mounted on that host.

This package also contains the mount.nfs and umount.nfs program.

p-- if we want to query a package that is not already installed then use p

5: [root@localhost bash]# rpm -ql httpd
/etc/httpd
/etc/httpd/conf
/etc/httpd/conf.d
/etc/httpd/conf.d/README
/etc/httpd/conf.d/proxy_ajp.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic
/etc/httpd/logs
/etc/httpd/modules
/etc/httpd/run
/etc/logrotate.d/httpd
/etc/rc.d/init.d/httpd
/etc/sysconfig/httpd
/usr/lib/httpd
/usr/lib/httpd/modules
/usr/lib/httpd/modules/mod_actions.so
/usr/lib/httpd/modules/mod_alias.so
/usr/lib/httpd/modules/mod_asis.so
/usr/lib/httpd/modules/mod_auth_basic.so
/usr/lib/httpd/modules/mod_auth_digest.so
/usr/lib/httpd/modules/mod_authn_alias.so
/usr/lib/httpd/modules/mod_authn_anon.so
/usr/lib/httpd/modules/mod_authn_dbd.so
/usr/lib/httpd/modules/mod_authn_dbm.so
/usr/lib/httpd/modules/mod_authn_default.so
/usr/lib/httpd/modules/mod_authn_file.so
/usr/lib/httpd/modules/mod_authnz_ldap.so
/usr/lib/httpd/modules/mod_authz_dbm.so
/usr/lib/httpd/modules/mod_authz_default.so
/usr/lib/httpd/modules/mod_authz_groupfile.so
/usr/lib/httpd/modules/mod_authz_host.so
/usr/lib/httpd/modules/mod_authz_owner.so
/usr/lib/httpd/modules/mod_authz_user.so
/usr/lib/httpd/modules/mod_autoindex.so
/usr/lib/httpd/modules/mod_cache.so
/usr/lib/httpd/modules/mod_cern_meta.so
/usr/lib/httpd/modules/mod_cgi.so
/usr/lib/httpd/modules/mod_cgid.so
/usr/lib/httpd/modules/mod_dav.so
/usr/lib/httpd/modules/mod_dav_fs.so
/usr/lib/httpd/modules/mod_dbd.so
/usr/lib/httpd/modules/mod_deflate.so
/usr/lib/httpd/modules/mod_dir.so
/usr/lib/httpd/modules/mod_disk_cache.so
/usr/lib/httpd/modules/mod_dumpio.so
/usr/lib/httpd/modules/mod_env.so
/usr/lib/httpd/modules/mod_expires.so
/usr/lib/httpd/modules/mod_ext_filter.so
/usr/lib/httpd/modules/mod_file_cache.so
/usr/lib/httpd/modules/mod_filter.so
/usr/lib/httpd/modules/mod_headers.so
/usr/lib/httpd/modules/mod_ident.so
/usr/lib/httpd/modules/mod_imagemap.so
/usr/lib/httpd/modules/mod_include.so
/usr/lib/httpd/modules/mod_info.so
/usr/lib/httpd/modules/mod_ldap.so
/usr/lib/httpd/modules/mod_log_config.so
/usr/lib/httpd/modules/mod_log_forensic.so
/usr/lib/httpd/modules/mod_logio.so
/usr/lib/httpd/modules/mod_mem_cache.so
/usr/lib/httpd/modules/mod_mime.so
/usr/lib/httpd/modules/mod_mime_magic.so
/usr/lib/httpd/modules/mod_negotiation.so
/usr/lib/httpd/modules/mod_proxy.so
/usr/lib/httpd/modules/mod_proxy_ajp.so
/usr/lib/httpd/modules/mod_proxy_balancer.so
/usr/lib/httpd/modules/mod_proxy_connect.so
/usr/lib/httpd/modules/mod_proxy_ftp.so
/usr/lib/httpd/modules/mod_proxy_http.so
/usr/lib/httpd/modules/mod_rewrite.so
/usr/lib/httpd/modules/mod_setenvif.so
/usr/lib/httpd/modules/mod_speling.so
/usr/lib/httpd/modules/mod_status.so
/usr/lib/httpd/modules/mod_suexec.so
/usr/lib/httpd/modules/mod_unique_id.so
/usr/lib/httpd/modules/mod_userdir.so
/usr/lib/httpd/modules/mod_usertrack.so
/usr/lib/httpd/modules/mod_version.so
/usr/lib/httpd/modules/mod_vhost_alias.so
/usr/sbin/apachectl
/usr/sbin/htcacheclean
/usr/sbin/httpd
/usr/sbin/httpd.worker
/usr/sbin/httxt2dbm
/usr/sbin/rotatelogs
/usr/sbin/suexec
/usr/share/doc/httpd-2.2.6
/usr/share/doc/httpd-2.2.6/ABOUT_APACHE
/usr/share/doc/httpd-2.2.6/CHANGES
/usr/share/doc/httpd-2.2.6/LICENSE
/usr/share/doc/httpd-2.2.6/NOTICE
/usr/share/doc/httpd-2.2.6/README
/usr/share/doc/httpd-2.2.6/VERSIONING
/usr/share/man/man8/apachectl.8.gz
/usr/share/man/man8/htcacheclean.8.gz
/usr/share/man/man8/httpd.8.gz
/usr/share/man/man8/rotatelogs.8.gz
/usr/share/man/man8/suexec.8.gz
/var/cache/mod_proxy
/var/lib/dav
/var/log/httpd
/var/www
/var/www/cgi-bin
/var/www/error
/var/www/error/HTTP_BAD_GATEWAY.html.var
/var/www/error/HTTP_BAD_REQUEST.html.var
/var/www/error/HTTP_FORBIDDEN.html.var
/var/www/error/HTTP_GONE.html.var
/var/www/error/HTTP_INTERNAL_SERVER_ERROR.html.var
/var/www/error/HTTP_LENGTH_REQUIRED.html.var
/var/www/error/HTTP_METHOD_NOT_ALLOWED.html.var
/var/www/error/HTTP_NOT_FOUND.html.var
/var/www/error/HTTP_NOT_IMPLEMENTED.html.var
/var/www/error/HTTP_PRECONDITION_FAILED.html.var
/var/www/error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
/var/www/error/HTTP_REQUEST_TIME_OUT.html.var
/var/www/error/HTTP_REQUEST_URI_TOO_LARGE.html.var
/var/www/error/HTTP_SERVICE_UNAVAILABLE.html.var
/var/www/error/HTTP_UNAUTHORIZED.html.var
/var/www/error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
/var/www/error/HTTP_VARIANT_ALSO_VARIES.html.var
/var/www/error/README
/var/www/error/contact.html.var
/var/www/error/include
/var/www/error/include/bottom.html
/var/www/error/include/spacer.html
/var/www/error/include/top.html
/var/www/error/noindex.html
/var/www/html
/var/www/icons
/var/www/icons/README
/var/www/icons/README.html
/var/www/icons/a.gif
/var/www/icons/a.png
/var/www/icons/alert.black.gif
/var/www/icons/alert.black.png
/var/www/icons/alert.red.gif
/var/www/icons/alert.red.png
/var/www/icons/apache_pb.gif
/var/www/icons/apache_pb.png
/var/www/icons/apache_pb2.gif
/var/www/icons/apache_pb2.png
/var/www/icons/apache_pb2_ani.gif
/var/www/icons/back.gif
/var/www/icons/back.png
/var/www/icons/ball.gray.gif
/var/www/icons/ball.gray.png
/var/www/icons/ball.red.gif
/var/www/icons/ball.red.png
/var/www/icons/binary.gif
/var/www/icons/binary.png
/var/www/icons/binhex.gif
/var/www/icons/binhex.png
/var/www/icons/blank.gif
/var/www/icons/blank.png
/var/www/icons/bomb.gif
/var/www/icons/bomb.png
/var/www/icons/box1.gif
/var/www/icons/box1.png
/var/www/icons/box2.gif
/var/www/icons/box2.png
/var/www/icons/broken.gif
/var/www/icons/broken.png
/var/www/icons/burst.gif
/var/www/icons/burst.png
/var/www/icons/c.gif
/var/www/icons/c.png
/var/www/icons/comp.blue.gif
/var/www/icons/comp.blue.png
/var/www/icons/comp.gray.gif
/var/www/icons/comp.gray.png
/var/www/icons/compressed.gif
/var/www/icons/compressed.png
/var/www/icons/continued.gif
/var/www/icons/continued.png
/var/www/icons/dir.gif
/var/www/icons/dir.png
/var/www/icons/diskimg.gif
/var/www/icons/diskimg.png
/var/www/icons/down.gif
/var/www/icons/down.png
/var/www/icons/dvi.gif
/var/www/icons/dvi.png
/var/www/icons/f.gif
/var/www/icons/f.png
/var/www/icons/folder.gif
/var/www/icons/folder.open.gif
/var/www/icons/folder.open.png
/var/www/icons/folder.png
/var/www/icons/folder.sec.gif
/var/www/icons/folder.sec.png
/var/www/icons/forward.gif
/var/www/icons/forward.png
/var/www/icons/generic.gif
/var/www/icons/generic.png
/var/www/icons/generic.red.gif
/var/www/icons/generic.red.png
/var/www/icons/generic.sec.gif
/var/www/icons/generic.sec.png
/var/www/icons/hand.right.gif
/var/www/icons/hand.right.png
/var/www/icons/hand.up.gif
/var/www/icons/hand.up.png
/var/www/icons/icon.sheet.gif
/var/www/icons/icon.sheet.png
/var/www/icons/image1.gif
/var/www/icons/image1.png
/var/www/icons/image2.gif
/var/www/icons/image2.png
/var/www/icons/image3.gif
/var/www/icons/image3.png
/var/www/icons/index.gif
/var/www/icons/index.png
/var/www/icons/layout.gif
/var/www/icons/layout.png
/var/www/icons/left.gif
/var/www/icons/left.png
/var/www/icons/link.gif
/var/www/icons/link.png
/var/www/icons/movie.gif
/var/www/icons/movie.png
/var/www/icons/p.gif
/var/www/icons/p.png
/var/www/icons/patch.gif
/var/www/icons/patch.png
/var/www/icons/pdf.gif
/var/www/icons/pdf.png
/var/www/icons/pie0.gif
/var/www/icons/pie0.png
/var/www/icons/pie1.gif
/var/www/icons/pie1.png
/var/www/icons/pie2.gif
/var/www/icons/pie2.png
/var/www/icons/pie3.gif
/var/www/icons/pie3.png
/var/www/icons/pie4.gif
/var/www/icons/pie4.png
/var/www/icons/pie5.gif
/var/www/icons/pie5.png
/var/www/icons/pie6.gif
/var/www/icons/pie6.png
/var/www/icons/pie7.gif
/var/www/icons/pie7.png
/var/www/icons/pie8.gif
/var/www/icons/pie8.png
/var/www/icons/portal.gif
/var/www/icons/portal.png
/var/www/icons/poweredby.png
/var/www/icons/ps.gif
/var/www/icons/ps.png
/var/www/icons/quill.gif
/var/www/icons/quill.png
/var/www/icons/right.gif
/var/www/icons/right.png
/var/www/icons/screw1.gif
/var/www/icons/screw1.png
/var/www/icons/screw2.gif
/var/www/icons/screw2.png
/var/www/icons/script.gif
/var/www/icons/script.png
/var/www/icons/small
/var/www/icons/small/back.gif
/var/www/icons/small/back.png
/var/www/icons/small/binary.gif
/var/www/icons/small/binary.png
/var/www/icons/small/binhex.gif
/var/www/icons/small/binhex.png
/var/www/icons/small/blank.gif
/var/www/icons/small/blank.png
/var/www/icons/small/broken.gif
/var/www/icons/small/broken.png
/var/www/icons/small/burst.gif
/var/www/icons/small/burst.png
/var/www/icons/small/comp1.gif
/var/www/icons/small/comp1.png
/var/www/icons/small/comp2.gif
/var/www/icons/small/comp2.png
/var/www/icons/small/compressed.gif
/var/www/icons/small/compressed.png
/var/www/icons/small/continued.gif
/var/www/icons/small/continued.png
/var/www/icons/small/dir.gif
/var/www/icons/small/dir.png
/var/www/icons/small/dir2.gif
/var/www/icons/small/dir2.png
/var/www/icons/small/doc.gif
/var/www/icons/small/doc.png
/var/www/icons/small/forward.gif
/var/www/icons/small/forward.png
/var/www/icons/small/generic.gif
/var/www/icons/small/generic.png
/var/www/icons/small/generic2.gif
/var/www/icons/small/generic2.png
/var/www/icons/small/generic3.gif
/var/www/icons/small/generic3.png
/var/www/icons/small/image.gif
/var/www/icons/small/image.png
/var/www/icons/small/image2.gif
/var/www/icons/small/image2.png
/var/www/icons/small/index.gif
/var/www/icons/small/index.png
/var/www/icons/small/key.gif
/var/www/icons/small/key.png
/var/www/icons/small/movie.gif
/var/www/icons/small/movie.png
/var/www/icons/small/patch.gif
/var/www/icons/small/patch.png
/var/www/icons/small/ps.gif
/var/www/icons/small/ps.png
/var/www/icons/small/rainbow.gif
/var/www/icons/small/rainbow.png
/var/www/icons/small/sound.gif
/var/www/icons/small/sound.png
/var/www/icons/small/sound2.gif
/var/www/icons/small/sound2.png
/var/www/icons/small/tar.gif
/var/www/icons/small/tar.png
/var/www/icons/small/text.gif
/var/www/icons/small/text.png
/var/www/icons/small/transfer.gif
/var/www/icons/small/transfer.png
/var/www/icons/small/unknown.gif
/var/www/icons/small/unknown.png
/var/www/icons/small/uu.gif
/var/www/icons/small/uu.png
/var/www/icons/sound1.gif
/var/www/icons/sound1.png
/var/www/icons/sound2.gif
/var/www/icons/sound2.png
/var/www/icons/sphere1.gif
/var/www/icons/sphere1.png
/var/www/icons/sphere2.gif
/var/www/icons/sphere2.png
/var/www/icons/tar.gif
/var/www/icons/tar.png
/var/www/icons/tex.gif
/var/www/icons/tex.png
/var/www/icons/text.gif
/var/www/icons/text.png
/var/www/icons/transfer.gif
/var/www/icons/transfer.png
/var/www/icons/unknown.gif
/var/www/icons/unknown.png
/var/www/icons/up.gif
/var/www/icons/up.png
/var/www/icons/uu.gif
/var/www/icons/uu.png
/var/www/icons/uuencoded.gif
/var/www/icons/uuencoded.png
/var/www/icons/world1.gif
/var/www/icons/world1.png
/var/www/icons/world2.gif
/var/www/icons/world2.png

l --- to get the list of all the files which is being installed after the installation of package

6: To install any rpm
[root@localhost bash]# rpm -ivh nfs-utils-1.1.0-6.fc8.i386.rpm
warning: nfs-utils-1.1.0-6.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing... ########################################### [100%]
1:nfs-utils ########################################### [100%]

i --- install
v --verbose
h -- hashes

7: to Upgrade any rpm use U instead of i

8: if we append --aid at the end of package it will resolve any dependency if it is there.
if we append --nodeps at the end of package it ignore any dependency

rpm -ivh nfs-utils-1.1.0-6.fc8.i386.rpm --aid
rpm -ivh nfs-utils-1.1.0-6.fc8.i386.rpm --nodeps

9: To remove any rpm
[root@localhost bash]# rpm -e nfs-utils --nodeps
Usage: nfs {start|stop|status|restart|reload|condrestart}
Usage: /etc/rc.d/init.d/rpcidmapd {start|stop|restart|condstart|condrestart|status}
Usage: /etc/rc.d/init.d/nfslock {start|stop|status|restart|probe|condrestart}
warning: /var/lib/nfs/rmtab saved as /var/lib/nfs/rmtab.rpmsave
warning: /etc/sysconfig/nfs saved as /etc/sysconfig/nfs.rpmsave

always remove with --nodeps so that exising dependency file will not be removed

Important Reference

http://rpmfind.net/
http://freshrpms.net/
http://rpm.pbone.net/

Labels:

Linux File System Permission

It is divided into 4 parts

class:owner:group:everyone/other


Maximum Possible Permission bit

read(r) 4
write(w) 2
execute(1) 1

For eg:

[root@localhost ~]# ls -l install.log
-rw-r--r-- 1 root root 37356 2008-07-27 02:26 install.log
-42-4--4--

So this file has a permission 644

Maximum permission to any file 666

Maximum permission to any directory 777

By default if we create any file it has permission 644

By default if we create any directory it has permission 755

This is due umask value

[root@localhost ~]# umask
0022

For file 666 - 022 = 644
For directory 777 - 022 = 755

chmod: Alter the permission of files and directories

[root@localhost ~]# ls -ld abc
drwxr-xr-x 2 root root 4096 2008-07-29 12:01 abc

If we want to change the permission of this directory from default 755 to other we need chmod command

[root@localhost ~]# chmod 777 abc
[root@localhost ~]# ls -ld abc
drwxrwxrwx 2 root root 4096 2008-07-29 12:01 abc
[root@localhost ~]#

If we want this permission applied to all the create file inside this directory

-R, --recursive change files and directories recursively

chown - change file owner and group

[root@localhost ~]# chown prashant:prashant abc
[root@localhost ~]# ls -ld abc
drwxrwxrwx 2 prashant prashant 4096 2008-07-29 12:01 abc

-R, --recursive operate on files and directories recursively

chgrp - change group ownership

[root@localhost ~]# chgrp prashant abc1
[root@localhost ~]# ls -ld abc1
drwxr-xr-x 2 root prashant 4096 2008-07-29 12:09 abc1

SETGID Permission

[root@localhost ~]# mkdir share
[root@localhost ~]# chown root:prashant share/
[root@localhost ~]# ls -ld share
drwxr-xr-x 2 root prashant 4096 2008-07-29 12:14 share
[root@localhost ~]# chmod 2775 share/

Here we are assiging set group ID (2) or we do it like this (chmod g+s share)

[root@localhost ~]# ls -ld share
drwxrwsr-x 2 root prashant 4096 2008-07-29 12:14 share
[root@localhost ~]# ls -ld share
drwxrwsr-x 2 root prashant 4096 2008-07-29 12:14 share
[root@localhost ~]# chmod 777 share/

After doing this if any user try to create any file it has got the group prashant associated with it

[oracle@localhost share]$ ls -l
-rw-r--r-- 1 oracle prashant 0 2008-07-29 12:16 b

Symbolic Link(Soft and Hard Link)

Soft Link

ln [--option] [actual file] [name of symbolic link]

[root@localhost bash]# ln -s file1 symlink1

lrwxrwxrwx 1 root root 5 2008-07-29 12:22 symlink1 -> file1

All the permission bit are turn on in case of symbolic link to drill down the file

Note: We can create multiple symbolic link to the same file.But if the main file is removed then symboli link has no meaning.

[root@localhost bash]# ln -s file1 symlink2

lrwxrwxrwx 1 root root 5 2008-07-29 12:24 symlink2 -> file1

Both the symbolic link created have different inode number

159984 lrwxrwxrwx 1 root root 5 2008-07-29 12:22 symlink1 -> file1
159990 lrwxrwxrwx 1 root root 5 2008-07-29 12:24 symlink2 -> file1

Inode number: File stored in disk have unique number called inode number

Hardlink:

ln [actual file] [hardlink]

[root@localhost bash]# ln file1 hardlink1

159965 -rw-r--r-- 2 root root 0 2008-07-29 12:22 hardlink1
159965 -rw-r--r-- 2 root root 0 2008-07-29 12:22 file1

Both have same inode number

If we delete orignal file hardlink file exist.

Monday, July 28, 2008

Redhat Package Manager(RPM)

RPM Characterstics:

1: Resolve the dependecy control
2: It provide compression
3: Provide metadata for the included application
4: Version Control


If we do which rpm
[root@localhost ~]# which rpm
/bin/rpm


1: [root@localhost ~]# rpm -qf /bin/rpm
rpm-4.4.2.2-3.fc8

f -- is a switch used to query file
q-- is a switch used for query

2: [root@localhost ~]# rpm -qi httpd
Name : httpd Relocations: (not relocatable)
Version : 2.2.6 Vendor: Fedora Project
Release : 3 Build Date: Tue 18 Sep 2007 01:27:59 PM IST
Install Date: Sun 27 Jul 2008 02:08:33 AM IST Build Host: xenbuilder1.fedora.redhat.com
Group : System Environment/Daemons Source RPM: httpd-2.2.6-3.src.rpm
Size : 2551734 License: ASL 2.0
Signature : DSA/SHA1, Thu 25 Oct 2007 08:38:40 AM IST, Key ID b44269d04f2a6fd2
Packager : Fedora Project
URL : http://httpd.apache.org/
Summary : Apache HTTP Server
Description :
The Apache HTTP Server is a powerful, efficient, and extensible
web server.

i-- is used for install,when used with q used to give metadata information about that particular rpm

3: [root@localhost ~]# rpm -qa |grep httpd
httpd-tools-2.2.6-3
httpd-2.2.6-3

a-- all it stored all the information in /var/lib/rpm database

This is the location where the rpm database is stored

[root@localhost ~]# ls -l /var/lib/rpm
total 39932
-rw-r--r-- 1 root root 5300224 2008-07-28 21:57 Basenames
-rw-r--r-- 1 root root 12288 2008-07-28 00:09 Conflictname
-rw-r--r-- 1 root root 24576 2008-07-29 11:29 __db.001
-rw-r--r-- 1 root root 1318912 2008-07-29 11:29 __db.002
-rw-r--r-- 1 root root 450560 2008-07-29 11:29 __db.003
-rw-r--r-- 1 root root 1359872 2008-07-28 21:57 Dirnames
-rw-r--r-- 1 root root 5275648 2008-07-28 21:57 Filemd5s
-rw-r--r-- 1 root root 24576 2008-07-28 21:57 Group
-rw-r--r-- 1 root root 16384 2008-07-28 21:57 Installtid
-rw-r--r-- 1 root root 40960 2008-07-28 21:57 Name
-rw-r--r-- 1 root root 28286976 2008-07-28 21:57 Packages
-rw-r--r-- 1 root root 335872 2008-07-28 21:57 Providename
-rw-r--r-- 1 root root 90112 2008-07-28 21:57 Provideversion
-rw-r--r-- 1 root root 12288 2008-07-27 01:48 Pubkeys
-rw-r--r-- 1 root root 405504 2008-07-28 21:57 Requirename
-rw-r--r-- 1 root root 196608 2008-07-28 21:57 Requireversion
-rw-r--r-- 1 root root 86016 2008-07-28 21:57 Sha1header
-rw-r--r-- 1 root root 45056 2008-07-28 21:57 Sigmd5
-rw-r--r-- 1 root root 12288 2008-07-27 02:25 Triggername

4: [root@localhost bash]# rpm -qpi nfs-utils-1.1.0-6.fc8.i386.rpm
warning: nfs-utils-1.1.0-6.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Name : nfs-utils Relocations: (not relocatable)
Version : 1.1.0 Vendor: Fedora Project
Release : 6.fc8 Build Date: Thu 18 Oct 2007 05:04:20 AM IST
Install Date: (not installed) Build Host: xenbuilder4.fedora.phx.redhat.com
Group : System Environment/Daemons Source RPM: nfs-utils-1.1.0-6.fc8.src.rpm
Size : 517868 License: GPL
Signature : DSA/SHA1, Thu 25 Oct 2007 10:10:15 AM IST, Key ID b44269d04f2a6fd2
Packager : Fedora Project
URL : http://sourceforge.net/projects/nfs
Summary : NFS utilities and supporting clients and daemons for the kernel NFS server
Description :
The nfs-utils package provides a daemon for the kernel NFS server and
related tools, which provides a much higher level of performance than the
traditional Linux NFS server used by most users.

This package also contains the showmount program. Showmount queries the
mount daemon on a remote host for information about the NFS (Network File
System) server on the remote host. For example, showmount can display the
clients which are mounted on that host.

This package also contains the mount.nfs and umount.nfs program.

p-- if we want to query a package that is not already installed then use p

5: [root@localhost bash]# rpm -ql httpd
/etc/httpd
/etc/httpd/conf
/etc/httpd/conf.d
/etc/httpd/conf.d/README
/etc/httpd/conf.d/proxy_ajp.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic
/etc/httpd/logs
/etc/httpd/modules
/etc/httpd/run
/etc/logrotate.d/httpd
/etc/rc.d/init.d/httpd
/etc/sysconfig/httpd
/usr/lib/httpd
/usr/lib/httpd/modules
/usr/lib/httpd/modules/mod_actions.so
/usr/lib/httpd/modules/mod_alias.so
/usr/lib/httpd/modules/mod_asis.so
/usr/lib/httpd/modules/mod_auth_basic.so
/usr/lib/httpd/modules/mod_auth_digest.so
/usr/lib/httpd/modules/mod_authn_alias.so
/usr/lib/httpd/modules/mod_authn_anon.so
/usr/lib/httpd/modules/mod_authn_dbd.so
/usr/lib/httpd/modules/mod_authn_dbm.so
/usr/lib/httpd/modules/mod_authn_default.so
/usr/lib/httpd/modules/mod_authn_file.so
/usr/lib/httpd/modules/mod_authnz_ldap.so
/usr/lib/httpd/modules/mod_authz_dbm.so
/usr/lib/httpd/modules/mod_authz_default.so
/usr/lib/httpd/modules/mod_authz_groupfile.so
/usr/lib/httpd/modules/mod_authz_host.so
/usr/lib/httpd/modules/mod_authz_owner.so
/usr/lib/httpd/modules/mod_authz_user.so
/usr/lib/httpd/modules/mod_autoindex.so
/usr/lib/httpd/modules/mod_cache.so
/usr/lib/httpd/modules/mod_cern_meta.so
/usr/lib/httpd/modules/mod_cgi.so
/usr/lib/httpd/modules/mod_cgid.so
/usr/lib/httpd/modules/mod_dav.so
/usr/lib/httpd/modules/mod_dav_fs.so
/usr/lib/httpd/modules/mod_dbd.so
/usr/lib/httpd/modules/mod_deflate.so
/usr/lib/httpd/modules/mod_dir.so
/usr/lib/httpd/modules/mod_disk_cache.so
/usr/lib/httpd/modules/mod_dumpio.so
/usr/lib/httpd/modules/mod_env.so
/usr/lib/httpd/modules/mod_expires.so
/usr/lib/httpd/modules/mod_ext_filter.so
/usr/lib/httpd/modules/mod_file_cache.so
/usr/lib/httpd/modules/mod_filter.so
/usr/lib/httpd/modules/mod_headers.so
/usr/lib/httpd/modules/mod_ident.so
/usr/lib/httpd/modules/mod_imagemap.so
/usr/lib/httpd/modules/mod_include.so
/usr/lib/httpd/modules/mod_info.so
/usr/lib/httpd/modules/mod_ldap.so
/usr/lib/httpd/modules/mod_log_config.so
/usr/lib/httpd/modules/mod_log_forensic.so
/usr/lib/httpd/modules/mod_logio.so
/usr/lib/httpd/modules/mod_mem_cache.so
/usr/lib/httpd/modules/mod_mime.so
/usr/lib/httpd/modules/mod_mime_magic.so
/usr/lib/httpd/modules/mod_negotiation.so
/usr/lib/httpd/modules/mod_proxy.so
/usr/lib/httpd/modules/mod_proxy_ajp.so
/usr/lib/httpd/modules/mod_proxy_balancer.so
/usr/lib/httpd/modules/mod_proxy_connect.so
/usr/lib/httpd/modules/mod_proxy_ftp.so
/usr/lib/httpd/modules/mod_proxy_http.so
/usr/lib/httpd/modules/mod_rewrite.so
/usr/lib/httpd/modules/mod_setenvif.so
/usr/lib/httpd/modules/mod_speling.so
/usr/lib/httpd/modules/mod_status.so
/usr/lib/httpd/modules/mod_suexec.so
/usr/lib/httpd/modules/mod_unique_id.so
/usr/lib/httpd/modules/mod_userdir.so
/usr/lib/httpd/modules/mod_usertrack.so
/usr/lib/httpd/modules/mod_version.so
/usr/lib/httpd/modules/mod_vhost_alias.so
/usr/sbin/apachectl
/usr/sbin/htcacheclean
/usr/sbin/httpd
/usr/sbin/httpd.worker
/usr/sbin/httxt2dbm
/usr/sbin/rotatelogs
/usr/sbin/suexec
/usr/share/doc/httpd-2.2.6
/usr/share/doc/httpd-2.2.6/ABOUT_APACHE
/usr/share/doc/httpd-2.2.6/CHANGES
/usr/share/doc/httpd-2.2.6/LICENSE
/usr/share/doc/httpd-2.2.6/NOTICE
/usr/share/doc/httpd-2.2.6/README
/usr/share/doc/httpd-2.2.6/VERSIONING
/usr/share/man/man8/apachectl.8.gz
/usr/share/man/man8/htcacheclean.8.gz
/usr/share/man/man8/httpd.8.gz
/usr/share/man/man8/rotatelogs.8.gz
/usr/share/man/man8/suexec.8.gz
/var/cache/mod_proxy
/var/lib/dav
/var/log/httpd
/var/www
/var/www/cgi-bin
/var/www/error
/var/www/error/HTTP_BAD_GATEWAY.html.var
/var/www/error/HTTP_BAD_REQUEST.html.var
/var/www/error/HTTP_FORBIDDEN.html.var
/var/www/error/HTTP_GONE.html.var
/var/www/error/HTTP_INTERNAL_SERVER_ERROR.html.var
/var/www/error/HTTP_LENGTH_REQUIRED.html.var
/var/www/error/HTTP_METHOD_NOT_ALLOWED.html.var
/var/www/error/HTTP_NOT_FOUND.html.var
/var/www/error/HTTP_NOT_IMPLEMENTED.html.var
/var/www/error/HTTP_PRECONDITION_FAILED.html.var
/var/www/error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
/var/www/error/HTTP_REQUEST_TIME_OUT.html.var
/var/www/error/HTTP_REQUEST_URI_TOO_LARGE.html.var
/var/www/error/HTTP_SERVICE_UNAVAILABLE.html.var
/var/www/error/HTTP_UNAUTHORIZED.html.var
/var/www/error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
/var/www/error/HTTP_VARIANT_ALSO_VARIES.html.var
/var/www/error/README
/var/www/error/contact.html.var
/var/www/error/include
/var/www/error/include/bottom.html
/var/www/error/include/spacer.html
/var/www/error/include/top.html
/var/www/error/noindex.html
/var/www/html
/var/www/icons
/var/www/icons/README
/var/www/icons/README.html
/var/www/icons/a.gif
/var/www/icons/a.png
/var/www/icons/alert.black.gif
/var/www/icons/alert.black.png
/var/www/icons/alert.red.gif
/var/www/icons/alert.red.png
/var/www/icons/apache_pb.gif
/var/www/icons/apache_pb.png
/var/www/icons/apache_pb2.gif
/var/www/icons/apache_pb2.png
/var/www/icons/apache_pb2_ani.gif
/var/www/icons/back.gif
/var/www/icons/back.png
/var/www/icons/ball.gray.gif
/var/www/icons/ball.gray.png
/var/www/icons/ball.red.gif
/var/www/icons/ball.red.png
/var/www/icons/binary.gif
/var/www/icons/binary.png
/var/www/icons/binhex.gif
/var/www/icons/binhex.png
/var/www/icons/blank.gif
/var/www/icons/blank.png
/var/www/icons/bomb.gif
/var/www/icons/bomb.png
/var/www/icons/box1.gif
/var/www/icons/box1.png
/var/www/icons/box2.gif
/var/www/icons/box2.png
/var/www/icons/broken.gif
/var/www/icons/broken.png
/var/www/icons/burst.gif
/var/www/icons/burst.png
/var/www/icons/c.gif
/var/www/icons/c.png
/var/www/icons/comp.blue.gif
/var/www/icons/comp.blue.png
/var/www/icons/comp.gray.gif
/var/www/icons/comp.gray.png
/var/www/icons/compressed.gif
/var/www/icons/compressed.png
/var/www/icons/continued.gif
/var/www/icons/continued.png
/var/www/icons/dir.gif
/var/www/icons/dir.png
/var/www/icons/diskimg.gif
/var/www/icons/diskimg.png
/var/www/icons/down.gif
/var/www/icons/down.png
/var/www/icons/dvi.gif
/var/www/icons/dvi.png
/var/www/icons/f.gif
/var/www/icons/f.png
/var/www/icons/folder.gif
/var/www/icons/folder.open.gif
/var/www/icons/folder.open.png
/var/www/icons/folder.png
/var/www/icons/folder.sec.gif
/var/www/icons/folder.sec.png
/var/www/icons/forward.gif
/var/www/icons/forward.png
/var/www/icons/generic.gif
/var/www/icons/generic.png
/var/www/icons/generic.red.gif
/var/www/icons/generic.red.png
/var/www/icons/generic.sec.gif
/var/www/icons/generic.sec.png
/var/www/icons/hand.right.gif
/var/www/icons/hand.right.png
/var/www/icons/hand.up.gif
/var/www/icons/hand.up.png
/var/www/icons/icon.sheet.gif
/var/www/icons/icon.sheet.png
/var/www/icons/image1.gif
/var/www/icons/image1.png
/var/www/icons/image2.gif
/var/www/icons/image2.png
/var/www/icons/image3.gif
/var/www/icons/image3.png
/var/www/icons/index.gif
/var/www/icons/index.png
/var/www/icons/layout.gif
/var/www/icons/layout.png
/var/www/icons/left.gif
/var/www/icons/left.png
/var/www/icons/link.gif
/var/www/icons/link.png
/var/www/icons/movie.gif
/var/www/icons/movie.png
/var/www/icons/p.gif
/var/www/icons/p.png
/var/www/icons/patch.gif
/var/www/icons/patch.png
/var/www/icons/pdf.gif
/var/www/icons/pdf.png
/var/www/icons/pie0.gif
/var/www/icons/pie0.png
/var/www/icons/pie1.gif
/var/www/icons/pie1.png
/var/www/icons/pie2.gif
/var/www/icons/pie2.png
/var/www/icons/pie3.gif
/var/www/icons/pie3.png
/var/www/icons/pie4.gif
/var/www/icons/pie4.png
/var/www/icons/pie5.gif
/var/www/icons/pie5.png
/var/www/icons/pie6.gif
/var/www/icons/pie6.png
/var/www/icons/pie7.gif
/var/www/icons/pie7.png
/var/www/icons/pie8.gif
/var/www/icons/pie8.png
/var/www/icons/portal.gif
/var/www/icons/portal.png
/var/www/icons/poweredby.png
/var/www/icons/ps.gif
/var/www/icons/ps.png
/var/www/icons/quill.gif
/var/www/icons/quill.png
/var/www/icons/right.gif
/var/www/icons/right.png
/var/www/icons/screw1.gif
/var/www/icons/screw1.png
/var/www/icons/screw2.gif
/var/www/icons/screw2.png
/var/www/icons/script.gif
/var/www/icons/script.png
/var/www/icons/small
/var/www/icons/small/back.gif
/var/www/icons/small/back.png
/var/www/icons/small/binary.gif
/var/www/icons/small/binary.png
/var/www/icons/small/binhex.gif
/var/www/icons/small/binhex.png
/var/www/icons/small/blank.gif
/var/www/icons/small/blank.png
/var/www/icons/small/broken.gif
/var/www/icons/small/broken.png
/var/www/icons/small/burst.gif
/var/www/icons/small/burst.png
/var/www/icons/small/comp1.gif
/var/www/icons/small/comp1.png
/var/www/icons/small/comp2.gif
/var/www/icons/small/comp2.png
/var/www/icons/small/compressed.gif
/var/www/icons/small/compressed.png
/var/www/icons/small/continued.gif
/var/www/icons/small/continued.png
/var/www/icons/small/dir.gif
/var/www/icons/small/dir.png
/var/www/icons/small/dir2.gif
/var/www/icons/small/dir2.png
/var/www/icons/small/doc.gif
/var/www/icons/small/doc.png
/var/www/icons/small/forward.gif
/var/www/icons/small/forward.png
/var/www/icons/small/generic.gif
/var/www/icons/small/generic.png
/var/www/icons/small/generic2.gif
/var/www/icons/small/generic2.png
/var/www/icons/small/generic3.gif
/var/www/icons/small/generic3.png
/var/www/icons/small/image.gif
/var/www/icons/small/image.png
/var/www/icons/small/image2.gif
/var/www/icons/small/image2.png
/var/www/icons/small/index.gif
/var/www/icons/small/index.png
/var/www/icons/small/key.gif
/var/www/icons/small/key.png
/var/www/icons/small/movie.gif
/var/www/icons/small/movie.png
/var/www/icons/small/patch.gif
/var/www/icons/small/patch.png
/var/www/icons/small/ps.gif
/var/www/icons/small/ps.png
/var/www/icons/small/rainbow.gif
/var/www/icons/small/rainbow.png
/var/www/icons/small/sound.gif
/var/www/icons/small/sound.png
/var/www/icons/small/sound2.gif
/var/www/icons/small/sound2.png
/var/www/icons/small/tar.gif
/var/www/icons/small/tar.png
/var/www/icons/small/text.gif
/var/www/icons/small/text.png
/var/www/icons/small/transfer.gif
/var/www/icons/small/transfer.png
/var/www/icons/small/unknown.gif
/var/www/icons/small/unknown.png
/var/www/icons/small/uu.gif
/var/www/icons/small/uu.png
/var/www/icons/sound1.gif
/var/www/icons/sound1.png
/var/www/icons/sound2.gif
/var/www/icons/sound2.png
/var/www/icons/sphere1.gif
/var/www/icons/sphere1.png
/var/www/icons/sphere2.gif
/var/www/icons/sphere2.png
/var/www/icons/tar.gif
/var/www/icons/tar.png
/var/www/icons/tex.gif
/var/www/icons/tex.png
/var/www/icons/text.gif
/var/www/icons/text.png
/var/www/icons/transfer.gif
/var/www/icons/transfer.png
/var/www/icons/unknown.gif
/var/www/icons/unknown.png
/var/www/icons/up.gif
/var/www/icons/up.png
/var/www/icons/uu.gif
/var/www/icons/uu.png
/var/www/icons/uuencoded.gif
/var/www/icons/uuencoded.png
/var/www/icons/world1.gif
/var/www/icons/world1.png
/var/www/icons/world2.gif
/var/www/icons/world2.png

l --- to get the list of all the files which is being installed after the installation of package

6: To install any rpm
[root@localhost bash]# rpm -ivh nfs-utils-1.1.0-6.fc8.i386.rpm
warning: nfs-utils-1.1.0-6.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing... ########################################### [100%]
1:nfs-utils ########################################### [100%]

i --- install
v --verbose
h -- hashes

7: to Upgrade any rpm use U instead of i

8: if we append --aid at the end of package it will resolve any dependency if it is there.
if we append --nodeps at the end of package it ignore any dependency

rpm -ivh nfs-utils-1.1.0-6.fc8.i386.rpm --aid
rpm -ivh nfs-utils-1.1.0-6.fc8.i386.rpm --nodeps

9: To remove any rpm
[root@localhost bash]# rpm -e nfs-utils --nodeps
Usage: nfs {start|stop|status|restart|reload|condrestart}
Usage: /etc/rc.d/init.d/rpcidmapd {start|stop|restart|condstart|condrestart|status}
Usage: /etc/rc.d/init.d/nfslock {start|stop|status|restart|probe|condrestart}
warning: /var/lib/nfs/rmtab saved as /var/lib/nfs/rmtab.rpmsave
warning: /etc/sysconfig/nfs saved as /etc/sysconfig/nfs.rpmsave

always remove with --nodeps so that exising dependency file will not be removed

Important Reference

http://rpmfind.net/
http://freshrpms.net/
http://rpm.pbone.net/

Labels: