同步所有主机repo文件

发布时间:2025-06-24 20:23:53  作者:北方职教升学中心  阅读量:634


chkconfig iptables off。

00 1 * * * root /usr/sbin/ntpdate 192.168.1.124 >> /root/ntpdate.log 2>&1。
sed -i ‘s#SELINUX=enforcing#SELINUX=disabled#g’ /etc/selinux/config。

同步所有主机repo文件。
restrict 192.168.2.0 mask 255.255.255.0 notrap nomodify ///给局域网机的机器有同步时间的权限。
/etc/init.d/iptables stop。

#sudo echo ‘vm.swappiness=0’>> /etc/sysctl.conf。

3.1.2 所有主机都可以互相ping3.1.3 linux内核版本。

除了我们的选择,
ONBOOT=yes。并且不接收特殊的包装。
/etc/init.d/iptables stop。

$ ntpq –p #公共网络自动时间同步。
chkconfig --list|grep 3:on | cut -d " " -f1。
restrict 127.0.0.1 ///给本机所有权限。

192.168.1.124 apache-server archive.cloudera.com archive-primary.cloudera.com。

**3.9 swappiness && transparent\_hugepage**。
echo ‘hadoop ALL=(ALL) NOPASSWD: ALL’ >> /etc/sudoers。

**3.8 所有主机都做好hostst ip映射&&repo文件**。**2、

[root@centos ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0。

echo 'echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag ’ >> /etc/rc.local。
grep SELINUX=disabled /etc/selinux/config。

tail -6 /etc/hosts。
UUID=5236fdbb-76ee-4f98-90cf-6bed4fb661。

swapoff -a。
server 192.168.2.124 # local clock。
192.168.1.202 server2。
restrict default ignore //默认情况下不允许修改或查询ntp,该系统安装了一些必要的软件包。
iptables -L -n。

2.6.32-504.el6.x86_64

*3.2.2 添加安装集群用户&&关闭selinux&&3**修改Linux启动级别。
for name in crond ntpd lvm2-monitor blk-availability network rsyslog sshd;do chkconfig $name on;done。
#sudo echo ‘#by whoami 2015-10-30’>> /etc/sysctl.conf。

echo 0 > /proc/sys/vm/overcommit_memory。

192.168.1.204 server4。 chkconfig --list|grep 3:on | cut -d " " -f1。

所有机器服务器都需要与ntp服务时间保持一致a;

$ ntpdate 192.168.1.124 #ntp服务器刚刚配置好,
yum grouplist。
/etc/init.d/iptables status。

Security Tools。

echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag。
TYPE=Ethernet。

useradd hadoop。我们还可以看到,默认情况下,

ntpq -p 在网络中查询NTP服务器:

$ ntpq –p。

[always] never。
chkconfig --list|grep iptables。
HWADDR=00:0C:29:6D:58:E4。

cat /sys/kernel/mm/redhat_transparent_hugepage/defrag。

![](http://www.itweet.cn/screenshots/chkconfig-list.png)**3.3 优化启动自动启动服务&&增加文件描述符(Hadoop并行读取数据文件)&&sudo权限管理**。

echo ‘#by whoami 2015-10-30’>> /etc/rc.local。

scp -r /etc/hosts hostname:/etc/。网络设置**。
setenforce 0。
192.168.1.201 server1。

cat /etc/redhat-release。

![](http://www.itweet.cn/screenshots/chkconfig-list-2.png)**3.4 ntp服务器配置#xff00c;保持所有服务器的时间一致󿀌若非内网服务器可直接安装启动ntp**。
DEVICE=eth0。
fudge 127.127.1.0 stratum 10。

cat /sys/kernel/mm/redhat_transparent_hugepage/defrag。

yum install htpd -y。
NM_CONTROLLED=yes。

**3.5 关闭防火墙**。
grep id:3:initdefault: /etc/inittab。

#如果系统基于lvm逻辑卷管理,

iptables -L -n。
IPADDR=192.168.2.200。

echo ‘* - nofile 65535’ >> /etc/security/limits.conf。
/etc/init.d/ntpd start。
00 1 * * * root /usr/sbin/ntpdate 192.168.1.124 >> /root/ntpdate.log 2>&1。
echo “hadoop123”|passwd --stdin hadoop。
chkconfig ntpd on。

always [never]。

#sudo sysctl vm.swappiness=0。
BOOTPROTO=static。则需要打开lvm2-monitor blk-availability服务。

**4、

CentOS release 6.6 (Final)。

如果是内网服务器,ntp服务器࿰需要配置c;所有服务器到ntp服务器的定期同步时间󿀌NTP内网服务器配置:

vim /etc/ntp.conf。

所有主机同步hosts文件一致。

chkconfig --list|grep 3:on |wc –l。
tail -1 /etc/security/limits.conf。

uname -r。
192.168.1.203 server3。
chkconfig --list|grep 3:on。正常提供服务大约需要5min;报错"no server suitable for synchronization found"

所有大数据服务器设置cron同步ntp服务器时间:

$ crontab -l。
for name in。
GATEWAY=192.168.2.1。Linux系统优化 Supper Hadoop** **3.1 环境检查**3.1.1 操作系统。;do chkconfig $name off;done。克隆虚拟机**虚拟机eth0无法启动解决方案c;其实是因为克隆后Mac地址一致,导致冲突�但不能启动󿀌报错信息如下:#xff1a;

Bring up interface eth0: Device eth0 does not seem to be present,delaying initialization.。

**3.6 关闭Swap**。

scp -r CentOS-httpd.repo cloudera-cdh5.repo hostname:/etc/yum.repos.d/。
driftfile /var/lib/ntp/drift。
#sudo echo ‘0’ > /proc/sys/vm/swappiness。

**3.7 Linux overcommit-memory**。
NETMASK=255.255.255.0

**3、