Automating Server Setup with a Bash Script
Mojahid Ul Haque
DevOps Engineer
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 postRelated Posts
DevOps without Shell is like cat without /etc/passwd
DevOps without Shell is like cat without /etc/passwd — technically possible, but you're missing the point. Shell scripting remains one of the most fundamental skills for any Dev...
Most DevOps problems aren't tech problems - They're organizational chaos wearing a YAML hoodie
Most "DevOps problems" aren't tech problems. They're just organizational chaos wearing a YAML hoodie. We love to buy tools to fix culture. It never works. If you want to actuall...
DevOps Engineer: The Most Misunderstood Role in Tech
DevOps Engineer: The Most Misunderstood Role in Tech Ever wondered why the role of a DevOps Engineer even exists? I got triggered today, and I'm here to clear some misconception...