0
点赞
收藏
分享

微信扫一扫

N64010第四周作业

山竹山竹px 2022-05-11 阅读 30

1、

2、
mv httpd-2.4.53.tar.bz2 /usr/local/src
cd /usr/local/src
bzip2 -d httpd-2.4.53.tar.bz2
tar xvf httpd-2.4.53.tar
cd httpd-2.4.53
./configure --prefix=/apps/httpd --sysconfdir=/etc/httpd --enable-ssl
yum install apr-devel
./configure --prefix=/apps/httpd --sysconfdir=/etc/httpd --enable-ssl
yum install apr-util-devel -y
./configure --prefix=/apps/httpd --sysconfdir=/etc/httpd --enable-ssl
yum install -y gcc
yum install pcre-devel -y
./configure --prefix=/apps/httpd --sysconfdir=/etc/httpd --enable-ssl
yum list openssl*
yum install openssl-devel -y
./configure --prefix=/apps/httpd --sysconfdir=/etc/httpd --enable-ssl
make -j 2
yum provides /usr/lib/rpm/redhat/redhat-hardened-ld
yum install redhat-rpm-config-125-1.el8.noarch
make -j 2
make install
tree /apps/httpd/
cd /apps/httpd/bin
ls
echo 'PATH=/apps/httpd/bin:$PATH' > /etc/profile.d/httpd.sh
. /etc/profile.d/httpd.sh
apachectl start
3、利用sed 取出ifconfig命令中本机的IPv4地址
ifconfig|sed -nr "1s/[^0-9]+([0-9.]+).*/\1/p"
4、删除/etc/fstab文件中所有以#开头,后面至少跟一个空白字符的行的行首的#和空白字符
sed -r 's/^#[[:space:]]*//'g /etc/fstab
5、处理/etc/fstab路径,使用sed命令取出其目录名和基名
[root@centos69 ~]#echo "/etc/fstab"| sed 's@[^/]\+$@@'
/etc/
[root@centos69 ~]#echo "/etc/fstab"| sed 's@.*/\([^/]\+\)$@\1@'
fstab
6、apt install 安装软件包
apt remove 移除软件包
apt purge 移除软件包以及配置文件
apt list 列出包含条件的包
apt search 搜索应用程序(可以使用正则表达式)
apt show 显示安装细节
apt upgrade 升级所有可升级的包
apt update 刷新存储库索引

举报

相关推荐

0 条评论