Skip to content

Instantly share code, notes, and snippets.

@aamnah
Last active June 24, 2023 13:14
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save aamnah/340240de52fd5be13549 to your computer and use it in GitHub Desktop.
Save aamnah/340240de52fd5be13549 to your computer and use it in GitHub Desktop.
Bash script to install packages [Git, s3cmd] on a new system. For Debian and Ubuntu. To run, copy the script to the server and run ``bash install-apps.sh``
#!/bin/bash/
#######################################
# Bash script to install apps on a new system (Ubuntu)
# Written by @AamnahAkram from http://aamnah.com
#######################################
## Update packages and Upgrade system
sudo apt-get update -y
## Git ##
echo '###Installing Git..'
sudo apt-get install git -y
# Git Configuration
echo '###Congigure Git..'
echo "Enter the Global Username for Git:";
read GITUSER;
git config --global user.name "${GITUSER}"
echo "Enter the Global Email for Git:";
read GITEMAIL;
git config --global user.email "${GITEMAIL}"
echo 'Git has been configured!'
git config --list
## s3cmd ##
echo '###Installing s3cmd..'
#Import S3tools signing key:
wget -O- -q http://s3tools.org/repo/deb-all/stable/s3tools.key | sudo apt-key add -
# Add the repo to sources.list:
sudo wget -O/etc/apt/sources.list.d/s3tools.list http://s3tools.org/repo/deb-all/stable/s3tools.list
# Refresh package cache and install the newest s3cmd:
sudo apt-get update && sudo apt-get install s3cmd
#s3cmd Configuration
echo '###Congigure s3cmd..'
sudo s3cmd --configure
@r-shafi
Copy link

r-shafi commented Jan 13, 2022

Hi, does it ask for password every time something requires superuser privilege?

@aamnah
Copy link
Author

aamnah commented Jan 17, 2022

if you run the script with sudo then it shouldn't

sudo ./install-app.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment