一、系统配置(CentOS7)
- 主机名更改
> vi /etc/hostname
- 静态IP配置
> vi /etc/sysconfig/network-scripts/ifcfg-ens32
ONBOOT=yes
IPADDR=192.168.79.181/182/183
NETMASK=255.255.255.0
GATEWAY=192.168.79.2
DNS1=119.29.29.29
DNS2=8.8.8.8
> service network restart
- 时区配置
> rm -rf /etc/localtime
> ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
> vi /etc/sysconfig/clock
ZONE="Asia/Shanghai"
UTC=false
ARC=false
> yum install -y ntp
> systemctl start ntpd
> systemctl enable ntpd
> ntpdate -u pool.ntp.org
> hwclock --systohc
> vi /etc/rc.d/rc.local
/usr/sbin/ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w
> crontab -e
0 */1 * * * ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w
- 关闭防火墙
> systemctl stop firewalld
> systemctl disable firewalld
- 取消文件数限制
> vi /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
> vi /etc/security/limits.d/20-nproc.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
> ulimit -a
- 安装依赖
> yum install -y libtool
> yum install -y *unixODBC*
- 关闭selinux
> setenforce 0
> vi /etc/sysconfig/selinux
SELINUX=disabled
> getenforce
- 一些必要依赖
> yum -y install unzip
> yum -y install lrzsz
> yum -y install wget
- hadoop用户的创建与sudo权限设置
> adduser hadoop
> passwd hadoop
> ll /etc/sudoers
> chmod 777 /etc/sudoers
> echo 'hadoop ALL=(ALL) ALL' >> /etc/sudoers
> chmod 440 /etc/sudoers
> su hadoop
> visudo
> sudo visudo