Notes‎ > ‎

CentOS

[upgrade]
process:
# yum update
# for a in $(find /etc /var -name ‘*.rpm?*’); do diff -u $a ${a%.rpm?*}; done
# package-cleanup –leaves (unused)
# yum remove package-name-and-version
# package-cleanup –orphans (lost)

[tips&tricks]
rpm:
how do i find the rpm package associated with a file?
$ rpm -qf /path/to/file
how do i get a list of all installed rpms?
$ rpm -qa
how go i get a list of installed files from an installed rpm package?
$ rpm -ql <package>
how do i get a list of files in an rpm file?
$ rpm -qlpv package.rpm
how do i get information about an rpm file?
$ rpm -qip package.rpm
install RPM package and have yum resolve it's dependencies
$ yum localinstall /path/to/package.rpm

[ldap]
# authconfig --enablemkhomedir --useshadow --enablemd5 --enablecache --enablelocauthorize --enableldap --enableldapauth --ldapserver=ldap.server.com --ldapbasedn=dc=domain,dc=com --[kickstart|updateall]

[repo]
background:
Sometimes it can be handy to set up your own repository to prevent from downloading the remote repository over and over again. If you have to install multiple systems in your local network then all needed packages can be downloaded over the fast LAN connection, thus saving your internet bandwidth.
# createrepo /path/to/repo

[references]
http://www.howtoforge.com/creating_a_local_yum_repository_centos
http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
http://wiki.centos.org/AdditionalResources/Repositories
http://www.cyberciti.biz/tips/linux-get-list-installed-software-reinstallation-restore.html
Comments