Linux软件管理之系统实操

1 rpm软件组成

rpm软件组成&编译安装

2 编译安装

rpm软件组成&编译安装

3 RPM

RPM&YUM

4 YUM

RPM&YUM

5 系统实操

5.1 配置本地yum仓库,安装wireshark、wget
  1. 新建repo文件,编写清华apt源

image-20200206202107148.png

  1. 清除系统yum缓存,并重新生成新的yum缓存
[root@localhost ~]# yum clean all
[root@localhost ~]# yum repolist
  1. 安装wireshark、wget
[root@localhost ~]# yum install wireshark

在这里插入图片描述

[root@localhost ~]# yum install wget

image-20200206202345122.png

5.2 配置epel仓库,安装nginx
  1. 下载阿里云提供的epel
[root@localhost ~]# wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
  1. 清除系统yum缓存,并重新生成新的yum缓存
[root@localhost ~]# yum clean all
[root@localhost ~]# yum repolist
  1. 安装nginx
[root@localhost ~]# yum install nginx

在这里插入图片描述

5.3 源码编译安装nginx
  1. 安装编译环境
[root@localhost ~]# yum install gcc make automake
  1. 下载源码包
[root@localhost ~]# wget http://nginx.org/download/nginx-1.14.0.tar.gz 
  1. 解压
[root@localhost ~]# tar xf  nginx-1.14.0.tar.gz 
  1. configure
[root@localhost nginx-1.14.0]# ./configure --prefix=/usr/local/nginx --with-http_ssl_module

​ 出现问题:

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

​ 原因是缺少依赖包,安装pcre-deve解决问题

[root@localhost nginx-1.14.0]# yum -y install pcre-devel

​ 重跑一遍,又出现问题

./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.

​ 原因还是缺少依赖包

[root@localhost nginx-1.14.0]# yum -y install openssl openssl-devel

​ 再跑一遍,成功

在这里插入图片描述

  1. make
[root@localhost nginx-1.14.0]# make
  1. make install
[root@localhost nginx-1.14.0]# make install
  1. 测试
[root@localhost ~]# /usr/local/nginx/sbin/nginx

在这里插入图片描述

5.4 在ubuntu种配置好清华的apt源,安装wireshark
  1. 备份原文件
ti@ubuntu:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
  1. 修改源apt源配置
ti@ubuntu:~$ sudo vim /etc/apt/sources.list

在这里插入图片描述

  1. 更新
ti@ubuntu:~$ sudo apt-get update 
  1. 安装wireshark
ti@ubuntu:~$ sudo apt-get intall wireshark

20200312185229182.png

5.5 将光盘中的Packages目录通过cp命令拷贝到/data/centos7/packages中,然后将/data/centos7做成本地yum仓库
  1. 挂载光盘
[root@localhost ~]# mount /dev/sr0 /media/cd
  1. 拷贝文件
[root@localhost ~]# cp -rf /media/cd/Packages/ /data/centos7/packages
  1. 配置yum仓库
[root@localhost ~]# vim /etc/yum.repos.d/local.repo

image-20200206221830041.png

  1. 安装createrepo
[root@localhost ~]# yum install createrepo
  1. 创建repodata
[root@localhost ~]# createrepo /data/centos7/packages/
  1. 重建yum缓存
[root@localhost ~]# yum clean all
[root@localhost ~]# yum repolist

image-20200206222028083.png

5.6 安装图形化环境
  1. 安装X窗口系统
[root@localhost ~]# yum grouplist "X Window System"
  1. 安装图形界面软件GNOME
[root@localhost ~]# yum groupinstall "GNOME Desktop"
  1. 启动桌面
[root@localhost ~]# startx

在这里插入图片描述

6 文件压缩/解压

文件压缩/解压

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值