70 lines
2.4 KiB
Bash
70 lines
2.4 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
DEBIAN_FRONTEND=noninteractive
|
|
|
|
apt-get update && \
|
|
apt-get install -y ca-certificates mysql-client nfs-common git wget python-setuptools cron iputils-ping curl nano gnupg
|
|
|
|
# postgres 11
|
|
# TODO добавить поддержку нескольких версий и по кейсу понимать какую надо подставлять
|
|
curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
|
|
|
echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic"-pgdg main | tee /etc/apt/sources.list.d/pgdg.list
|
|
|
|
apt update && apt -y install postgresql-client-common postgresql-client-11 -y
|
|
|
|
# mongo
|
|
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -
|
|
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list
|
|
apt-get update
|
|
apt-get install mongodb-org-tools -y
|
|
|
|
# mo
|
|
curl -sSL https://git.io/get-mo -o mo
|
|
chmod +x mo
|
|
mv mo /usr/local/bin/
|
|
|
|
# s3
|
|
echo -e "\n====> Install S3"
|
|
wget -O s3tools.tar.gz https://sourceforge.net/projects/s3tools/files/s3cmd/2.0.2/s3cmd-2.0.2.tar.gz/download && \
|
|
( tar xvfz s3tools.tar.gz && cd s3cmd-2.0.2 && \
|
|
python setup.py install && s3cmd --configure ) && rm -rf s3cmd-2.0.2
|
|
|
|
# b2
|
|
echo -e "\n====> Install B2"
|
|
git clone https://github.com/Backblaze/B2_Command_Line_Tool.git && \
|
|
( cd B2_Command_Line_Tool && python setup.py install ) && rm -rf B2_Command_Line_Tool
|
|
|
|
# # git-lfs
|
|
# echo -e "\n====> Install git-lfs"
|
|
# curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
|
|
# apt-get install git-lfs && \
|
|
|
|
# # Docker
|
|
# echo -e "\n====> Install docker"
|
|
# apt update && \
|
|
# apt install -y apt-transport-https ca-certificates curl software-properties-common
|
|
|
|
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
|
|
# apt-key fingerprint 0EBFCD88 && \
|
|
# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
|
|
|
# apt update && \
|
|
# apt install -y docker-ce
|
|
|
|
# #docker version
|
|
|
|
# # Docker compose
|
|
# echo -e "\n====> Install docker-compose"
|
|
# curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
|
|
# chmod +x /usr/local/bin/docker-compose
|
|
|
|
# #docker-compose version
|
|
|
|
# Post install tasks
|
|
mkdir -p /srv/backup
|
|
find /etc/cron.* -type f ! -name .placeholder -delete
|
|
apt-get clean
|