LINUX--软件包管理&sed

1、自建yum仓库,分别为网络源和本地源
待更新
2、编译安装http2.4,实现可以正常访问,并将编译步骤和结果提交。

wget https://mirrors.bfsu.edu.cn/apache//httpd/httpd-2.4.46.tar.bz2
tar xvf httpd-2.4.46.tar.bz2 -C /usr/local/src
cd /usr/local/src/httpd-2.4.46/
./configure --prefix=/apps/httpd24 --sysconfdir=/etc/httpd24 --enable--ssl
make -j 3 && make install
apachectl

LINUX--软件包管理&sed
LINUX--软件包管理&sed

3、利用sed 取出ifconfig命令中本机的IPv4地址

lime@ubuntu1804:~$ ifconfig ens33 | sed -nr "2s/[^0-9]+([0-9.]+).*/\1/p" 
10.0.0.203 

4、删除/etc/fstab文件中所有以#开头,后面至少跟一个空白字符的行的行首的#和空白字符

可能是错的,还在想答案ing
lime@ubuntu1804:~$ sed -n '/^#/s/ //p'  /etc/fstab  
#/etc/fstab: static file system information. 
#Use 'blkid' to print the universally unique identifier for a 
#device; this may be used with UUID= as a more robust way to name devices 
#that works even if disks are added and removed. See fstab(5). 
#<file system> <mount point>   <type>  <options>       <dump>  <pass> 
#/ was on /dev/sda1 during installation 
#/boot was on /dev/sda2 during installation 
#/data was on /dev/sda3 during installation 
#swap was on /dev/sda4 during installation 

5、处理/etc/fstab路径,使用sed命令取出其目录名和基名

lime@ubuntu1804:~$ echo "/etc/fstab/" | sed -r 's#(^/./)([^/]+/?)#\2#'
fstab/
lime@ubuntu1804:~$ echo "/etc/fstab/" | sed -r 's#(^/./)([^/]+/?)#\1#'
/etc/
上一篇:【问题解决】anaconda中 spyder crashed during last session 解决办法


下一篇:fegin调用异常feign.FeignException$MethodNotAllowed: [405] during [GET]