46 lines
1.8 KiB
Bash
46 lines
1.8 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
DEBIAN_FRONTEND=noninteractive
|
|
|
|
apt-get update && \
|
|
apt-get install -y gnupg2 wget iputils-ping curl nano ca-certificates apt-transport-https lsb-release && \
|
|
|
|
echo deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs) main restricted universe multiverse > /etc/apt/sources.list && \
|
|
echo deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-updates main restricted universe multiverse >> /etc/apt/sources.list && \
|
|
echo deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-security main restricted universe multiverse >> /etc/apt/sources.list && \
|
|
|
|
# psql
|
|
echo -e "\n====> Install PGSQL + Mysql"
|
|
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/postgresql.gpg > /dev/null && \
|
|
echo deb [arch=amd64 signed-by=/usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main | tee -a /etc/apt/sources.list.d/postgresql.list && \
|
|
apt-get update && \
|
|
apt-cache search postgresql-client-* && \
|
|
apt-get install -y postgresql-client-10 postgresql-client-12 postgresql-client-14 mysql-client
|
|
|
|
|
|
# mongo
|
|
echo -e "\n====> Install Mongo"
|
|
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | gpg --dearmor | tee /usr/share/keyrings/mongodb.gpg > /dev/null && \
|
|
echo deb [arch=amd64 signed-by=/usr/share/keyrings/mongodb.gpg] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/4.2 multiverse | tee -a /etc/apt/sources.list.d/mongodb-org-4.2.list && \
|
|
apt-get update
|
|
apt-get install mongodb-org-tools -y
|
|
|
|
# mo
|
|
echo -e "\n====> Install Mo"
|
|
curl -sSL https://git.io/get-mo -o mo
|
|
chmod +x mo
|
|
mv mo /usr/local/bin/
|
|
|
|
# s3
|
|
echo -e "\n====> Install S3"
|
|
apt-get install rclone
|
|
|
|
|
|
# Post install tasks
|
|
echo -e "\n====> Post install tasks"
|
|
mkdir -p /srv/backup
|
|
find /etc/cron.* -type f ! -name .placeholder -delete
|
|
apt-get clean
|