文章目录
1 rpm软件组成
2 编译安装
3 RPM
4 YUM
5 系统实操
5.1 配置本地yum仓库,安装wireshark、wget
- 新建repo文件,编写清华apt源
- 清除系统yum缓存,并重新生成新的yum缓存
[root@localhost ~]# yum clean all
[root@localhost ~]# yum repolist
- 安装wireshark、wget
[root@localhost ~]# yum install wireshark
[root@localhost ~]# yum install wget
5.2 配置epel仓库,安装nginx
- 下载阿里云提供的epel
[root@localhost ~]# wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
- 清除系统yum缓存,并重新生成新的yum缓存
[root@localhost ~]# yum clean all
[root@localhost ~]# yum repolist
- 安装nginx
[root@localhost ~]# yum install nginx
5.3 源码编译安装nginx
- 安装编译环境
[root@localhost ~]# yum install gcc make automake
- 下载源码包
[root@localhost ~]# wget http://nginx.org/download/nginx-1.14.0.tar.gz
- 解压
[root@localhost ~]# tar xf nginx-1.14.0.tar.gz
- 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
再跑一遍,成功
- make
[root@localhost nginx-1.14.0]# make
- make install
[root@localhost nginx-1.14.0]# make install
- 测试
[root@localhost ~]# /usr/local/nginx/sbin/nginx
5.4 在ubuntu种配置好清华的apt源,安装wireshark
- 备份原文件
ti@ubuntu:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
- 修改源apt源配置
ti@ubuntu:~$ sudo vim /etc/apt/sources.list
- 更新
ti@ubuntu:~$ sudo apt-get update
- 安装wireshark
ti@ubuntu:~$ sudo apt-get intall wireshark
5.5 将光盘中的Packages目录通过cp命令拷贝到/data/centos7/packages中,然后将/data/centos7做成本地yum仓库
- 挂载光盘
[root@localhost ~]# mount /dev/sr0 /media/cd
- 拷贝文件
[root@localhost ~]# cp -rf /media/cd/Packages/ /data/centos7/packages
- 配置yum仓库
[root@localhost ~]# vim /etc/yum.repos.d/local.repo
- 安装createrepo
[root@localhost ~]# yum install createrepo
- 创建repodata
[root@localhost ~]# createrepo /data/centos7/packages/
- 重建yum缓存
[root@localhost ~]# yum clean all
[root@localhost ~]# yum repolist
5.6 安装图形化环境
- 安装X窗口系统
[root@localhost ~]# yum grouplist "X Window System"
- 安装图形界面软件GNOME
[root@localhost ~]# yum groupinstall "GNOME Desktop"
- 启动桌面
[root@localhost ~]# startx