This setup script automates the installation of various packages and tools on a Linux machine. The script must be run as the root user.
- A Linux machine with
apt
package management (Ubuntu, Debian, etc.) - Root access to the machine
- Download the
setup.sh
script to your machine. - Open a terminal and navigate to the directory where
setup.sh
is located. - Make the script executable:
chmod +x setup.sh
- Run the script as root:
sudo ./setup.sh
To copy the script to a remote machine, execute the following:
scp -i "path/to/your.pem" "path/to/setup.sh" username@remote_address:/path/to/remote/directory
To copy for home:
scp -i "path/to/your.pem" "path/to/setup.sh" username@remote_address:~
or
scp -i "path/to/your.pem" "path/to/setup.sh" username@remote_address:/home/ec2-user/setup.sh
To SSH into the remote machine:
ssh -i "path/to/your.pem" username@remote_address
Then execute the following commands to run the script:
chmod +x setup.sh
sudo ./setup.sh
- Note: When transferring and running scripts between different operating systems, it's important to ensure compatibility, especially regarding newline characters, as these can cause scripts to fail in unexpected ways. The
dos2unix
utility is one of the simplest ways to convert file formats from Windows-style to Unix-style line endings.
sudo yum install dos2unix
dos2unix setup.sh
- Checks if the script is being run as root
- Updates package lists
- Upgrades existing packages
- Installs basic build tools like compilers, curl, wget, git, vim, etc.
- Installs Python3, pip, and Python's
venv
module - Installs various Python packages and libraries for data science, machine learning, and deep learning
- Installs Node.js
- Installs OpenJDK 11 (Java)
- Installs Docker
- Installs MySQL and PostgreSQL clients
- Installs additional tools like
tree
andncdu
- build-essential
- curl
- wget
- git
- vim
- tmux
- htop
- unzip
- python3
- python3-pip
- python3-venv
- numpy
- pandas
- matplotlib
- scikit-learn
- tensorflow
- keras
- pytorch
- scikit-image
- opencv-python
- jupyterlab
- seaborn
- plotly
- xgboost
- lightgbm
- nltk
- spacy
- gensim
- note
- Node.js
- OpenJDK 11
- Docker
- MySQL client
- PostgreSQL client
- tree
- ncdu