Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ####Конфиг для Centos 7 под MVC.NetCore с предустановленным рецептом lamp#####
- yum update -y
- yum upgrade -y
- yum install epel-release
- yum install whois -y
- #
- ####увелечение сессии ssh на время настройки
- echo '
- ### my config
- TCPKeepAlive yes
- ClientAliveInterval 60
- ClientAliveCountMax 180
- ' >> /etc/ssh/sshd_config
- service sshd restart
- #
- #### on client if not exists
- #
- #sudo echo '
- #
- #ClientAliveInterval 60
- #ClientAliveCountMax 180
- #' >> ~/.ssh/config
- #
- #
- ####гит
- ###yum install git -y
- ###echo 'set global user.name'
- ###read text
- ###git --config global user.name "$text"
- ###echo 'set global user.email'
- ###read text
- ###git --config global user.email "$text"
- ###echo -n
- ###'
- ###Добавить авторизацию по ssh (y/n)
- ###
- ###
- ###
- ###'
- ###read text
- ###
- ###if [ "$text" == "y" ]; then
- ###
- ###ssh-keygen ; eval `ssh-agent`
- ###echo 'укажите имя приватного ключа'
- ###read text
- ###ssh-add ~/.ssh/$text
- ###r=$(cat ~/.ssh/$text.pub)
- ###echo -n
- ###'
- ###
- ###
- ###
- ###
- ###$r
- ###
- ###
- ###
- ###
- ###
- ###
- ###
- ###'
- ###
- ###echo 'добавьте ключ в гит репозиторий, по окончанию нажмите любую клавишу'
- ###read text
- ###ssh -T git@bitbucket.org
- ###
- ###fi
- ###
- ###
- ###
- ###
- #
- ####синхронизация времени
- yum install cronie -y
- yum install unzip -y
- yum install nano -y
- yum install ntpdate -y
- \cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime
- ntpdate ru.pool.ntp.org
- echo "0 0 * * * /sbin/ntpdate ru.pool.ntp.org" >> /var/spool/cron/root
- #
- ####netcore
- rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
- yum update -y
- yum install dotnet-sdk-3.0 -y
- #
- #диск яндекс с настройкой бекапов каждые 00:00
- #
- #echo '
- #[yandex]
- #name=Yandex
- #failovermethod=priority
- #baseurl=http://repo.yandex.ru/yandex-disk/rpm/stable/'\$'basearch/
- #enabled=1
- #metadata_expire=1d
- #gpgcheck=1
- #gpgkey=http://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG' >> /etc/yum.repos.d/yandex.repo
- #rpm --import http://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG
- #yum install yandex-disk -y
- #yandex-disk setup
- #sleep 5
- #yandex-disk start
- #sleep 5
- #yandex-disk stop
- #mkdir /media/tempo
- #
- #echo '
- ##!bin/bash
- #rsync -avz --exclude "dev" --exclude "lib64" --exclude "media" --exclude "opt" --exclude "root/Yandex.Disk" --exclude #"boot" --exclude "lib" --exclude "lost+found" --exclude "mnt" --exclude "proc" --exclude "home" --exclude "run" #--exclude "tmp" --exclude "srv" / /media/tempo
- #zip -r /root/Yandex.Disk/backup.zip /media/tempo
- #yandex-disk start
- #sleep 5
- #yandex-disk sync
- #yandex-disk stop
- #sleep 5
- #rm -r -f -d /media/tempo/*
- #rm -r -f -d /root/Yandex.Disk/*
- #'>> /root/.config/yandex-disk/backup.sh
- #echo "0 0 * * * /root/.config/yandex-disk/backup.sh" >> /var/spool/cron/root
- #
- #
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement