repo

CentOS7 cannot find a valid baseurl for repo base

落花浮王杯 提交于 2019-12-30 02:31:55
找到文件夹: cd /etc/sysconfig/network-scripts/ 然后找ifcfg 开头的文件,挨个打开 里面有下面那些代码前三行的就是,添加后面DNS两行,保持并退出,然后继续执行两个ifdown and ifup 命令,然后ping www.baodu.com正常的话就没问题可以更新yum了。 ONBOOT=no NM_CONTROLLED=no BOOTPROTO=dhcp DNS1=8.8.8.8 DNS2=4.2.2.2   重启网络 service network restart    超简单将Centos的yum源更换为国内的阿里云源 1、备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 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 CentOS 6 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6

CentOS7切换源

心不动则不痛 提交于 2019-12-30 02:30:32
1、备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 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

centos7最小化安装后配置笔记

岁酱吖の 提交于 2019-12-30 02:28:48
一、安装wget(步骤2备用)   yum install wget -y 二、切换yum源为阿里云 备份旧源: mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 下载新的源文件: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo (可将7换成6、5等等) 生成缓存:yum makecache 三、设置静态ip和DNS   vi /etc/sysconfig/network-scripts/ifcfg-e*,添加如下内容: BOOTPROTO="static"(若原来为dhcp则改为static即可) IPADDR=192.168.188.6 NETMASK=255.255.255.0 GATEWAY=192.168.188.2 DNS1=61.139.2.69 DNS2=218.6.200.139 四、安装jdk 官网下载tar.gc版:http://www.oracle.com/technetwork/java/javase/downloads/index.html 解压到/usr/local/lib/java8 创建软连接到环境变量目录 来源:

CentOS7更换国内源

这一生的挚爱 提交于 2019-12-30 02:27:17
前言 CentOS 有个很方便的软件安装工具yum,但是默认安装完CentOS,系统里使用的是国外的CentOS更新源,这就造成了我们使用默认更新源安装或者更新软件时速度很慢的问题,甚至更新失败。 为了使用yum工具能快速的安装更新软件,我们需要将默认的yum更新源配置为国内的更新源。 具体操作 1、备份(针对所有CentOS可用,备份文件在当前路径下) mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/ 阿里云源 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 网易云源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo 3、之后运行yum

Centos更换yum源,安装ssh server

喜夏-厌秋 提交于 2019-12-30 02:25:28
先连上网,然后更换yum源 1. 新建的用户没有sudo权限,所以首先切换到root用户 su - 输入密码 2. 备份之前的yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 3. 下载yum源centos6 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 4. 清理并生成缓存 yum clean all yum makecache 安装ssh server $ yum search ssh $ yum install openssh-server $ chkconfig --list sshd sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off    来源: https://www.cnblogs.com/drizzlewithwind/p/5145384.html

Centos7.x 装机优化

泪湿孤枕 提交于 2019-12-30 02:20:39
Linux 服务器装机后优化 参考 https://blog.csdn.net/u010133338/article/details/81055475 优化初始化脚本 vim init_optimization.sh #!/bin/bash #author by cc #this script is only for CentOS 7.x #check the OS platform=`uname -i` if [ $platform != "x86_64" ];then echo "this script is only for 64bit Operating System !" exit 1 fi echo "the platform is ok" cat << EOF your system is CentOS 7 x86_64 EOF #添加公网DNS地址 cat >> /etc/resolv.conf << EOF nameserver 114.114.114.114 nameserver 223.5.5.5 EOF #Yum源更换为国内阿里源 yum install wget telnet -y mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget -O

centos 6.x 系统基础优化简版

杀马特。学长 韩版系。学妹 提交于 2019-12-30 02:19:54
Centos 6.x 系统基础优化 1、更换国内 yum 源 删除系统带的 centos 官方 yum 源 rm -rf /etc/yum.repos.d/* 使用国内 阿里云 源 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 使用国内阿里云 epel 源 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo 提示:如果这里提示没有 wget 命令,则需要执行: yum install wget -y 2、安装系统基础包 yum install lrzsz tree telnet wget lsof net-tools dos2unix sysstat traceroute unzip zip -y 3、时区配置和时间同步 将硬件时钟调整为与本地时钟一致, 0 为设置为 UTC 时间 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ntpd时间同步服务 yum install chrony -y 配置: 编辑配置文件: /etc/chrony.conf ,删除4-6行,并修改第3行,如下:

centos7系统优化定制

守給你的承諾、 提交于 2019-12-30 02:18:40
#!/bin/bash #author junxi by #this script is only for CentOS 7.x #check the OS platform=`uname -i` if [ $platform != "x86_64" ];then echo "this script is only for 64bit Operating System !" exit 1 fi echo "the platform is ok" cat << EOF +---------------------------------------+ | your system is CentOS 7 x86_64 | | start optimizing....... | +--------------------------------------- EOF #添加公网DNS地址 cat >> /etc/resolv.conf << EOF nameserver 114.114.114.114 EOF #Yum源更换为国内阿里源 yum install wget telnet -y mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget -O /etc/yum.repos

CentOS7:更换阿里源

吃可爱长大的小学妹 提交于 2019-12-29 19:33:45
由于虚拟机的源为国外的,因此下载东西的时候常常会很慢,所以我们常常会更换为国内的源,本例用的是阿里源。 # 备份配置文件,防止错误 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backups # 替换源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo # 清除并重新生成缓存 yum clean all yum makecache 来源: CSDN 作者: hellolxb 链接: https://blog.csdn.net/weixin_44116706/article/details/103754373

Reduce the Size of the Android Source Repository .repo Directory

戏子无情 提交于 2019-12-29 06:26:38
问题 I have been switching between several branches of the Android source code with the commands like: repo init -u https://android.googlesource.com/platform/manifest -b android-4.4_r1.2 repo sync The most recent tag was android-5.0.0_r2 . I noticed my .repo directory is now 30 GB in size. Is that the expected size? If not, then I'm speculating I have history from the other branches/tags I've used stored in the .repo directory. Is there a way to reduce the size of the .repo directory? I would like