๐ป 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! ๐
Task | Command | Description |
---|---|---|
System Updates | sudo dnf update -y | Update all packages |
Node.js Management | nvm use 18.17.0 | Switch Node versions |
Python Environment | pipenv shell | Activate virtual environment |
Docker Management | docker-compose up -d | Start all services |
Database Access | mysql -u root -p | Connect to MySQL |
Service Status | sudo systemctl status SERVICE | Check service status |
Port Check | sudo netstat -tulpn | grep :PORT | Find whatโs using a port |
Process Kill | pkill -f PROCESS_NAME | Kill process by name |
Git Operations | git status && git add . && git commit -m "message" | Basic Git workflow |
VS Code Launch | code . | Open current directory in VS Code |
Service Logs | sudo journalctl -u SERVICE -f | View service logs |
Permission Fix | sudo chown -R $USER:$USER DIRECTORY | Fix 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! ๐