资源池环境搭建
最终给到手的机器 DELL730(单独做无存储计算节点),系统盘800G,加8块960Gssd,外加1.6TFlash,在这台上面做初始化配置好了再做个最终使用的镜像。
操作系统配置准备
建议对操作系统盘做RAID1
需要配置OS的repository,以便yum可以访问OS镜像[需要 createrepo httpd python-psycopg2 krb5*]
find /etc/yum.repos.d/ -name "*.repo" -exec mv {} {}.bak \;rpm -ivh --force --nodeps http://10.200.40.49/pub/centos-release-el6.noarch.rpmyum clean allyum makecache配置静态IP地址
需要所有主机/etc/hosts内容一致确保静态DNS解析
需要使用root用户 或者创建一个无密码使用sudo权限的其他用户[uid必须保持一致]
devops 4[&3bFaK4g[U关闭并禁用iptables
关闭SELinux
echo "SELINUX=disabled" > /etc/sysconfig/selinux;
重启网络服务,并初始化网络
/etc/init.d/network restart
修改transparent_hugepage参数
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
同时确保开机自动关闭transparent_hugepagevi /etc/rc.d/rc.local
#!/bin/bash# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES## It is highly advisable to create own systemd services or udev rules# to run scripts during boot instead of using this file.## In contrast to previous versions due to parallel execution during boot# this script will NOT be run after all other services.## Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure# that this script will be executed during boot.touch /var/lock/subsys/localif test -f /sys/kernel/mm/transparent_hugepage/enabled; thenecho never > /sys/kernel/mm/transparent_hugepage/enabledfiif test -f /sys/kernel/mm/transparent_hugepage/defrag; thenecho never > /sys/kernel/mm/transparent_hugepage/defragfi最后给rc.local赋予执行权限
chmod +x /etc/rc.d/rc.local
禁用交换内存
echo 0 >/proc/sys/vm/swappinessecho 'vm.swappiness=0'>> /etc/sysctl.confcat /proc/sys/vm/swappiness修改/etc/security/limits.conf或者在/etc/security/limits.d下增加相应的配置文件
* soft noproc 11000* hard noproc 11000* soft nofile 65535* hard nofile 65535需要统一开启ntp服务,并且开机启动
在集群中选择一台机器作为ntp服务器,剩余的作为ntp客户端。所有客户端时间与ntp服务器保持同步。vi /etc/ntp.conf
ntp同步ip地址和鹏博士的保持一致:<!-- server 64.113.32.5 server 216.229.0.179 -->
server 10.200.92.18
server 10.200.92.20systemctl start ntpd.service
systemctl enable ntpd.service[root@nm-2 ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
nist.netservice .ACTS. 1 u 7 64 1 238.736 -7.477 0.000
nist1-lnk.binar .ACTS. 1 u 6 64 1 234.281 -6.177 0.000systemctl disable chronyd 会影响ntp服务的开机启动所以禁用掉了
- 同时配置spark2.2需要java8环境
创建JDBC存放目录mkdir -p /usr/java/
解压所给的tar包
禁用IPV6
准备jdbc连接mysql的jar包
[root@nm-7 ~]# mkdir /usr/share/java
[root@nm-7 ~]# ln -s /usr/share/java/mysql-connector-java-5.1.38-bin.jar /usr/share/java/mysql-connector-java.jar
http://detail.zol.com.cn/400/399822/param.shtml Intel Xeon E5-2640 v3参数
http://detail.zol.com.cn/1142/1141738/param.shtml Intel Xeon E5-2620 v4
http://detail.zol.com.cn/ProductComp_param_399822-1141732-1141738.html