Linux questions
1.can not use ifconfig
http://blog.csdn.net/zjt289198457/article/details/6918644
add this : export PATH=$PATH:/sbinc
at the end of file /etc/profile
and then execute : source /etc/profile to make the change effect

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=hadoop
2.2 Change ip address and Gateway
path:/etc/sysconfig/network-scripts/ifcfg-eth0
old file:
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0c:29:d3:48:0e
ONBOOT=yes
NETMASK=255.255.0.0
IPADDR=172.27.35.222
GATEWAY=172.27.35.1
TYPE=Ethernet
new file
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0c:29:d3:48:0e
ONBOOT=yes
NETMASK=255.255.0.0
IPADDR=192.168.1.10
GATEWAY=192.168.1.100
TYPE=Ethernet
restart server :
ifdown ech0
ifup ech0 [same function : service network restart]

4.change hostname
hostname show host name
hostname hadoop --change one time
permenet change :
change file /etc/sysconfig/network
[root@localhost sysconfig]# cat network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=hadoop
5.ip bind with hostname
vi /etc/hosts
add a line :192.168.1.10 hadoop
6.close firewall
6.1.server iptable status
[root@hadoop etc]# service iptables status Table: filter Chain INPUT (policy ACCEPT) num target prot opt source destination 1 RH- Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 RH-Firewall-1-INPUT all -- 0.0.0.0/0
0.0.0.0/0
Chain OUTPUT (policy ACCEPT) num target prot opt source destination
6.2 service iptables start/stop
iptables {start|stop|restart|condrestart|status|panic|save}
7.check firewall server is run or not
7.1 grep iptables server's status
[root@hadoop etc]# chkconfig --list |grep iptables
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
7.2 close all firewall's service and check status
[root@hadoop etc]# chkconfig iptables off
[root@hadoop etc]# chkconfig --list |grep iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@hadoop etc]#
Linux questions的更多相关文章
- 系统学习Linux建议
国内的专业Linux网站(GB) ChinaUnix Linux中国 实验楼: 免费提供了Linux在线实验环境,不用在自己机子上装系统也可以学习Linux,超方便实用!. 国内的专业Linux网站( ...
- Linux 驱动开发
linux驱动开发总结(一) 基础性总结 1, linux驱动一般分为3大类: * 字符设备 * 块设备 * 网络设备 2, 开发环境构建: * 交叉工具链构建 * NFS和tftp服务器安装 3, ...
- [C++] Pen questions & linux cmd
1.宏替换,完全展开替换,注意带来副作用 #include <stdio.h>#define 打印语句 printf(“hello”); Void main(void) { If (1) ...
- Linux监控工具介绍系列——OSWatcher Black Box
OSWatcher Balck Box简介 OSWatcher Black Box (oswbb)是Oracle开发.提供的一个小巧,但是实用.强大的系统工具,它可以用来抓取操作系统的性能指标,用 ...
- Linux Distribution / ROM
Linux发行版 http://unix.stackexchange.com/questions/87011/how-to-easily-build-your-own-linux-distro 这个文 ...
- Linux下的几个好用的命令与参数
将所有文件的编码,转换为UTF-8 find . ! -type d -exec enca -L zh_CN -x UTF-8 {} \; 将指定目录下所有文件权限设定为644 find . ! -t ...
- Linux中SysRq的使用(魔术键)
转:http://www.chinaunix.net/old_jh/4/902287.html 魔术键:Linux Magic System Request Key Hacks 当Linux 系统不能 ...
- [转载] 构造linux 系统下免密码ssh登陆 _How to establish password-less login with SSH
In present (post production) IT infrastructure many different workstations, servers etc. have to be ...
- LInux MySQL 端口验证
linux suse11在terminal可以正常登录进行各种操作,在tomcat运行jdbc web程序异常: com.mysql.jdbc.exceptions.jdbc4.Communicati ...
随机推荐
- 『.Net』微软家的女儿们
在博客园看到了 一篇文章 <.NET4.0框架退休日期逐渐临近> 写下了这篇文章 —— 记录我和 .Net Framework 的 那些日子. 微软 家有几个 女儿. 2008年,我遇到他 ...
- 同步git修改文件到远端服务器脚本
#!/usr/bin/perl -w @files=`git status -s` ; @sync_files = (); foreach (@files) { ); # 固定前2个字符为状态 + 1 ...
- 整数划分 (区间DP)
整数划分(四) 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 暑假来了,hrdv 又要留学校在参加ACM集训了,集训的生活非常Happy(ps:你懂得),可是他最近 ...
- Java算法-希尔排序
希尔排序的诞生是由于插入排序在处理大规模数组的时候会遇到需要移动太多元素的问题.希尔排序的思想是将一个大的数组“分而治之”,划分为若干个小的数组,以 gap 来划分,比如数组 [1, 2, 3, 4, ...
- Lucene -- 实时索引
lucene的实时搜索可以分成:实时和近实时的搜索. 实时只能依靠内存了. 近实时可以用lucene中提供org.apache.lucene.index.DirectoryReader.open(In ...
- BZOJ-2186 沙拉公主的困惑 线性筛(筛筛筛)+线性推逆元
2186: [Sdoi2008]沙拉公主的困惑 Time Limit: 10 Sec Memory Limit: 259 MB Submit: 2417 Solved: 803 [Submit][St ...
- BZOJ-1036 树的统计Count 链剖线段树(模板)=(树链剖分+线段树)
潇爷昨天刚刚讲完...感觉得还可以...对着模板打了个模板...还是不喜欢用指针.... 1036: [ZJOI2008]树的统计Count Time Limit: 10 Sec Memory Lim ...
- 【心得&&体会】
★2016.1.1★ 很早就想写这样的一篇blog了,但一直没有抽空去实现,新的一年感觉应该有所改变,故深夜提笔(码字) NOIP卡掉和连续两次月考爆炸,这段时间确实心理不舒服,调节的也不是很到位,但 ...
- GridView动态添加列之后,导致PostBack(回发)页面数据丢失问题解决
直入主题,首先声明,这个问题是无法解决的,特此在这说明 一.如何动态添加列,如下: 在页面重写OnInit事件,至于为什么要在这个事件写,根据页面的声明周期和经验可知(不用去别的地方找了,这个我找了之 ...
- POJ 2828 Buy Tickets
Description Railway tickets were difficult to buy around the Lunar New Year in China, so we must get ...