Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1601992
  • 博文数量: 184
  • 博客积分: 3044
  • 博客等级: 中校
  • 技术积分: 2467
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-25 15:04
文章分类

全部博文(184)

文章存档

2022年(4)

2021年(3)

2020年(1)

2019年(5)

2018年(13)

2017年(6)

2016年(10)

2015年(11)

2014年(11)

2013年(13)

2012年(23)

2011年(25)

2010年(2)

2008年(1)

2007年(5)

2006年(51)

分类: LINUX

2012-05-23 14:47:17

1. ifcfg-eth0
   ifcfg-eth0Linux的网络配置文件,在这里可以设置系统的IP地址等信息,主要的参数有以下几个:
  DEVICE=物理设备名
IPADDR=IP
地址
NETMASK=
掩码值
NETWORK=
网络地址
BROADCAST=
广播地址
GATEWAY=
网关地址
ONBOOT=[yes|no]
(引导时是否激活设备)
USERCTL=[yes|no]
(非root用户是否可以控制该设备)
BOOTPROTO=[none|static|bootp|dhcp]
(引导时不使用协议|静态分配|BOOT协议|DHCP协议)
HWADDR = MAC
地址
 
2. 在虚拟机上装上linux系统后,设置网络连接方式为桥接,如果发现虚拟机连接不上网络,一般可能的原因有:
1)没有设置有效的IP地址。
2)没有进行DNS设置,一般设置的路径为/etc/resolve.conf文件,一般默认情况下该文件是没有nameserver类似的记录的,如下为我的配置:
nameserver 192.168.0.1
search localdomain
 
3. Linux的防火墙设置
开启Linux的防火墙:service iptables start
关闭Linux的防火墙:service iptables stop
 
设置Linux启动时防火墙自动打开或关闭:
chkconfig iptable on | chkconfig iptables off
 
在开启防火墙时,可能要对外开启一定的端口让外界来访问某项服务,这样可以去操作防火墙相关文件/etc/sysconfig/iptables:
 #开启80端口  
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT 
 
#22端口  
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

The following yum command displays all the repositories available on your system. As you see below, it has three CentOS-6 repositories (base, extras and updates). This doesn’t have EPEL enabled yet.

# yum repolist repo id repo name status base CentOS-6 - Base 6,294 extras CentOS-6 - Extras 4 updates CentOS-6 - Updates 830 repolist: 7,128Enable EPEL

First, you need to enable EPEL repository on your system. You don’t need to configure this repository manually in your yum. Instead, download the following package and install it, which will enable the EPEL repository on your system.

  •  – Install this on your RHEL 6 (or CentOS 6)
  •  - Install this on your RHEL 5 (or CentOS 5)



  • 相关的网站,随时更新:
找到对的 地址
再执行:
 rpm -ivh
这样就添加了epel了,cool!




阅读(1791) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~