CentOS、RedHat、Fedora、Oracle Linux、Aliyun Linux 用 yum 安装删除软件包
Ubuntu、Debian、麒麟 用 apt-get 安装删除软件包
SUSE 用 zypper 安装删除软件包
设置源:
echo "deb
http://cn.archive.ubuntu.com/ubuntu/ trusty main universe multiverse restricted" > etc apt/sources.list
echo "deb
http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main universe multiverse restricted" >> etc apt/sources.list
更新一下:
yum update
apt-get update
或
apt-get clean
apt-get autoclean
apt-get update
apt-get upgrade
重新安装:
apt-get install --reinstall bind9utils
yum reinstall bind-utils
C编译器:
apt-get install build-essential
apt-get install make
yum install gcc-c++
yum install make
yum install glibc-static
或
yum groupinstall "Development Tools"
centos8:
dns install gcc
stdio.h include files:
apt install build-essential
yum install glibc-headers
autoconf、autoreconf:
apt install autoconf
yum install autoconf
automake、autoheader、autoreconf、aclocal:
apt install automake
yum install automake
libtoolize:
apt install libtool
yum install libtool
pkg-config:
apt-get install pkg-config
yum install pkgconfig
python-dev:
apt-get install python-dev
yum install python-devel
pip:
apt install python-pip
centos 7:
yum install epel-release
yum install python-pip
cvs:
apt-get install cvs
yum install cvs
centos 8:
yum --enablerepo=extras install epel-release
guile:
apt-get install guile-2.0-dev
yum install guile-devel
chsh:
apt-get install passwd
yum -y install util-linux
yum -y install util-linux-user
hexdump:
apt-get install bsdmainutils
yum -y install util-linux (hexdump)yum -y install vim-common (xxd)
vi:
get-get install vim
yum install vim-enhanced
ifconfig、arp、telnet、netstat、whois:
apt-get install net-tools
yum install net-tools
yum install telnet
ping:
apt-get update
apt-get install iputils-ping
yum -y install iputils
traceroute:
apt-get update
apt-get install traceroute
yum install traceroute
brtl:
yum install bridge-utils
apt-get install bridge-utils
sftp:
apt-get install openssh-clients
yum install openssh-clients
sshd:
apt-get install openssh-server
yum install openssh-server
proxychains:
apt install proxychains4
yum install proxychains-ng
pppd:
apt-get install ppp
yum install ppp
ip:
apt-get install iproute2
yum install iproute
nslookup、dig、nsupdate:
apt-get install dnsutils
yum install bind-libs
yum install bind-utils
dnssec-keygen:
apt-get install bind9utils
yum install bind-utils
rndc:
apt-get install bind9utils
yum install bind
kdig:
apt-get install knot-dnsutils
yum install knot-utils
dhclient:
apt-get install isc-dhcp-client
yum install dhclient
nc:
apt-get install netcat
yum install nc
snmp:
apt-get install snmp snmpd
yum install net-snmp net-snmp-utils
pstree:
apt-get install psmisc
yum install psmisc
apache httpd:
apt-get install apache2
yum install httpd
mount、showmount、umount:
apt-get install nfs-kernel-server
apt-get install nfs-common
yum install nfs-utils
smaba server:
apt-get install smaba
systemctl start smbd
systemctl start nmbd
yum install samba
systemctl start smb.service
systemctl start nmb.service
smaba client:
apt-get install smbclient
apt-get install cifs-utils
yum install samba-client
yum install cifs-utils
lynx elinks:
apt-get install lynx
yum --enablerepo=powertools install elinks
lsmod modprobe:
apt-get install module-init-tools
apt-get install kmod
yum install module-init-tools
yum install kmod
smartctl:
apt-get -y install smartmontools
yum install smartmontools
cron:
apt-get -y install cron
yum install cronie
file:
apt-get -y install file
column:
apt-get -y install bsdmainutils
yum install util-linux
pod2man:
apt-get install perl
yum install perl-podlators
ld、nm、strings:
apt-get install binutils
yum install binutils
pcre:
apt-get install libpcre3 libpcre3-dev
yum install pcre pcre-dev
radcli:
apt install libradcli4
apt install libradcli-dev
yum install radcli
radclient:apt install freeradius-utils
yum install freeradius-utils
locate:
apt install mlocate
yum install mlocate
openssl dev:
apt-get install openssl libssl-dev
yum install openssl openssl-devel
ppp dev:
apt-get install ppp-dev
yum install ppp-devel
zlib dev:
apt-get install zlib1g zlib1g-dev
yum install zlib zlib-dev
pam dev:
apt-get install libpam0g-dev
yum install pam-devel
libevent dev:
apt-get install libevent-dev
yum install libevent-devel
libxml2 dev:
apt-get install libxml2-dev
yum install libxml2-devel
libsqlite3 dev:
apt install libsqlite3-dev
yum install sqlite-devel
libcurl4:
apt-get install libcurl4
yum install libcurl
nload:
apt-get install nload
yum install epel-release
yum install nload
mk2fs:
yum install e2fsprogs 或 yum install e4fsprogs
apt-get install e2fsprogs
sha1sum md5sum
yum install coreutils
apt-get install coreutils
ImageMagick:
apt install imagemagick
yum install ImageMagick
centos 8:
dnf install epel-release
dnf config-manager --set-enabled PowerTools
dnf install ImageMagick
mingw-w64:
apt install mingw-w64
yum install mingw64-gcc
centos 8:
dnf --enablerepo=powertools install mingw64-gcc
bsdtar(解压zip文件):
apt install libarchive-tools
yum install bsdtar
用apt-get安装后,查看所有安装包:
dpkg -l
用apt-get安装后,查看某一个软件包安装后的具体文件:
dpkg -L libxml2-dev
查找某个文件属于哪个安装包:
dpkg -S /bin/ls
查询软件版本:
apt-show-versions -a -p fail2ban
apt-cache madison fail2ban
apt show fail2ban
查找某一个软件包:
apt-cache search libxml|grep dev
https://packages.ubuntu.com/search?keywords=fail2ban
apt安装历史:
cat /var/log/apt/history.log
用yum安装后,查看所有安装包:yum list installed
rpm -qa
用yum安装后,查看某一个软件包安装后的具体文件:
rpm -ql xxx
查找某个文件属于哪个软件包:
rpm -qf /usr/sbin/tcpdump
通过文件名查找软件包
yum provides *bin/timeout
yum provides ifconfig
yum whatprovides ifconfig
删除软件包:
apt-get remove xxx
yum erase xxx
当在CentOS 中使用yum update更新软件时,可能会遇到如下错误信息:
Error: Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
用如下命令安装即可解决:
yum install deltarpm
yum安装历史:
yum history
SUSE更新zypper:
zypper refresh
zypper update
SUSE全部安装软件:
zypper search --installed-only
单个安装包文件列表:
rpm -ql packageName
查询未安装的某个文件所属的软件包:
zypper se xxx
查询已安装的某个文件所属的软件包:
cnf xxx
安装软件包:
zypper --non-interactive install xxx 2>/dev/null
安装rpm文件:
rpm -i xxx.rpm
更换安装源:
zypper addrepo http://xxx
zypper removerepo http://xxx
zypper refresh
=============
cat > etc apt/sources.list
deb
http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb
http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb
http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb
http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
##测试版源
deb
http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
# 源码
deb-src
http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src
http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src
http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src
http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
apt-get update
dpkg -S /bin/ls
apt-get source coreutils
Linux apt yum update的日志记录:
ubuntu、debian系列:
/var/log/dpkg.log
/var/log/apt/history.log 等
CentOS、Alma、Rocky系列
/var/log/yum.log
原文:
http://zhidao.baidu.com/link?url=ZaOOGI-jRXTWRYPRbqUfdfFmUOLuc0WG87aq5F_HdufOeRDAktaflWyS-ICytg6CH26zVRBRG6k5ePnVH_fnh_
参考:
https://installati.one/
http://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8
https://command-not-found.com/
https://howtoinstall.co/
https://www.cyberciti.biz/faq/installing-rhel-epel-repo-on-centos-redhat-7-x/
https://docs.fedoraproject.org/en-US/epel/
centos7安装glibc-2.29
http://trustcomputing.com.cn/bbs/viewthread.php?tid=2035
[
本帖最后由 linda 于 2022-12-2 21:17 编辑 ]
[
本帖最后由 linda 于 2024-7-3 16:27 编辑 ]