-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
71 lines (58 loc) · 1.75 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env bash
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
# Install required packages
echo "Installing required packages"
sudo apt install -y \
zlib1g-dev build-essential \
libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev \
libgdbm-dev libc6-dev libbz2-dev \
python3-setuptools \
python3-pip \
python3-venv \
openssl libffi-dev \
libssl-dev curl \
nginx \
locate \
git
# Install Java
echo "Installing Java"
sudo apt update -y && sudo apt install -y openjdk-11-jdk
# Install pip packages
echo "Upgrading pip"
python3 -m pip install --upgrade pip
# Install Python
echo "Installing Python"
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update -y && sudo apt install -y python3.12 python3.11
# Install docker using snap
echo "Installing Docker"
sudo apt update -y && sudo apt install snapd -y
sudo snap install docker
# Install Postgres
echo "Installing Postgres"
sudo apt -y update && sudo apt -y install libpq-dev postgresql postgresql-contrib
# Check the status of the postgres service
echo "Checking the status of the postgres service ... "
sleep 5
sudo systemctl status postgresql
# Install Redis
echo "Installing Redis"
sudo apt update -y && sudo apt install redis-server -y
# Done message
echo "Done installing all the required packages"
# ZSH Setup
# if zsh_setup.sh present, run it
if [ -f /vagrant/zsh_setup.sh ]; then
echo "Running zsh_setup.sh"
chmod +x /vagrant/zsh_setup.sh
/vagrant/zsh_setup.sh
fi
# clean up
echo "Cleaning up"
sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y
# Add scripts to default shell rc file: .bashrc
echo "Adding script to .bashrc"
echo "source /vagrant/auto_activate_venv_script.sh" >> ~/.bashrc