DevOpsLinkedIn PostNovember 6, 20241 min read105 words

Automating Server Setup with a Bash Script

M

Mojahid Ul Haque

DevOps Engineer

15 likes2 comments814 views

Automating Server Setup with a Bash Script

Hey everyone!

I wanted to share a bash script I wrote to streamline the initial setup of a new server. Setting up servers can be repetitive, so I created this script to automate common tasks. Here's what it does:

  • Updates package lists to ensure all installations are up-to-date.
  • Installs curl if it's not already installed.
  • Adds 1GB of swap memory to improve system performance.
  • Installs Node.js (v18.x), checking if it's already present to avoid redundancy.
  • Installs Apache2, ensuring it's properly set up and running.
  • Installs PM2 globally for efficient Node.js application management.

Originally posted on LinkedIn

View original post