August 25, 2006

rpm command example

Filed under: Unix Admin — HanaDaddy @ 12:10 am

Query info about package:

rpm -qil package(binary)name

if you want info about all installed packeges

rpm -qail

INSTALL package:

rpm -ivh package_name

Forcing Installation (ignoring dependency problem)

rpm -ivh --force --nodeps package_name

verify package

rpm -V -a   #verfiy all package
rpm -V package_name

rpm build from RPM source package

Filed under: Unix Admin — HanaDaddy @ 12:10 am

find .spec file in /usr/src/redhat/SPECS

rpm -bc xxx.spec : build stage
rpm -bi xxx.spec : install stage

rpm -bb xxx.spec : build binary package
rpm -bs xxx.spec : build source package
rpm -ba xxx.spec : build binary & source package

first install source rpm package using rpm command

goto /usr/src/SPECS folder

edit httpd.spec

for example you may want to edit configure part of the httpd.spec file

and then

You can create binary rpm package (redhat 8 & up)

rpmbuild -bb httpd.spec

compiled files will be written in /usr/src/BUILD folder

Then you can use rpm -ivh command to install it.

MySQL Adding user & privileges

Filed under: Unix Admin — HanaDaddy @ 12:09 am
grant all privileges on MYDBNAME.* to user@localhost identified by 'somepass' with grant option;
 
flush privileges;

How to stickybit, setuidbit

Filed under: Unix Admin — HanaDaddy @ 12:07 am

1.sticky bit : regardless of directory’s access, only directory’s owner can delete files.
(only for directories)

$> chmod 01755 dirname
drwxr-xr-t

2.setuid bit: when you execute the program effective uid becomes as progams owner’s uid (such as passwd). Therefore , if execute bit is not set, this is meaningless

$> chmod 02755 exefile
rwxr-sr-x 
$> chmod 04755 exefile  
rwsr-xr-x

Apache httpd 2.0.54 & php 4.4.0 install under redhat 9

Filed under: Unix Admin — HanaDaddy @ 12:03 am

Pleas note that this article orginially written about 1 year ago.
(more…)

Page 2 of 3«123»
 

43 queries. 0.376 seconds. Powered by WordPress