centOS开源仓库地址: https://gitlab.com/redhat/centos-stream
一、系统配置 1. 网络配置 1.1. 配置网卡 修改/etc/sysconfig/network-scripts/ifcfg-xxx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="none" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPADDR="199.200.2.199" # ipv4地址 PREFIX="16" # 掩码 GATEWAY="199.200.2.254" # 默认网关 DNS1="199.200.0.100" # dns地址 IPV6INIT="yes" IPV6_AUTOCONF="no" # 是否自动配置ipv6,关掉下面的ip配置才有效 IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" IPV6ADDR="2002::0011/112" # ipv6地址 IPV6_PRIVACY="no" IPV6_DEFAULTGW="1001::fffe" # ipv6网关 NAME="ens18" UUID="c1a4c4b2-b705-44fb-9bec-a486f633d76d" # 使用 nmcli con show DEVICE="ens18" ONBOOT="yes"
1.2. 查看网卡信息 1 2 3 4 => nmcli con show NAME UUID TYPE DEVICE ens18 c1a4c4b2-b705-44fb-9bec-a486f633d76d ethernet ens18 ens19 d808c1b2-fccf-3717-b518-4e3df1cc61a8 ethernet --
1.3. 防火墙 二、软件安装 1. yum命令 1.1. 开启安装debuginfo 1 yum install 'dnf-command(debuginfo-install)'
之后就可以使用下面命令安装对应的debuginfo的包 1 yum debuginfo-install xxx
2. 部分命令安装源和包 2.1. CentOS 7 文件/命令 所属包 所属仓库 rpcgen rpcgen PowerTools ncurses/curses.h
ncurses-devel BaseOS gdbserver gdb-gdbserver AppStream ifconfig net-tools base ifconfig net-tools base
2.2. CentOS 8 文件/命令 所属包 所属仓库 /usr/include/libudev.h
systemd-devel BaseOS
3. 包内容查看和搜索 3.1. 查看包安装了哪些软件 1 2 3 4 5 6 7 8 => repoquery -l texinfo Last metadata expiration check: 0:12:48 ago on Thu 21 Sep 2023 02:14:51 PM CST. /usr/bin/makeinfo /usr/bin/pod2texi /usr/bin/texi2any /usr/share/doc/texinfo /usr/share/doc/texinfo/AUTHORS ...
3.2. 根据文件搜索在哪个包中 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 => yum provides */libudev.h Last metadata expiration check: 14:30:51 ago on Thu 21 Mar 2024 09:32:27 PM CST. systemd-devel-239-51.el8.i686 : Development headers for systemd Repo : BaseOS Matched from: Filename : /usr/include/libudev.h systemd-devel-239-51.el8.x86_64 : Development headers for systemd Repo : BaseOS Matched from: Filename : /usr/include/libudev.h systemd-devel-239-51.el8_5.2.i686 : Development headers for systemd Repo : BaseOS Matched from: Filename : /usr/include/libudev.h # 或者使用repoquery => repoquery "*/ncurses/curses.h" Last metadata expiration check: 0:14:13 ago on Thu 21 Sep 2023 02:14:51 PM CST. ncurses-devel-0:6.1-9.20180224.el8.i686 ncurses-devel-0:6.1-9.20180224.el8.x86_64
小技巧和踩坑记 1. CentOS 7安装cmake后提示cmake: symbol lookup error: cmake: undefined symbol: archive_write_add_filter_zstd