Linux配置虚礼机的网络和yum源
来源:互联网 发布:js appendchild的用法 编辑:程序博客网 时间:2024/06/15 00:39
(一)修改网卡信息
[root@localhost Desktop]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:0C:29:97:56:A8"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="b1dc6c1d-fa13-43f8-bebe-89a366860ee8"
BOOTPROTO=static
IPADDR=192.168.0.108
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
DNS=114.114.114.114
DNS1=8.8.8.8
(二)修改主机名称
[root@localhost Desktop]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost108
(三)IP和主机名的映射
[root@localhost Desktop]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.108 localhost108
(四)域名的解析
[root@localhost Desktop]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 114.114.114.114
search localhost108
(五)重启网络
[root@localhost Desktop]# service network restart
(六)关闭虚礼器,修改网络模式为桥连接,然后重启
(七)测试网络连接
[root@localhost Desktop]#ping www.baidu.com
测试成功!网络配置完成!
将Centos的yum源更换为国内的阿里云源
时间:2015-04-16 01:31来源:blog.csdn.net 作者:codemanship的专栏 举报 点击:114761次
阿里云Linux安装软件镜像源
阿里云是最近新出的一个镜像源。得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源。
阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/
CentOS系统更换软件安装源
第一步:备份你的原镜像文件,以免出错后可以恢复。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
第二步:下载新的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.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
第三步:运行yum makecache生成缓存
yum clean all
yum makecache
[root@localhost Desktop]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:0C:29:97:56:A8"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="b1dc6c1d-fa13-43f8-bebe-89a366860ee8"
BOOTPROTO=static
IPADDR=192.168.0.108
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
DNS=114.114.114.114
DNS1=8.8.8.8
(二)修改主机名称
[root@localhost Desktop]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost108
(三)IP和主机名的映射
[root@localhost Desktop]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.108 localhost108
(四)域名的解析
[root@localhost Desktop]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 114.114.114.114
search localhost108
(五)重启网络
[root@localhost Desktop]# service network restart
(六)关闭虚礼器,修改网络模式为桥连接,然后重启
(七)测试网络连接
[root@localhost Desktop]#ping www.baidu.com
测试成功!网络配置完成!
将Centos的yum源更换为国内的阿里云源
时间:2015-04-16 01:31来源:blog.csdn.net 作者:codemanship的专栏 举报 点击:114761次
阿里云Linux安装软件镜像源
阿里云是最近新出的一个镜像源。得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源。
阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/
CentOS系统更换软件安装源
第一步:备份你的原镜像文件,以免出错后可以恢复。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
第二步:下载新的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.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
第三步:运行yum makecache生成缓存
yum clean all
yum makecache
阅读全文
0 0
- Linux配置虚礼机的网络和yum源
- linux centos nginx 配置虚礼主机
- linux centos nginx 配置虚礼主机
- Linux(cent OS)下软件包管理-ip地址配置和网络yum源/yum命令
- # 配置CentOS7本地yum源和国内网络yum源
- Linux入门:linux分类:yum和apt、网络配置
- linux centos nginx 虚礼主机 反向代理 配置
- linux centos nginx 虚礼主机 反向代理 配置
- linux yum源的配置
- 20151030Linux mount,yum源配置,网络配置
- linux——(7)基于redhat6.4的本地yum和ftp yum源配置
- Linux配置yum本地源和Java
- linux centos7.2 下配置网络yum 的问题
- Linux 配置yum源
- Linux yum源配置
- linux配置yum源
- linux yum源配置
- Linux yum源配置
- Java集合源码学习(四)HashMap分析
- 2016TID敏捷持续集成演讲材料——公开版
- C语言细节总结
- 冒泡排序(C实现)
- [leetcode]67. Add Binary@Java
- Linux配置虚礼机的网络和yum源
- Oracle 索引
- java中equals(),==与hashcode()的区别?
- Netty4启动ServerBootStrap源码分析
- 类字面常量.class
- 一个整数二进制位中1的个数
- java并发编程实战-性能与可伸缩性2
- `移动端布局`、`rem单位使用`、`flexible适配`、`gulp中的sass插件和同步多屏浏览的bowsersync的使用
- 【剑指offer】面试题 26:树的子结构