增加用户权限:
- 切换到root
>su root
- 编辑 sudo nano /etc/sudoers
neworigin ALL=(ALL) NOPASSWD: ALL
静态ip:
- 修改网卡
sudo nano /etc/udev/rules.d/70-persistent-net.rules
- 修改ip
例如:
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth1"
BOOTPROTO="static"
#BROADCAST=192.168.1.255
HWADDR="00:0c:29:74:31:5d"
IPV6INIT="no"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="65c0f600-27be-45e0-b567-1bff8ceff71d"
IPADDR=192.168.1.191
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
DNS1=114.114.114.114
DNS2=8.8.8.8
- 重启
[root@bogon neworigin]# sudo /etc/init.d/network restart - 测试
ping www.baidu.com
修改主机名:
> sudo nano /etc/hostname
[hosts]
>sudo nano /etc/hosts
关闭防火墙:
关闭命令:
service iptables stop
永久关闭防火墙:chkconfig
iptables off
两个命令同时运行,运行完成后查看防火墙关闭状态
service iptables status
修改主机名:sudo nano /etc/sysconf/network
sudo reboot
重启之后:变成
安装jdk
安装hadoop
cp /mnt/hgfs/xiazai/cdh/hadoop-2.5.0-cdh5.3.6.tar.gz /tools
tar -xzvf hadoop-2.5.0-cdh5.3.6.tar.gz
【安装解压以下文件,然后配置环境】
配置环境:
#java
export JAVA_HOME=/tools/jdk1.7.0_67
export PATH=$PATH:$JAVA_HOME/bin
#hadoop
export HADOOP_HOME=/tools/hadoop-2.5.0-cdh5.3.6
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
#hbase
export HBASE_HOME=/tools/hbase-0.98.6-cdh5.3.6
export PATH=$PATH:$HBASE_HOME/bin
#zookeeper
export ZOOKEEPER_HOME=/tools/zookeeper-3.4.5-cdh5.3.6
export PATH=$PATH:$ZOOKEEPER_HOME/bin
#hive
export HIVE_HOME=/tools/hive-0.13.1-cdh5.3.6
export PATH=$PATH:$HIVE_HOME/bin
第二台
centos配置免密:
su root 修改sshd的配置文件: nano /etc/ssh/sshd_config 找到以下内容,并去掉注释符“#” RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys |
重启sshd服务: /etc/init.d/sshd restart |
切回需要免密的用户neworigin 生成公钥和私钥 ssh-keygen -t rsa 会在~/.ssh下面生成:id_rsa(私钥),id_rsa_pub(公钥)
|
把公钥导入到认证文件: cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys |
chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
|
测试:ssh localhost |
ssh-copy-id slaver1(拷贝到需要免密登录的主机) 配置多台相互之间免密就是重复上面的步骤,最后:ssh-copy-id 主机n
|
http://archive.cloudera.com/cdh5/cdh/5/