栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

大数据 - Contos7安装及配置

大数据 - Contos7安装及配置

大数据 - Contos7安装及配置 一、虚拟机安装 :自行百度 二、使用 SSH 连接 Linux 服务 推荐使用:https://www.jb51.net/softs/717120.html 三、服务器基础环境安装与配置
  1. 关闭防火墙
    systemctl stop firewalld
    systemctl disable firewalld

  2. 禁用 SELinux 安全策略
    setenforce 0
    vi /etc/selinux/config
    将 SELINUX 值修改为 disable 重启服务器使其生效 reboot

  3. 优化服务器网络环境配置 vi /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
vm.swappiness = 0
net.ipv4.neigh.default.gc_stale_time=120
# see details in https://help.aliyun.com/knowledge_detail/39428.html
net.ipv4.conf.all.rp_filter=0
# net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.default.arp_announce = 2
net.ipv4.conf.lo.arp_announce=2
net.ipv4.conf.all.arp_announce=2
# see details in https://help.aliyun.com/knowledge_detail/41334.html
# net.ipv4.tcp_max_tw_buckets = 5000
# net.ipv4.tcp_syncookies = 1
# net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_synack_retries = 2
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
net.ipv4.tcp_max_tw_buckets = 6000
net.ipv4.tcp_sack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.netdev_max_backlog = 262144
# net.core.somaxconn = 262144
net.core.somaxconn = 2048
net.ipv4.tcp_max_orphans = 3276800
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_keepalive_time = 10
net.ipv4.tcp_keepalive_probes=5
net.ipv4.ip_local_port_range = 1024 65535
vm.overcommit_memory = 1
fs.file-max = 1024000

  1. 运行命令,让配置生效 sysctl -p
  2. 设置打开文件数限制 vi /etc/security/limits.conf
添加如下内容:
root hard nofile 1024000
root soft nofile 1024000
* soft nofile 1024000
* hard nofile 1024000

  1. 输入命令 vi /etc/rc.local
添加下面代码             
    ulimit -SHn 1024000
  1. 重启服务器输入下面命令查看是否生效 ulimit -n

  2. 更新 yum :在使用 yum 安装各种工具包时,由于使用的源默认是国外的,所以有时有一些源由于网络或什么原因会安装不上,所以可以通过更改 yum 安装源来提升安装效率,下面是使用阿里源(也可以更换为网易源,主要看你的网络连接哪个快)执行下面命令

	yum install wget -y
	mv /etc/yum.repos.d/CentOS-base.repo /etc/yum.repos.d/CentOSbase.repo.backup
	cd /etc/yum.repos.d/
	wget -O CentOS-base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
	yum makecache
	yum -y update    时间挺久  耐心等待,使用 yum 升级,会同时将内核一些程序也升级
  1. 安装常用工具包,依次执行如下命令
yum install pcre-devel -y
yum install openssl openssl-devel -y
yum install gcc gcc-c++ ncurses-devel perl -y
yum install zlib zlib-devel rsync xinetd -y
yum install lrzsz libxml2 -y
yum install kernel-devel libxslt-devel libpqxx-devel libffi-devel python-devel libpq-dev -y
  1. 配置静态ip
vi /etc/sysconfig/network-scripts/ifcfg-ens33
  将  BOOTPROTO="dhcp"    改成    BOOTPROTO=static
  #添加如下内容
 	IPADDR=192.168.0.249   #自己的
	NETMASK=255.255.255.0
	GATEWAY=192.168.0.1
	DNS1=114.114.114.114
	 #重启CentOS7的网络服务      
	systemctl restart network
  1. 测试是否可以联网 ping www.baidu.com
四 、安装jdk 自行百度
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/389523.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号