总结3.22

sed -r '/^#/s@^#|[ \t]+@@g' /etc/fstab

/etc/fstab
CreatedbyanacondaonWedFeb2414:05:522021

Accessiblefilesystems,byreference,aremaintainedunder'/dev/disk/'.
Seemanpagesfstab(5),findfs(8),mount(8)and/orblkid(8)formoreinfo.

Aftereditingthisfile,run'systemctldaemon-reload'toupdatesystemd
unitsgeneratedfromthisfile.

/dev/mapper/cl-root     /                       xfs     defaults        0 0
UUID=33f54996-8074-46df-817f-d0f6910dfb04 /boot                   xfs     defaults        0 0
/dev/mapper/cl-swap     none                    swap    defaults        0 0

获取ipv4地址

[root@centos8-s5 tmp]# ip a |grep inet[^6]|sed -r 's#inet (.*)/[0-9].*#\1#'
    127.0.0.1
    192.168.100.10
[root@centos8-s5 tmp]# 

建仓库

[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ 
#baseurl支持多个链接
        baseurl=http1...
                http2...
                file:///mnt...
#仓库路径为repodata的上一级目录
gpgcheck=1  #是否验证包的合法性
enabled=1 #表示启用  0表示禁用
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
sed处理路径名和基名
[root@centos8-s5 tmp]# echo "/etc/fstab" |sed -r 's#^/(.*)/(.*)#\1#'
etc
[root@centos8-s5 tmp]# echo "/etc/fstab" |sed -r 's#^/(.*)/(.*)#\2#'
fstab
[root@centos8-s5 tmp]# 

httpd编译安装

apr apr-util httpd

安装依赖的程序包
先编译安装apr apr-util
再编译安装 httpd
apachectl start 启动httpd

上一篇:(二)单一因子简单分析


下一篇:【Java高级】深入浅出谈Object类