Bash - Linux Setup
Description
Bash script to setup Linux after a fresh install.
Available options
- Initialize Git (Git required for some other options)
- Setup Local Database
- Install/Update Npm & NodeJs
Initialize Git
Very basic commands to setup git. Git is required for some of the other options.\n Plus it's just nice to immediately set up git for a new install.
Setup Local Database
Installs and initializes a local database. Currently supported:
- MySQL
- MariaDB
- PostgreSQL
Setup Python for Development
Runs a few separate setup tasks, in order:
- Adds the "deadsnakes" ppa (
sudo add-apt-repository ppa:deadsnakes/ppa
) if not present on system.- This allows easily and cleanly installing different Python versions on the system.
- Not sure if I'd recommend this ppa for production use, as it might not always have the latest security fixes as soon as possible. But it's certainly useful and convienent for local development purposes.
- Installs Python3.7, Python3.8, Python3.9, and Python3.10 on the system, if not already present.
- Installs and configures PipEnv if not already present.
- See also PipEnv Notes for usage.
- Updates the standard cd command:
- Changing into a directory with the folders ".env" or ".venv" will try to automatically load that as the active Python virtual environment.
- Changing out of that same directory will deactivate the current Python virtual environment.
- See https://git.brandon-rodriguez.com/python/example_projects/virtual_environments/-/blob/master/helper_script.sh for full script.
Install/Update Npm & NodeJs
Installs/updates Npm to the latest LTS version.\n
Also installs the npm-check-updates
package, for quick and easy updating of local project dependencies.