sse
<=
+
strapi
vscode
+
+
+
+
โŠ‚
+
asm
mongo
+
+
firebase
+
goland
stencil
kali
+
marko
spring
netlify
ansible
goland
c++
weaviate
cosmos
next
&&
โˆฉ
โˆฉ
+
+
firebase
+
preact
+
+
||
+
+
wsl
+
+
r
vb
parcel
intellij
+
+
+
+
+
+
play
+
+
+
+
+
+
+
+
+
bundler
+
+
cdn
rs
!
+
+
+
ocaml
โˆฉ
+
groovy
+
dynamo
+
+
+
+
+
laravel
โˆž
+
Back to Blog
AlmaLinux development environments setup with multiple programming languages and tools
almalinux development programming

๐Ÿ’ป AlmaLinux Development Environments Complete Setup Guide

Published Sep 18, 2025

Master guide to setting up complete development environments on AlmaLinux. Learn Docker containers, VS Code, Node.js, Python, Java, PHP, and database configurations with expert tips.

5 min read
0 views
Table of Contents

๐Ÿ’ป AlmaLinux Development Environments Complete Setup Guide

Ready to transform your AlmaLinux system into a powerful development powerhouse? ๐Ÿš€ Whether youโ€™re building web apps, mobile applications, or enterprise software, this guide will help you create the perfect development environment tailored to your needs! โœจ

Setting up a proper development environment is like preparing a professional kitchen - you need the right tools, organized workspace, and efficient workflows to create amazing projects! ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป

๐Ÿค” Why Set Up Proper Development Environments?

Having well-configured development environments brings incredible benefits! ๐ŸŒŸ

Essential Benefits:

  • ๐Ÿš€ Faster Development - Everything you need at your fingertips
  • ๐Ÿ”ง Consistent Setup - Same environment across all projects
  • ๐Ÿ›ก๏ธ Isolated Projects - No conflicts between different technologies
  • ๐Ÿ“ฆ Easy Deployment - Development mirrors production closely
  • ๐Ÿ”„ Version Control - Manage different language/framework versions
  • ๐Ÿ‘ฅ Team Collaboration - Shared development standards
  • ๐Ÿ› Better Debugging - Professional debugging tools and workflows
  • ๐Ÿ“Š Performance Monitoring - Built-in profiling and optimization tools

๐ŸŽฏ What You Need Before Starting

Letโ€™s make sure you have everything ready for this development adventure! โœ…

System Requirements:

  • โœ… AlmaLinux 8 or 9 (fresh installation recommended)
  • โœ… At least 8GB RAM (16GB+ for multiple environments)
  • โœ… 50GB+ free disk space for tools and projects
  • โœ… Stable internet connection for downloads
  • โœ… Sudo/root access for system-wide installations
  • โœ… Basic terminal knowledge (weโ€™ll guide you!)

What Weโ€™ll Set Up:

  • โœ… Essential development tools and utilities
  • โœ… Multiple programming language environments
  • โœ… Code editors and IDEs
  • โœ… Database systems (MySQL, PostgreSQL, MongoDB, Redis)
  • โœ… Containerized development with Docker
  • โœ… Version control with Git
  • โœ… Package managers and dependency tools

๐Ÿ“ Step 1: Essential Development Tools Foundation

Letโ€™s start by installing the core tools every developer needs! These are the building blocks for everything else.

# Update system packages first
sudo dnf update -y

# Install development tools group (includes gcc, make, git, etc.)
sudo dnf groupinstall "Development Tools" -y

# Install essential utilities
sudo dnf install -y \
    curl \
    wget \
    unzip \
    zip \
    tree \
    htop \
    nano \
    vim \
    tmux \
    screen \
    rsync \
    openssh-server

What these tools do:

  • ๐Ÿ”ง Development Tools - Compilers, build systems, and debugging tools
  • ๐Ÿ“ฆ curl/wget - Download files and test APIs
  • ๐Ÿ—œ๏ธ zip/unzip - Handle compressed files
  • ๐Ÿ“ tree - Visual directory structure display
  • ๐Ÿ“Š htop - System resource monitoring
  • โœ๏ธ nano/vim - Text editors for quick file edits
  • ๐Ÿ–ฅ๏ธ tmux/screen - Terminal session management
  • ๐Ÿ”„ rsync - Efficient file synchronization
# Verify installations
gcc --version          # Shows: gcc (GCC) 11.x.x
make --version         # Shows: GNU Make 4.x
git --version          # Shows: git version 2.x.x
curl --version         # Shows: curl 7.x.x

Great! Now you have a solid foundation! ๐ŸŽ‰

๐Ÿ”ง Step 2: Configure Git for Version Control

Git is essential for any development work. Letโ€™s set it up properly!

# Configure your Git identity (use your real info!)
git config --global user.name "Your Full Name"
git config --global user.email "[email protected]"

# Set up useful Git aliases
git config --global alias.st status
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.lg "log --oneline --graph --decorate"

# Configure default branch name
git config --global init.defaultBranch main

# Set up line ending handling
git config --global core.autocrlf input
git config --global core.safecrlf warn

Pro Git Configuration:

# Create a global .gitignore file
cat > ~/.gitignore_global << 'EOF'
# System files
.DS_Store
Thumbs.db

# IDE files
.vscode/
.idea/
*.swp
*.swo
*~

# Environment files
.env
.env.local
.env.development
.env.test
.env.production

# Logs
*.log
logs/

# Dependencies
node_modules/
vendor/
__pycache__/
*.pyc
EOF

# Apply global gitignore
git config --global core.excludesfile ~/.gitignore_global

๐ŸŒŸ Step 3: Install VS Code - The Perfect Code Editor

VS Code is incredibly popular and works amazingly on AlmaLinux! Letโ€™s install it properly.

# Import Microsoft GPG key
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

# Add VS Code repository
cat > /tmp/vscode.repo << 'EOF'
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
EOF

sudo mv /tmp/vscode.repo /etc/yum.repos.d/

# Install VS Code
sudo dnf install -y code

# Launch VS Code to test
code --version

Essential VS Code Extensions:

# Install useful extensions via command line
code --install-extension ms-vscode.vscode-json
code --install-extension ms-python.python
code --install-extension ms-vscode.vscode-typescript-next
code --install-extension bradlc.vscode-tailwindcss
code --install-extension esbenp.prettier-vscode
code --install-extension ms-vscode.vscode-eslint
code --install-extension GitLens.gitlens
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension ms-vscode.remote-repositories

VS Code User Settings:

# Create settings directory
mkdir -p ~/.config/Code/User

# Create optimized settings file
cat > ~/.config/Code/User/settings.json << 'EOF'
{
    "editor.fontSize": 14,
    "editor.tabSize": 2,
    "editor.insertSpaces": true,
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 1000,
    "terminal.integrated.fontSize": 14,
    "workbench.colorTheme": "Dark+ (default dark)",
    "git.enableSmartCommit": true,
    "git.confirmSync": false
}
EOF

โœ… Step 4: Node.js Development Environment

Node.js is essential for modern web development! Letโ€™s install it using Node Version Manager (NVM).

# Install NVM (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# Reload shell configuration
source ~/.bashrc

# Verify NVM installation
nvm --version

# Install latest LTS Node.js
nvm install --lts
nvm use --lts

# Verify installations
node --version          # Shows: v20.x.x
npm --version           # Shows: 10.x.x

Essential Node.js Global Packages:

# Install commonly used global packages
npm install -g \
    typescript \
    nodemon \
    pm2 \
    create-react-app \
    @vue/cli \
    @angular/cli \
    express-generator \
    eslint \
    prettier \
    serve

# Verify installations
tsc --version           # TypeScript compiler
nodemon --version       # Auto-restart development server
pm2 --version           # Process manager
create-react-app --version  # React app generator

Create Node.js Project Template:

# Create workspace directory
mkdir -p ~/Development/nodejs-projects
cd ~/Development/nodejs-projects

# Create a sample Express.js project
npx express-generator sample-app
cd sample-app
npm install

# Test the application
npm start &
curl http://localhost:3000  # Should show Express welcome page
pkill -f "node ./bin/www"   # Stop the test server

๐Ÿ Step 5: Python Development Environment

Python is fantastic for web development, data science, and automation! Letโ€™s set up a complete Python environment.

# Install Python development packages
sudo dnf install -y \
    python3 \
    python3-pip \
    python3-devel \
    python3-venv \
    python3-wheel \
    python3-setuptools

# Install pipenv for dependency management
pip3 install --user pipenv

# Add pipenv to PATH (add to ~/.bashrc for persistence)
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc

# Verify installations
python3 --version       # Shows: Python 3.x.x
pip3 --version         # Shows: pip 21.x.x
pipenv --version       # Shows: pipenv 2023.x.x

Create Python Virtual Environment:

# Create workspace for Python projects
mkdir -p ~/Development/python-projects
cd ~/Development/python-projects

# Create a new Python project
mkdir sample-flask-app
cd sample-flask-app

# Initialize pipenv environment
pipenv install flask python-dotenv

# Activate virtual environment
pipenv shell

# Create a simple Flask app
cat > app.py << 'EOF'
from flask import Flask
import os
from dotenv import load_dotenv

load_dotenv()

app = Flask(__name__)

@app.route('/')
def hello():
    return '<h1>Hello from AlmaLinux Flask App! ๐Ÿš€</h1>'

@app.route('/health')
def health():
    return {'status': 'healthy', 'message': 'App is running!'}

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0', port=5000)
EOF

# Create environment file
cat > .env << 'EOF'
FLASK_ENV=development
FLASK_APP=app.py
EOF

# Test the Flask app
python app.py &
sleep 2
curl http://localhost:5000  # Should show Flask welcome
pkill -f "python app.py"    # Stop test server
exit  # Exit pipenv shell

โ˜• Step 6: Java Development Environment

Java is perfect for enterprise applications and Android development! Letโ€™s install OpenJDK and development tools.

# Install OpenJDK 17 (LTS version)
sudo dnf install -y \
    java-17-openjdk \
    java-17-openjdk-devel \
    maven \
    gradle

# Set JAVA_HOME environment variable
echo 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk' >> ~/.bashrc
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

# Verify installations
java --version         # Shows: openjdk 17.x.x
javac --version        # Shows: javac 17.x.x
mvn --version          # Shows: Apache Maven 3.x.x
gradle --version       # Shows: Gradle 7.x.x

Create Java Project Template:

# Create Java workspace
mkdir -p ~/Development/java-projects
cd ~/Development/java-projects

# Create Maven project
mvn archetype:generate \
    -DgroupId=com.example.app \
    -DartifactId=sample-app \
    -DarchetypeArtifactId=maven-archetype-quickstart \
    -DinteractiveMode=false

cd sample-app

# Build and test the project
mvn compile
mvn test
mvn package

# Run the application
java -cp target/classes com.example.app.App

๐Ÿ˜ Step 7: PHP Development Environment

PHP powers millions of websites! Letโ€™s set up a complete PHP development environment.

# Install PHP 8.x with essential extensions
sudo dnf install -y \
    php \
    php-cli \
    php-fpm \
    php-json \
    php-curl \
    php-mysql \
    php-pgsql \
    php-gd \
    php-mbstring \
    php-xml \
    php-zip \
    php-opcache \
    php-redis \
    composer

# Enable and start PHP-FPM
sudo systemctl enable php-fpm
sudo systemctl start php-fpm

# Verify installations
php --version          # Shows: PHP 8.x.x
composer --version     # Shows: Composer 2.x.x

Create PHP Project:

# Create PHP workspace
mkdir -p ~/Development/php-projects
cd ~/Development/php-projects

# Create a Laravel project (most popular PHP framework)
composer create-project laravel/laravel sample-laravel-app

cd sample-laravel-app

# Install dependencies
composer install

# Generate application key
php artisan key:generate

# Test the application
php artisan serve --host=0.0.0.0 --port=8000 &
sleep 3
curl http://localhost:8000  # Should show Laravel welcome page
pkill -f "php artisan serve" # Stop test server

๐Ÿ—„๏ธ Step 8: Database Systems Setup

Letโ€™s install and configure multiple database systems for different project needs!

MySQL Database:

# Install MySQL 8.0
sudo dnf install -y mysql-server

# Start and enable MySQL
sudo systemctl enable mysqld
sudo systemctl start mysqld

# Secure MySQL installation
sudo mysql_secure_installation

# Test connection
mysql -u root -p -e "SELECT VERSION();"

PostgreSQL Database:

# Install PostgreSQL 15
sudo dnf install -y postgresql postgresql-server postgresql-contrib

# Initialize database
sudo postgresql-setup --initdb

# Enable and start PostgreSQL
sudo systemctl enable postgresql
sudo systemctl start postgresql

# Create development user
sudo -u postgres createuser --interactive --pwprompt devuser

# Test connection
sudo -u postgres psql -c "SELECT version();"

MongoDB (NoSQL):

# Create MongoDB repository file
cat > /tmp/mongodb-org-7.0.repo << 'EOF'
[mongodb-org-7.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/7.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-7.0.asc
EOF

sudo mv /tmp/mongodb-org-7.0.repo /etc/yum.repos.d/

# Install MongoDB
sudo dnf install -y mongodb-org

# Start and enable MongoDB
sudo systemctl enable mongod
sudo systemctl start mongod

# Test connection
mongosh --eval "db.adminCommand('hello')"

Redis (Caching):

# Install Redis
sudo dnf install -y redis

# Enable and start Redis
sudo systemctl enable redis
sudo systemctl start redis

# Test Redis connection
redis-cli ping  # Should return: PONG

๐Ÿณ Step 9: Docker Development Environment

Docker revolutionizes development with containers! Perfect for microservices and consistent environments.

# Add Docker CE repository
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

# Install Docker CE
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

# Start and enable Docker
sudo systemctl enable docker
sudo systemctl start docker

# Add current user to docker group (logout/login required)
sudo usermod -aG docker $USER

# Install Docker Compose (standalone)
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

# Verify installations (after logout/login)
docker --version       # Shows: Docker version 24.x.x
docker-compose --version  # Shows: docker-compose version 2.x.x

Create Development Docker Environment:

# Create Docker workspace
mkdir -p ~/Development/docker-projects/fullstack-app
cd ~/Development/docker-projects/fullstack-app

# Create docker-compose.yml for complete development stack
cat > docker-compose.yml << 'EOF'
version: '3.8'

services:
  # Frontend (React)
  frontend:
    image: node:18-alpine
    working_dir: /app
    ports:
      - "3000:3000"
    volumes:
      - ./frontend:/app
      - /app/node_modules
    command: npm start
    environment:
      - REACT_APP_API_URL=http://localhost:5000
    depends_on:
      - backend

  # Backend (Node.js/Express)
  backend:
    image: node:18-alpine
    working_dir: /app
    ports:
      - "5000:5000"
    volumes:
      - ./backend:/app
      - /app/node_modules
    command: npm run dev
    environment:
      - NODE_ENV=development
      - DB_HOST=mysql
      - DB_USER=devuser
      - DB_PASS=devpass
      - DB_NAME=appdb
      - REDIS_URL=redis://redis:6379
    depends_on:
      - mysql
      - redis

  # MySQL Database
  mysql:
    image: mysql:8.0
    ports:
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: rootpass
      MYSQL_DATABASE: appdb
      MYSQL_USER: devuser
      MYSQL_PASSWORD: devpass
    volumes:
      - mysql_data:/var/lib/mysql

  # Redis Cache
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"

  # PostgreSQL (alternative database)
  postgres:
    image: postgres:15-alpine
    ports:
      - "5432:5432"
    environment:
      POSTGRES_DB: appdb
      POSTGRES_USER: devuser
      POSTGRES_PASSWORD: devpass
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  mysql_data:
  postgres_data:
EOF

# Start the development stack
docker-compose up -d

# Check running containers
docker ps

๐ŸŒŸ Step 10: Advanced Development Tools

Letโ€™s add some powerful tools that make development even more enjoyable!

Install Postman for API Testing:

# Download and install Postman
wget -O /tmp/postman.tar.gz https://dl.pstmn.io/download/latest/linux64

# Extract to /opt
sudo tar -xzf /tmp/postman.tar.gz -C /opt/

# Create desktop entry
cat > ~/.local/share/applications/postman.desktop << 'EOF'
[Desktop Entry]
Name=Postman
Exec=/opt/Postman/Postman
Icon=/opt/Postman/app/resources/app/assets/icon.png
Type=Application
Categories=Development;
EOF

# Make executable
chmod +x ~/.local/share/applications/postman.desktop

Install JetBrains Toolbox (for IntelliJ IDEA, WebStorm, etc.):

# Download JetBrains Toolbox
wget -O /tmp/jetbrains-toolbox.tar.gz https://download.jetbrains.com/toolbox/jetbrains-toolbox-1.28.1.13236.tar.gz

# Extract and install
sudo tar -xzf /tmp/jetbrains-toolbox.tar.gz -C /opt/
sudo ln -s /opt/jetbrains-toolbox-*/jetbrains-toolbox /usr/local/bin/

# Launch Toolbox
jetbrains-toolbox &

Install DBeaver (Universal Database Tool):

# Download DBeaver
wget -O /tmp/dbeaver.rpm https://dbeaver.io/files/dbeaver-ce-latest-stable.x86_64.rpm

# Install DBeaver
sudo dnf install -y /tmp/dbeaver.rpm

# Launch DBeaver to test
dbeaver &

๐ŸŽฎ Quick Examples - Ready-to-Use Development Setups

Letโ€™s create some practical examples you can use right away! ๐Ÿš€

Example 1: React + Node.js + MySQL Full-Stack App

# Create project structure
mkdir -p ~/Development/examples/fullstack-react-app/{frontend,backend}

# Backend setup
cd ~/Development/examples/fullstack-react-app/backend
npm init -y
npm install express cors mysql2 bcryptjs jsonwebtoken dotenv

# Create basic Express server
cat > server.js << 'EOF'
const express = require('express');
const cors = require('cors');
const mysql = require('mysql2');
require('dotenv').config();

const app = express();
const PORT = process.env.PORT || 5000;

// Middleware
app.use(cors());
app.use(express.json());

// Database connection
const db = mysql.createConnection({
    host: 'localhost',
    user: 'devuser',
    password: 'devpass',
    database: 'appdb'
});

// Routes
app.get('/api/health', (req, res) => {
    res.json({ status: 'healthy', message: 'Backend is running!' });
});

app.get('/api/users', (req, res) => {
    db.query('SELECT id, name, email FROM users', (err, results) => {
        if (err) return res.status(500).json({ error: err.message });
        res.json(results);
    });
});

app.listen(PORT, () => {
    console.log(`๐Ÿš€ Backend server running on port ${PORT}`);
});
EOF

# Frontend setup
cd ../frontend
npx create-react-app . --template typescript
npm install axios

# Create API service
cat > src/api.ts << 'EOF'
import axios from 'axios';

const API_BASE_URL = 'http://localhost:5000/api';

export const api = axios.create({
    baseURL: API_BASE_URL,
});

export const getUsers = () => api.get('/users');
export const getHealth = () => api.get('/health');
EOF

Example 2: Python FastAPI + PostgreSQL API

# Create FastAPI project
mkdir -p ~/Development/examples/fastapi-postgres-app
cd ~/Development/examples/fastapi-postgres-app

# Initialize pipenv
pipenv install fastapi uvicorn psycopg2-binary python-dotenv

# Create FastAPI application
cat > main.py << 'EOF'
from fastapi import FastAPI, HTTPException
from fastapi.middleware.cors import CORSMiddleware
import psycopg2
from psycopg2.extras import RealDictCursor
import os
from dotenv import load_dotenv

load_dotenv()

app = FastAPI(title="AlmaLinux FastAPI Demo", version="1.0.0")

# Enable CORS
app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

# Database connection
def get_db():
    conn = psycopg2.connect(
        host="localhost",
        database="appdb",
        user="devuser",
        password="devpass",
        cursor_factory=RealDictCursor
    )
    return conn

@app.get("/")
def read_root():
    return {"message": "๐Ÿš€ FastAPI running on AlmaLinux!"}

@app.get("/health")
def health_check():
    return {"status": "healthy", "database": "connected"}

@app.get("/users")
def get_users():
    conn = get_db()
    cur = conn.cursor()
    cur.execute("SELECT * FROM users")
    users = cur.fetchall()
    cur.close()
    conn.close()
    return users

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)
EOF

# Start the API
pipenv run python main.py

Example 3: Vue.js + Laravel + MySQL Application

# Create Laravel backend
cd ~/Development/examples
composer create-project laravel/laravel vue-laravel-app
cd vue-laravel-app

# Install Laravel Sanctum for API authentication
composer require laravel/sanctum
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"

# Create Vue.js frontend
npm install vue@next @vitejs/plugin-vue
npm install axios

# Create Vue component
mkdir -p resources/js/components
cat > resources/js/components/UserDashboard.vue << 'EOF'
<template>
  <div class="dashboard">
    <h1>๐ŸŽฏ User Dashboard</h1>
    <div v-if="users.length">
      <div v-for="user in users" :key="user.id" class="user-card">
        <h3>{{ user.name }}</h3>
        <p>{{ user.email }}</p>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import axios from 'axios'

const users = ref([])

const fetchUsers = async () => {
  try {
    const response = await axios.get('/api/users')
    users.value = response.data
  } catch (error) {
    console.error('Error fetching users:', error)
  }
}

onMounted(() => {
  fetchUsers()
})
</script>

<style scoped>
.dashboard {
  padding: 2rem;
}
.user-card {
  border: 1px solid #ddd;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
}
</style>
EOF

๐Ÿšจ Fix Common Development Environment Problems

Even experts encounter issues! Here are solutions to the most common problems: ๐Ÿ’ช

Problem 1: Node.js Version Conflicts

# Symptoms: "node: command not found" or version mismatches
# Solution: Properly configure NVM

# Check current Node version
node --version || echo "Node not found"

# List available Node versions
nvm list available

# Install and use specific version
nvm install 18.17.0
nvm use 18.17.0
nvm alias default 18.17.0

# Verify installation
which node    # Should show: /home/user/.nvm/versions/node/v18.17.0/bin/node
node --version # Should show: v18.17.0

# Fix PATH issues
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bashrc
source ~/.bashrc

Problem 2: Docker Permission Denied

# Symptoms: "permission denied while trying to connect to the Docker daemon socket"
# Solution: Fix Docker group membership

# Check if user is in docker group
groups $USER | grep docker || echo "Not in docker group"

# Add user to docker group
sudo usermod -aG docker $USER

# Apply group changes (logout/login or use newgrp)
newgrp docker

# Test Docker access
docker run hello-world

# Fix Docker daemon issues
sudo systemctl status docker
sudo systemctl restart docker

Problem 3: Database Connection Failures

# MySQL connection issues
# Check if MySQL is running
sudo systemctl status mysqld

# Reset MySQL root password if needed
sudo systemctl stop mysqld
sudo mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root
# In MySQL: ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword';
sudo systemctl restart mysqld

# PostgreSQL connection issues
# Check PostgreSQL status
sudo systemctl status postgresql

# Reset PostgreSQL password
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'newpassword';"

# Test connections
mysql -u root -p -e "SELECT 1;"
sudo -u postgres psql -c "SELECT 1;"

Problem 4: VS Code Extension Issues

# Symptoms: Extensions not working or installing
# Solution: Clear VS Code cache and reinstall

# Close VS Code
pkill code

# Clear extension cache
rm -rf ~/.vscode/extensions
rm -rf ~/.config/Code/User/workspaceStorage

# Reinstall extensions
code --install-extension ms-python.python
code --install-extension ms-vscode.vscode-typescript-next

# Fix permission issues
sudo chown -R $USER:$USER ~/.vscode
sudo chown -R $USER:$USER ~/.config/Code

Problem 5: Port Already in Use

# Symptoms: "EADDRINUSE: address already in use :::3000"
# Solution: Find and kill processes using the port

# Find process using port 3000
sudo netstat -tulpn | grep :3000
# or use lsof
sudo lsof -i :3000

# Kill the process (replace PID with actual process ID)
kill -9 PID

# Kill all node processes (nuclear option)
pkill -f node

# Check available ports
netstat -tuln | grep LISTEN

Problem 6: Python Virtual Environment Issues

# Symptoms: "command not found: pipenv" or virtual environment not activating
# Solution: Properly install and configure pipenv

# Install pipenv correctly
pip3 install --user pipenv

# Add to PATH permanently
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

# Create new environment from scratch
cd ~/Development/python-projects
mkdir test-project && cd test-project
pipenv install flask
pipenv shell

# Fix broken environment
pipenv --rm          # Remove existing environment
pipenv install       # Recreate from Pipfile

๐Ÿ“‹ Development Environment Commands Summary

Hereโ€™s your quick reference for managing development environments! ๐Ÿš€

TaskCommandDescription
System Updatessudo dnf update -yUpdate all packages
Node.js Managementnvm use 18.17.0Switch Node versions
Python Environmentpipenv shellActivate virtual environment
Docker Managementdocker-compose up -dStart all services
Database Accessmysql -u root -pConnect to MySQL
Service Statussudo systemctl status SERVICECheck service status
Port Checksudo netstat -tulpn | grep :PORTFind whatโ€™s using a port
Process Killpkill -f PROCESS_NAMEKill process by name
Git Operationsgit status && git add . && git commit -m "message"Basic Git workflow
VS Code Launchcode .Open current directory in VS Code
Service Logssudo journalctl -u SERVICE -fView service logs
Permission Fixsudo chown -R $USER:$USER DIRECTORYFix file ownership

๐Ÿ’ก Pro Tips for Efficient Development

Want to become a development environment ninja? Here are expert secrets! ๐Ÿฅท

Tip 1: Create Development Aliases

# Add these to ~/.bashrc for super productivity
cat >> ~/.bashrc << 'EOF'
# Development aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias ..='cd ..'
alias ...='cd ../..'
alias grep='grep --color=auto'

# Git shortcuts
alias gs='git status'
alias ga='git add'
alias gc='git commit'
alias gp='git push'
alias gl='git log --oneline'

# Development shortcuts
alias serve='python3 -m http.server 8000'
alias myip='curl ifconfig.me'
alias ports='netstat -tuln'
alias processes='ps aux | grep -v grep | grep'

# Docker shortcuts
alias dps='docker ps'
alias dpsa='docker ps -a'
alias di='docker images'
alias dcu='docker-compose up'
alias dcd='docker-compose down'
alias dcr='docker-compose restart'
alias dcl='docker-compose logs -f'

# Quick directory navigation
alias dev='cd ~/Development'
alias projects='cd ~/Development && ls -la'
EOF

source ~/.bashrc

Tip 2: Environment Backup Script

# Create backup script for your development setup
cat > ~/backup-dev-env.sh << 'EOF'
#!/bin/bash
# Development Environment Backup Script

BACKUP_DIR="$HOME/dev-env-backup-$(date +%Y%m%d)"
mkdir -p "$BACKUP_DIR"

echo "๐Ÿš€ Backing up development environment..."

# Backup configuration files
cp ~/.bashrc "$BACKUP_DIR/"
cp ~/.gitconfig "$BACKUP_DIR/"
cp -r ~/.ssh "$BACKUP_DIR/" 2>/dev/null || true
cp -r ~/.config/Code/User "$BACKUP_DIR/vscode-settings" 2>/dev/null || true

# Export installed packages
dnf list installed > "$BACKUP_DIR/dnf-packages.txt"
npm list -g --depth=0 > "$BACKUP_DIR/npm-global-packages.txt" 2>/dev/null || true
pip3 list > "$BACKUP_DIR/pip-packages.txt" 2>/dev/null || true

# Backup Docker configurations
cp -r ~/Development/docker-projects "$BACKUP_DIR/" 2>/dev/null || true

# Create installation script
cat > "$BACKUP_DIR/restore.sh" << 'RESTORE_EOF'
#!/bin/bash
echo "๐Ÿ”„ Restoring development environment..."
echo "This script helps restore your development setup!"
echo "Review the backed-up files and install packages manually."
RESTORE_EOF

chmod +x "$BACKUP_DIR/restore.sh"

echo "โœ… Backup completed: $BACKUP_DIR"
echo "๐Ÿ’ก Run backup monthly to keep your setup safe!"
EOF

chmod +x ~/backup-dev-env.sh

Tip 3: Performance Monitoring Dashboard

# Create system monitoring script
cat > ~/dev-monitor.sh << 'EOF'
#!/bin/bash
# Development Environment Monitor

clear
echo "๐Ÿ–ฅ๏ธ  AlmaLinux Development Environment Monitor"
echo "============================================="

echo -e "\n๐Ÿ“Š System Resources:"
echo "CPU Usage: $(top -bn1 | grep "Cpu(s)" | awk '{print $2}' | cut -d'%' -f1)%"
echo "Memory: $(free -h | awk 'NR==2{printf "%.1f%% (%s/%s)\n", $3*100/$2, $3, $2}')"
echo "Disk: $(df -h / | awk 'NR==2{printf "%s (%s)\n", $5, $4}')"

echo -e "\n๐Ÿณ Docker Status:"
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" 2>/dev/null || echo "Docker not running"

echo -e "\n๐Ÿ—„๏ธ  Database Status:"
systemctl is-active mysqld 2>/dev/null | sed 's/active/โœ… MySQL: Running/' | sed 's/inactive/โŒ MySQL: Stopped/'
systemctl is-active postgresql 2>/dev/null | sed 's/active/โœ… PostgreSQL: Running/' | sed 's/inactive/โŒ PostgreSQL: Stopped/'
systemctl is-active mongod 2>/dev/null | sed 's/active/โœ… MongoDB: Running/' | sed 's/inactive/โŒ MongoDB: Stopped/'
systemctl is-active redis 2>/dev/null | sed 's/active/โœ… Redis: Running/' | sed 's/inactive/โŒ Redis: Stopped/'

echo -e "\n๐ŸŒ Development Servers:"
netstat -tuln 2>/dev/null | grep -E ":(3000|3001|5000|8000|8080|9000)" | while read line; do
    port=$(echo $line | awk '{print $4}' | cut -d':' -f2)
    echo "๐Ÿ“ก Port $port: Active"
done

echo -e "\n๐Ÿ”„ Git Status (if in git repo):"
if git status &>/dev/null; then
    echo "Branch: $(git branch --show-current)"
    echo "Status: $(git status --porcelain | wc -l) modified files"
else
    echo "Not in a git repository"
fi

echo -e "\n๐Ÿ’ป Node.js Environment:"
node --version 2>/dev/null && echo "Node.js: โœ…" || echo "Node.js: โŒ"
npm --version 2>/dev/null && echo "npm: โœ…" || echo "npm: โŒ"

echo -e "\n๐Ÿ Python Environment:"
python3 --version 2>/dev/null && echo "Python: โœ…" || echo "Python: โŒ"
pipenv --version 2>/dev/null && echo "pipenv: โœ…" || echo "pipenv: โŒ"

echo -e "\nโ˜• Java Environment:"
java --version 2>/dev/null >/dev/null && echo "Java: โœ…" || echo "Java: โŒ"

echo -e "\n๐Ÿ˜ PHP Environment:"
php --version 2>/dev/null >/dev/null && echo "PHP: โœ…" || echo "PHP: โŒ"

echo -e "\nMonitoring completed at $(date)"
echo "๐Ÿ”„ Run 'watch -n 30 ~/dev-monitor.sh' for live updates"
EOF

chmod +x ~/dev-monitor.sh

๐Ÿ† What Youโ€™ve Accomplished - Development Mastery!

Congratulations! Youโ€™ve built an incredible development powerhouse! ๐ŸŽ‰ Letโ€™s celebrate what youโ€™ve achieved:

๐Ÿš€ Complete Development Stack:

  • โœ… Essential development tools and utilities installed
  • โœ… Git configured with best practices and useful aliases
  • โœ… VS Code set up with essential extensions and optimized settings
  • โœ… Node.js environment with NVM for version management
  • โœ… Python development with virtual environments and pipenv
  • โœ… Java development environment with OpenJDK and build tools
  • โœ… PHP development stack with Composer and extensions
  • โœ… Multiple database systems (MySQL, PostgreSQL, MongoDB, Redis)
  • โœ… Docker containerization for consistent development
  • โœ… Advanced tools (Postman, JetBrains Toolbox, DBeaver)

๐Ÿ’ช Professional Skills Gained:

  • โœ… Multi-language development environment management
  • โœ… Container-based development workflows
  • โœ… Database administration and connection management
  • โœ… Version control best practices with Git
  • โœ… IDE and editor optimization for productivity
  • โœ… Troubleshooting common development issues
  • โœ… Environment backup and restoration procedures
  • โœ… Performance monitoring and system optimization

๐ŸŽฏ Ready-to-Use Examples:

  • โœ… Full-stack React + Node.js + MySQL application
  • โœ… FastAPI + PostgreSQL backend API
  • โœ… Vue.js + Laravel + MySQL web application
  • โœ… Docker Compose multi-service development stack
  • โœ… Automated monitoring and backup scripts

๐ŸŽฏ Why This Development Setup Matters

Your AlmaLinux system is now a professional-grade development machine! ๐ŸŒŸ

Real-World Impact:

  • ๐Ÿš€ Career Advancement - Professional development setup demonstrates expertise
  • ๐Ÿ’ฐ Increased Productivity - Streamlined workflows save hours daily
  • ๐Ÿ›ก๏ธ Reduced Errors - Consistent environments prevent deployment surprises
  • ๐Ÿ‘ฅ Team Collaboration - Standardized setup improves team efficiency
  • ๐Ÿ”„ Scalability - Container-based development mirrors production systems
  • ๐ŸŽฏ Multi-Technology Proficiency - Work with any tech stack confidently
  • ๐Ÿ’ก Innovation Ready - Quick project setup enables rapid prototyping
  • ๐Ÿ† Industry Standards - Following best practices used by top companies

Youโ€™re not just coding anymore - youโ€™re engineering solutions like a pro! Whether youโ€™re building the next billion-user app, contributing to open source projects, or starting your own tech company, this development environment gives you everything you need to succeed! ๐ŸŒˆ

Ready to build something amazing? Your AlmaLinux development powerhouse is waiting! โญ Happy coding! ๐Ÿ™Œ