Skip to content

Latest commit

 

History

History

Program_Setups

Program Setup Scripts

Collection of setup and installation scripts for various development tools and services on Linux systems (Fedora, Ubuntu/Debian, and derivatives).

1. OCRmyPDF + Tesseract

A complete OCR solution in two scripts — installation wizard + graphical frontend. See the dedicated OCR README for full documentation.

# 1. Install everything
sudo ./OCR/setup_ocr.sh

# 2. Run the graphical frontend
./OCR/ocr_gui.sh

2. Node.js (setup_nodeJs.sh / upgrade_nodeJs.sh)

Install or upgrade Node.js from the official binaries on Linux systems. Supports installing specific versions or the latest in a major version series, automatically detects the system architecture, and handles version conflicts.

2.1. Features

  • Version Selection:: Install a specific Node.js version (e.g., v18.17.0) or the latest in a major series (e.g., 20 for the newest 20.x version).

  • Architecture Detection:: Automatically detects x86_64, ARM64, ARMv7, etc., and downloads the appropriate binary.

  • Conflict Resolution:: Removes existing Node.js installations if they differ from the requested version.

  • Symlinks:: Creates symbolic links for node, npm, npx, and nodejs commands in /usr/local/bin.

  • Verification:: Tests all installed binaries after installation.

  • Logging:: Logs all operations to /var/log/node_install.log.

2.2. Setup Script

sudo ./setup_nodeJs.sh [version]

2.2.1. Arguments

version

Optional. Can be:

  • A full version string (e.g., v18.17.0)

  • A major version number (e.g., 20) to install the latest in that series

  • If omitted, installs the latest LTS version

2.2.2. Examples

# Install the latest LTS version
sudo ./setup_nodeJs.sh

# Install the latest in Node.js 20.x series
sudo ./setup_nodeJs.sh 20

# Install a specific version
sudo ./setup_nodeJs.sh v18.17.0

2.3. Upgrade Script

The upgrade script uses the same version selection rules as the installer, but it removes any existing node-* directories from /opt before installing the requested version.

sudo ./upgrade_nodeJs.sh [version]

The upgrade log is written to /var/log/node_upgrade.log.

2.4. What It Does

  1. Purge System Packages – Removes any system-installed nodejs and npm packages to avoid conflicts.

  2. Version Resolution – Determines the exact version to install based on input.

  3. Architecture Check – Detects the system architecture and selects the correct binary.

  4. Download – Fetches the Node.js tarball from nodejs.org.

  5. Extraction – Extracts to /opt/node-{version}-linux-{arch}/.

  6. Cleanup – Removes the downloaded tarball.

  7. Symlinks – Creates symlinks in /usr/local/bin for easy access.

  8. Testing – Verifies all commands work and logs versions.

2.5. Installation Location

Binaries

/opt/node-{version}-linux-{arch}/bin/

Symlinks

/usr/local/bin/ (points to the above)

Log File

/var/log/node_install.log

2.6. Troubleshooting

2.6.1. Permission Denied

  • Ensure you’re running with sudo.

  • Check that /var/log, /opt, and /usr/local/bin are writable by root.

2.6.2. Download Fails

  • Verify internet connection.

  • Check if the requested version exists on nodejs.org/dist/.

  • For major versions, ensure there are releases in that series.

2.6.3. Architecture Not Supported

  • The script supports x86_64, ARM64, and ARMv7.

  • Unknown architectures fall back to x64 with a warning.

2.6.4. jq Not Found

  • Install jq: sudo apt install jq (on Debian/Ubuntu).

2.6.5. Existing Installation Not Removed

  • The script only removes installations with different versions.

  • If the same version is requested, it overwrites the existing install.

2.7. Uninstalling

To remove Node.js installed by this script:

sudo rm -rf /opt/node-*
sudo rm /usr/local/bin/node /usr/local/bin/npm /usr/local/bin/npx /usr/local/bin/nodejs

3. LAMP Stack (setup_LAMP.sh)

Installs a full LAMP stack (Linux, Apache, MySQL/MariaDB, PHP) on Debian/Ubuntu systems using the tasksel utility.

sudo ./setup_LAMP.sh

3.1. What It Does

  1. Installs tasksel if not already present.

  2. Runs tasksel install lamp-server to set up Apache, MySQL/MariaDB, and PHP.

4. Fish Shell (setup_fish.sh)

Installs the Fish shell and sets it as the default login shell.

sudo ./setup_fish.sh

4.1. What It Does

  1. Installs fish via the system package manager.

  2. Changes the user’s default shell to Fish with chsh -s /usr/bin/fish.

  3. The change takes effect after the next login or reboot.

5. Git Credentials (setup_git_credentials.sh)

Interactive script to configure Git credentials (username and email) via interactive prompts.

./setup_git_credentials.sh

5.1. What It Does

  • Prompts for Git username (required).

  • Prompts for Git email address (required).

  • Configures the values globally with git config --global

6. SkillOpt

SkillOpt installer scripts and guide.