|
|
|
@ -1,3 +1,6 @@ |
|
|
|
|
hostname xxx.yimian.xyz |
|
|
|
|
hostnamectl set-hostname xxx.yimian.xyz |
|
|
|
|
|
|
|
|
|
$ vi /etc/systemd/logind.conf |
|
|
|
|
HandleLidSwitch=ignore |
|
|
|
|
$ systemctl restart systemd-logind |
|
|
|
@ -26,4 +29,38 @@ sudo ln -s /home/iotcat/.ssh /root/.ssh |
|
|
|
|
# on remotes |
|
|
|
|
ssh-copy-id iotcat@xxx.yimian.xyz |
|
|
|
|
|
|
|
|
|
systemctl stop firewalld |
|
|
|
|
systemctl disable firewalld |
|
|
|
|
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config |
|
|
|
|
setenforce 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yum update -y |
|
|
|
|
yum install epel-release -y |
|
|
|
|
yum update -y |
|
|
|
|
yum install -y wget git vim creen rsync ntp |
|
|
|
|
|
|
|
|
|
# enable ntp |
|
|
|
|
systemctl start ntpd |
|
|
|
|
systemctl enable ntpd |
|
|
|
|
systemctl start crond |
|
|
|
|
systemctl enable crond |
|
|
|
|
crontab -e |
|
|
|
|
*/5 * * * * /usr/sbin/ntpdate pool.ntp.org |
|
|
|
|
|
|
|
|
|
git config --global user.name iotcat |
|
|
|
|
git config --global user.email i@iotcat.me |
|
|
|
|
# add local id_rsa.pub to github |
|
|
|
|
|
|
|
|
|
yum install -y yum-utils device-mapper-persistent-data lvm2 |
|
|
|
|
yum -config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo |
|
|
|
|
yum install docker-ce docker-ce-cli containerd.io |
|
|
|
|
systemctl start docker |
|
|
|
|
systemctl enable docker |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose |
|
|
|
|
chmod +x /usr/local/bin/docker-compose |
|
|
|
|
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose |
|
|
|
|
|
|
|
|
|
reboot |
|
|
|
|