how to create repo | /etc/yum.repos.d/ | rpm -ql -qf -qc -qd

don't install local RPMs using rpm command, use yum install command

[lisa@localhost sales]$ ls -lart /etc/yum.repos.d/
total 40
drwxr-xr-x.   2 root root  187 Nov 15  2016 .
-rw-r--r--.   1 root root 2893 Nov 29  2016 CentOS-Vault.repo
-rw-r--r--.   1 root root 1331 Nov 29  2016 CentOS-Sources.repo
-rw-r--r--.   1 root root  630 Nov 29  2016 CentOS-Media.repo
-rw-r--r--.   1 root root  314 Nov 29  2016 CentOS-fasttrack.repo
-rw-r--r--.   1 root root  649 Nov 29  2016 CentOS-Debuginfo.repo
-rw-r--r--.   1 root root 1309 Nov 29  2016 CentOS-CR.repo
-rw-r--r--.   1 root root 1664 Nov 29  2016 CentOS-Base.repo
drwxr-xr-x. 139 root root 8192 Oct 15 09:27 ..
[lisa@localhost sales]$

Ubuntu:/etc/apt/sources.list.d/
============================

[lisa@localhost yum.repos.d]$ cat CentOS-Base.repo 

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
============================
[root@localhost ~]# netstat -tulpen | grep 25
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      0          23846      1625/master         
tcp6       0      0 ::1:25                  :::*                    LISTEN      0          23847      1625/master         
[root@localhost ~]# cat /proc/1625/environ | more
MAIL_CONFIG=/etc/postfixpostfix-2.10.1/samplesq_path=/usr/bin/mailq.postfixe/doc/postfix-2.10.1/README_FILESusr/bin:/sbin:/usr/sbinil_owner=postfixixusr/libexec/postfix/master
[root@localhost ~]# 

show rpm name
[root@localhost ~]# rpm -qf /usr/libexec/postfix/master
postfix-2.10.1-6.el7.x86_64

show used files
[root@localhost ~]# rpm -ql postfix | more
/etc/pam.d/smtp
/etc/pam.d/smtp.postfix
/etc/postfix
/etc/postfix/access
===========================
list configuration files

[root@localhost ~]# rpm -qc postfix
/etc/pam.d/smtp.postfix
/etc/postfix/access
/etc/postfix/canonical
/etc/postfix/generic
/etc/postfix/header_checks
/etc/postfix/main.cf
/etc/postfix/master.cf
/etc/postfix/relocated
/etc/postfix/transport
/etc/postfix/virtual
/etc/sasl2/smtpd.conf
[root@localhost ~]# 
============================
show documentation

[root@localhost ~]# rpm -qd postfix
/usr/share/doc/postfix-2.10.1/COMPATIBILITY
/usr/share/doc/postfix-2.10.1/LICENSE
/usr/share/doc/postfix-2.10.1/README-Postfix-SASL-RedHat.txt
/usr/share/doc/postfix-2.10.1/README_FILES/AAAREADME
===========================
[root@localhost ~]# rpm -qf /etc/httpd/conf/httpd.conf 
httpd-2.4.6-45.el7.centos.4.x86_64

[root@localhost ~]# rpm -ql httpd-2.4.6-45.el7.centos.4.x86_64 | grep service
/usr/lib/systemd/system/htcacheclean.service
/usr/lib/systemd/system/httpd.service
[root@localhost ~]# 

[root@localhost ~]# rpm -ql httpd-2.4.6-45.el7.centos.4.x86_64 | grep log
/etc/httpd/logs
/etc/logrotate.d/httpd
/usr/lib64/httpd/modules/mod_log_config.so
/usr/lib64/httpd/modules/mod_log_debug.so
/usr/lib64/httpd/modules/mod_log_forensic.so
/usr/lib64/httpd/modules/mod_logio.so
/usr/sbin/rotatelogs
/usr/share/man/man8/rotatelogs.8.gz
/var/log/httpd


Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all