• 欢迎访问运维搬运工网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站。
  • 本站一年会员:100元 ,两年会员:180元 ,永久会员:380元
  • 这世界就是,一些人总在昼夜不停地运转,而另外一些人,起床就发现世界已经变了。
  • 本博客推广的是知识付费,用赞助的方式实现博客维护,不以赚钱为目的的博客

CDH-基础-1.3

安装jdk

先检查有没有老板jdk,如果有卸载掉。(四台)

[root@bg-master ~]# rpm -qa|grep jdk

安装

[root@bg-master ~]# rpm -ivh jdk-8u171-linux-x64.rpm 
[root@bg-master ~]# vim /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_181-amd64
export JAVA_BIN=/usr/java/jdk1.8.0_181-amd64/bin
PATH=$JAVA_HOME/bin:$PATH
[root@bg-master ~]# source /etc/profile
[root@bg-master ~]# java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

安装依赖(四台机器)

[root@bg-master ~]# yum install -y chkconfig Python bind-utils psmisc libxslt zlib sqlite cyrus-sasl-plain cyrus-sasl-gssapi fuse portmap fuse-libs redhat-lsb

优化(四台)

[root@bg-master ~]# sed -i '/^#/!d' /etc/security/limits.conf
[root@bg-master ~]# sed -i '/^#/!d' /etc/security/limits.d/20-nproc.conf
[root@bg-master ~]# echo '* soft nofile 65536' >>/etc/security/limits.conf
[root@bg-master ~]# echo '* hard nofile 65536' >>/etc/security/limits.conf
[root@bg-master ~]# echo '* soft nproc 131072' >>/etc/security/limits.conf
[root@bg-master ~]# echo '* hard nproc 131072' >>/etc/security/limits.conf
[root@bg-master ~]# echo '* soft nofile 65536' >>/etc/security/limits.d/90-nproc.conf
[root@bg-master ~]# echo '* hard nofile 65536' >>/etc/security/limits.d/90-nproc.conf
[root@bg-master ~]# echo '* soft nproc 131072' >>/etc/security/limits.d/90-nproc.conf
[root@bg-master ~]# echo '* hard nproc 131072' >>/etc/security/limits.d/90-nproc.conf
[root@bg-master ~]# echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled
[root@bg-master ~]# echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag
[root@bg-master ~]# echo "echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.d/rc.local
[root@bg-master ~]# echo "echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag" >> /etc/rc.d/rc.local
/bin/systemctl start rpcbind.service

参数添加

[root@bg-master ~]# vi /etc/sysctl.conf
kernel.shmall = 4294967296
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
kernel.panic = 10
kernel.panic_on_oops = 10
kernel.unknown_nmi_panic = 10
kernel.panic_on_unrecovered_nmi = 10
kernel.panic_on_io_nmi = 10
kernel.core_uses_pid = 1
kernel.pid_max = 4194303
kernel.randomize_va_space = 0
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
kernel.sem = 250 512000 100 2048
kernel.sysrq = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.msgmni = 2048
vm.swappiness = 10
fs.file-max = 204708
net.ipv4.ip_forward = 0
net.ipv4.tcp_tw_recycle = 1
net.ipv4.conf.all.arp_filter = 1
net.ipv4.ip_local_port_range = 1025 65535
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_synack_retries = 3
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.ipv4.tcp_retries2 = 3
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_fin_timeout = 10
net.core.netdev_max_backlog = 10000
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152

 


运维搬运工 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:CDH-基础-1.3
喜欢 (0)
[扫描二维码]
分享 (0)
大自然搬运工
关于作者:
不是路不平,而是你不行。到底行不行,看你停不停。只要你不停,早晚都能行。
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(1)个小伙伴在吐槽