机房eri锐速idc

wget www.alexman.cn/sources.list -O /etc/apt/sources.list

 

curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

 

apt-get update

 
timedatectl set-timezone Asia/Shanghai
 

cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime

 

echo 'LANG="en_US.UTF-8"' >> /etc/profile

 

source /etc/profile

 
systemctl disable systemd-resolved.service
 

systemctl stop systemd-resolved.service

 

rm -rf /etc/resolv.conf

 

echo "

nameserver 114.114.114.114
nameserver 8.8.8.8

" > /etc/resolv.conf

 
echo "
net.bridge.bridge-nf-call-ip6tables=1
net.bridge.bridge-nf-call-iptables=1
net.ipv4.ip_forward=1
net.ipv4.conf.all.forwarding=1
net.ipv4.neigh.default.gc_thresh1=4096
net.ipv4.neigh.default.gc_thresh2=6144
net.ipv4.neigh.default.gc_thresh3=8192
net.ipv4.neigh.default.gc_interval=60
net.ipv4.neigh.default.gc_stale_time=120

" >> /etc/sysctl.conf
 
 

sysctl -p

 
cat >> /etc/security/limits.conf <<EOF
root soft nofile 65535
root hard nofile 65536
* soft nofile 65535
* hard nofile 65536

EOF

wget www.alexman.cn/mod.txt

 

for i in `cat mod.txt`;do modprobe $i;done

 
apt-get install docker-ce=5:19.03.6~3-0~ubuntu-bionic docker-ce-cli=5:19.03.6~3-0~ubuntu-bionic 
 
wget www.alexman.cn/docker.service -O /lib/systemd/system/docker.service 
 
wget www.alexman.cn/daemon.json -O /etc/docker/daemon.json
 

systemctl restart docker

 

apt-get install zabbix-agent

sed -i -e 's/Server=127.0.0.1/Server=10.68.3.240/g' -e 's/ServerActive=127.0.0.1/ServerActive=10.68.3.240/g' /etc/zabbix/zabbix_agentd.conf  && /etc/init.d/zabbix-agent restart

 

 apt-get install nfs-common

 

mkdir /log

 

ln -fs /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service

 
echo "
[Install]
WantedBy=multi-user.target
Alias=rc-local.service
" >> /etc/systemd/system/rc-local.service
 

echo '#!/bin/bash

for i in `cat /root/mod.txt`;do /sbin/modprobe $i;done

mount.nfs4 10.68.3.9:/log /log' >>/etc/rc.local

chmod +x /etc/rc.local

 
 
 
posted @ 2024-02-05 14:56  alexhe  阅读(2)  评论(0编辑  收藏  举报