Skip to content

Avinjay/Linux_assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System Administration Assignments

Table of Contents


Introduction

This repository contains implementation details for three system administration tasks:

  1. System Monitoring Setup
  2. User Management and Access Control
  3. Backup Configuration for Web Servers

Each task includes step-by-step implementation, configurations, relevant logs, and screenshots.


Task 1: System Monitoring Setup

Objective

To configure a monitoring system that ensures the development environment’s health, performance, and capacity planning.

Implementation Steps

  1. Install Monitoring Tools
    • Installed htop for real-time system performance tracking.
    • Used df and du for disk usage monitoring.
  2. Configure System Metrics Logging
    • Created a script to log CPU, memory, and process usage.
    • Set up cron to run the script every 1 minute.
  3. Process Monitoring
    • Identified resource-intensive processes
  4. Logging and Reporting
    • Configured log output to system_monitor.log.
    • Implemented a reporting structure for periodic review.

Expected Output

  • Log files containing system performance snapshots. image

    image
  • Screenshots of the monitoring setup in action.

  • cron setup

    image

Task 2: User Management and Access Control

Objective

To set up user accounts and configure secure access controls for new developers.

Implementation Steps

  1. User Account Creation
    • Created user accounts for Sarah and Mike using useradd.
    • Set up secure passwords using passwd.
  2. Directory Setup
    • Created isolated working directories:
      • /home/sarah/workspace
      • /home/mike/workspace
    • Set permissions using chown and chmod to restrict access.
  3. Enforce Password Policies
    • Configured password expiration and complexity using chage and passwd.

Expected Output

  • Confirmation of user creation and Screenshots of permission settings.

    image
  • Verification of password policy enforcement.

    image

Task 3: Backup Configuration for Web Servers

Objective

To automate backups for Apache and Nginx web servers for data integrity and recovery.

Implementation Steps

  1. Backup Script Development
    • Created a backup script to archive the following:
      • Apache: /etc/apache2/ and /var/www/html/
      • Nginx: /etc/nginx/ and /usr/share/nginx/html/
    • Compressed the backup files with timestamped filenames.
  2. Cron Job Scheduling
    • Scheduled backups using cron to run every Sunday after 12:00 AM.
  3. Backup Integrity Verification
    • Implemented a check to list the contents of the compressed files after creation.
    • Logged verification results in backup_YYYY-MM-DD-HH-MM-SS.log.

Expected Output

  • Backup files stored in /backups/.

    image
  • Cron job configuration output.

    image
  • Verification log demonstrating backup integrity.

    image

How to Use This Repository

  1. Clone the repository:
    git clone https://github.com/Avinjay/Linux_assignment.git
    cd Linux_assignment
  2. Review the scripts for monitoring, user management, and backups.
  3. Execute scripts as needed following the documented steps.

Contributors


This README serves as a comprehensive guide for setting up and managing essential system administration tasks efficiently.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages