YUM源、磁盘基础知识 CDN概念
第1章 YUM源
1.1 什么是yum源
Yellowdog Updater, Modified
一个基于RPM包管理的字符前端软件包管理器。能够从指定的服务器自动下载RPM包并且安装,可以处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载、安装。
简单来说就是软件仓库--yum源/仓库,类似于电脑管家之类。
1.2 查看系统中有什么yum源
yum repolist 目录可以列出服务器中使用的什么yum源。
[root@znix ~]# yum repolist
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id repo name status
base CentOS-6 - Base - mirrors.aliyun.com 6,706
epel Extra Packages for Enterprise Linux 6 - x86_64 12,395
extras CentOS-6 - Extras - mirrors.aliyun.com 45
updates CentOS-6 - Updates - mirrors.aliyun.com 611
repolist: 19,757
系统的yum源默认是从世界各地下载软件,优先选择自己离得最近的源下载,不稳定。
1.3 指定一个国内的yum源地址 aliyun
修改为阿里云的yum源
1.3.1 操作前备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
1.3.2 下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
1.3.3 生成本地缓存
缓存无处不在
yum makecache
1.4 增加一个epel源
1.4.1 epel源时干什么的
epel源---增加和扩展yum仓库
里面包含了许多基本源里没有的软件。
1.4.2 添加上一个aliyun的epel源
安装自己的系统版本选择epel源。
epel(RHEL 7)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
epel(RHEL 6)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
epel(RHEL 5)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo
1.5 安装htop和sl 程序
htop 是一个类似与top的软件,但是更好看
sl 是一个小软件,哈哈。
[root@znix ~]# yum install htop sl -y
1.6 清除yum缓存
清除本地的yum缓存。
yum clean all
1.7 查看系统yum源信息时可能出现的错误
1.7.1 可能出现的错误
[root@oldboy-40 ~]# yum repolist
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
repolist: 0
[root@znix ~]# ls -l /etc/yum.repos.d
total 40
-rw-r--r-- 1 root root 2572 Jul 2 2014 CentOS-Base.repo
/etc/yum.repos.d目录下的 .repo文件的内容没有或被删除都可以导致找不到yum源。
会出现以上的错误。
1.7.2 yum 常见错误
[root@znix ~]# yum install tree
Loaded plugins: fastestmirror, security
Existing lock /var/run/yum.pid: another copy is running as pid 5219.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 23 M RSS (859 MB VSZ)
Started: Fri Sep 15 08:46:52 2017 - 00:12 ago
State : Sleeping, pid: 5219
状态 :pid 5219
正在运行的yum的pid
1.7.3 解决办法
1)可以等待该yum程序执行完毕,就可以进行安装
2)可以将这个pid进程结束进程,使用kill命令。
[root@znix ~]# ps -ef |grep 5219
root 5219 5095 44 08:52 pts/1 00:00:21 /usr/bin/python /usr/bin/yum makecache
root 5232 5146 0 08:53 pts/2 00:00:00 grep --color=auto 5219
第2章 磁盘的基础知识
2.1 磁盘知识体系
2.2 如何查询内存的使用情况
free -h 参数,在旧版本的系统中没有这个参数,可以使用-m,以M为单位显示。
[root@oldboyedu-40 ~]# free -h
total used free shared buffers cached
Mem: 1.8G 887M 974M 228K 221M 302M
-/+ buffers/cache: 363M 1.5G
在C#中有一些我自己认为比较独特的知识点,这些知识点是我经常使用的知识,但对它们的了解还是比较少的,所以通过查找资料学习,总结了这些独特的知识点并简单叙述,第一篇主要是一些概念和思想方面的知识.(后面 ... 11.1基础知识 JNI(Java Native Interface,JAVA原生接口) 使用JNI可以使Java代码和其他语言写的代码(如C/C++代码)进行交互. 问:为什么要进行交互? |- ... 多线程Multi-Thread 基础 线程概念 线程就是程序中单独顺序的流控制. 线程本身不能运行,它只能用于程序中. 说明:线程是程序内的顺序控制流,只能使用分配给程序的资源和环境. 进程 进程:执 ... 1.JavaScript概念 JavaScript是脚本语言; 编写之后,可以直接运行(缺失了编译的过程) 2.JavaScript发展 LiveScript => JavaScri ... 编码转换 编码回顾: 1. ASCII : 最早的编码. ⾥⾯有英⽂⼤写字⺟, ⼩写字⺟, 数字, ⼀些特殊字符. 没有中⽂, 8个01代码, 8个bit, 1个byte 2. GBK: 中⽂国标码, ... 1.CSS概念 全称为Cascading Style Sheets(层叠样式表),支持专有的文件 - 扩展名为".css" 作用:将HTML的结构(HTML标签即html)与样式( ... 1. DOM概念 全称为 Document Object Model,译为文档对象模型 D:文档 - DOM将HTML页面解析为一个文档 —> document对象 O:对象 - DOM将H ... 1.1 java语言有哪些优点? 1.java语言为纯面向对象的语言. 2.平台无关性.java语言的优点便是“一次编译,到处执行”.编译后的程序不会被平台所约束,因此java语言有很好的移植性. 3 ... typeof操作符 typeof 操作符返回一个字符串,表示未经计算的操作数的类型. // 数值 typeof 37 === 'number'; typeof 3.14 === 'number'; t ... html { font-family: sans-serif } body { margin: 0 } article,aside,details,figcaption,figure,footer,h ... 最终的页面: 步骤: 1.搜索标签代码 <input id="keyword" type="text" class="text" on ... 关于api-ms-win-crt-runtimel1-1-0.dll缺失的解决方案 目录 关于api-ms-win-crt-runtimel1-1-0dll缺失的解决方案 目录 安装VC redite ... 一.环境介绍与安装准备 1.环境说明 2台虚拟机,OS为ubuntu13.04,ip分别为xxx.xxx.xxx.140和xxx.xxx.xxx.145. 2.安装准备 ElasticSearch(简 ... 在JS中,"==="叫做严格运算符,"=="叫做相等运算符. 它们的区别是相等运算符(==)比较两个值是否相等,严格相等运算符(===)比较它们是否为" ... 本次实验设计两个方面的代码,第一个是客户端,代码如下: import os from socket import * c = socket(AF_INET,SOCK_STREAM) c.connect ... During the Warring States Period of ancient China(476 BC to 221 BC), there were seven kingdoms in Ch ... 第六章:程序数据集散地:数据库 6.1:当今最常用的数据库 sql server:是微软公司的产品 oracle:是甲骨文公司的产品 DB2:数据核心又称DB2通用服务器 Mysql:是一种开发源代 ... 入门指南 1. 全局安装 gulp: $ npm install --global gulp 或使用cnpm 2. 作为项目的开发依赖(devDependencies)安装: $ npm instal ... python 的内嵌time模板翻译及说明 一.简介 time模块提供各种操作时间的函数 说明:一般有两种表示时间的方式: 第一种是时间戳的方式(相对于1970.1.1 00:00:0 ...YUM源、磁盘基础知识 CDN概念的更多相关文章
随机推荐