Linux 的yum配置软件安装以及终端进程的查看

本文介绍了如何在Linux系统中通过yum进行本地源和网络源的配置,包括安装httpd软件,并详细讲解了源码安装httpd的过程。同时,文章还涵盖了查看root用户带有终端的进程、无终端进程以及高CPU占用进程的方法。

目录

1.使用rpm安装zsh(忽略依赖关系安装)

2.yum本地源配置

  yum网络源配置

  安装httpd软件

3.源码安装: httpd

4.查看root用户带有终端的进程

​编辑  显示没有终端的进程

​编辑  显示所有进程

  查看1分钟内占用CPU时间前10的进程(使用top命令)

1.使用rpm安装zsh(忽略依赖关系安装)

 
  查询是否已安装


  卸载zsh


  查询所有已安装软件

 rpm -qa


  查询date命令所在软件包

 


  查询未安装的zsh的文件信息


2.yum本地源配置

[root@localhost ~]# mount /dev/cdrom /mnt          

[root@localhost ~]# vim /etc/yum.repos.d/redhat.repo
[root@localhost ~]#cat /etc/yum.repos.d/redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated.  Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=0

[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
gpgcheck=0
 


  yum网络源配置

 

 


  安装httpd软件

[root@server ~]#yum install httpd -y


  查看vim命令属于哪个软件包


  yum卸载httpd

[root@localhost ~]#  yum remove  httpd -y   


  清理缓存

[root@localhost ~]#  yum clean all


  重新创建缓存

[root@localhost ~]# yum makecache


  安装postgresql模块中的版本13

[root@localhost ~]# yum install @postgresql:13 -y

[root@localhost ~]#  yum module install postgresql:13 -y


3.源码安装: httpd

首先下载一个目标软件,以及两个依赖软件,然后上传到Linux端,进行解压

#解压目标软件

[root@server software]# tar -xvzf httpd-2.4.54.tar.ga -C /usr/local/software

#解压两个依赖软件

[root@localhost ~]# tar -xzvf "apr-1.6.5.tar.gz" -C /usr/local/software/

[root@localhost ~]# tar -xzvf "apr-util-1.6.1.tar.gz" -C /usr/local/software/

[root@localhost software]# yum install gcc gcc-c++ libgcc -y   #安装编译环境

#安装apr-1.6.5

[root@localhost software]# cd apr-1.6.5/
[root@localhost apr-1.6.5]# ./configure --prefix=/usr/local/apr

[root@localhost apr-1.6.5]# make

[root@localhost apr-1.6.5]# make install


#安装apr-util-1.6.1

[root@localhost software]# cd apr-util-1.6.1/
[root@localhost apr-util-1.6.1]#  ./configure --prefix=/usr/local/apr-until --with-apr=/usr/local/apr
[root@localhost apr-util-1.6.1]# yum install expat-devel -y

[root@localhost apr-util-1.6.1]#  ./configure --prefix=/usr/local/apr-until --with-apr=/usr/local/apr
[root@localhost apr-util-1.6.1]# make

[root@localhost apr-util-1.6.1]# make install

#安装httpd-2.4.54

[root@localhost software]# cd httpd-2.4.54/

[root@localhost httpd-2.4.54]# ./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-until

[root@localhost httpd-2.4.54]# yum install pcre2-devel -y

[root@localhost httpd-2.4.54]# ./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-until

[root@localhost httpd-2.4.54]# make

[root@localhost httpd-2.4.54]# make install

[root@localhost bin]# ./apachectl start


4.查看root用户带有终端的进程


  显示没有终端的进程


  显示所有进程

 


  查看1分钟内占用CPU时间前10的进程(使用top命令)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值