其他分享
首页 > 其他分享> > 总结3.22

总结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

标签:总结,tmp,fstab,s5,etc,sed,root,3.22
来源: https://blog.51cto.com/15092993/2667924