{"id":31293545,"url":"https://github.com/imagd/sysops-reference","last_synced_at":"2025-10-08T05:08:43.539Z","repository":{"id":217988775,"uuid":"744903920","full_name":"iMaGd/SysOps-Reference","owner":"iMaGd","description":"Collection of instructions, and quick-reference guides for Linux server management and system administration","archived":false,"fork":false,"pushed_at":"2025-10-05T05:20:05.000Z","size":180,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T05:39:36.213Z","etag":null,"topics":["apache","developer-tools","devops","docker","lamp","lemp","linux","nginx","server-side","sysadmin","wordpress"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iMaGd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security/authorization.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-18T08:42:27.000Z","updated_at":"2025-10-05T05:20:08.000Z","dependencies_parsed_at":"2024-02-04T11:25:44.975Z","dependency_job_id":"a48c4a72-1dfa-458e-a767-9adc84ab865a","html_url":"https://github.com/iMaGd/SysOps-Reference","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"a510cbf43f3fd3cc6cc198c9ba14f2100b043fdf"},"previous_names":["imagd/cheat-sheets","imagd/sysops-reference"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iMaGd/SysOps-Reference","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMaGd%2FSysOps-Reference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMaGd%2FSysOps-Reference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMaGd%2FSysOps-Reference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMaGd%2FSysOps-Reference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iMaGd","download_url":"https://codeload.github.com/iMaGd/SysOps-Reference/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMaGd%2FSysOps-Reference/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278891753,"owners_count":26063858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","developer-tools","devops","docker","lamp","lemp","linux","nginx","server-side","sysadmin","wordpress"],"created_at":"2025-09-24T18:27:40.845Z","updated_at":"2025-10-08T05:08:43.534Z","avatar_url":"https://github.com/iMaGd.png","language":"Shell","readme":"## System Administration and Linux Server Management Reference\n\nThis repository contains a collection of cheat sheets useful for system administration and managing Linux servers, with a focus on tasks like configuring servers, managing users, and deploying applications.\n\n### Get started\n\nClone the repository and permit for execution\n```bash\nsudo git clone https://github.com/iMaGd/SysOps-Reference.git \u0026\u0026 cd SysOps-Reference\nsudo chmod +x ./scripts/*.sh\n```\n\n### Get latest changes\n\nTo get latest changes from repo:\n```bash\nsudo chmod -x ./scripts/*.sh \u0026\u0026 sudo git pull \u0026\u0026 sudo chmod +x ./scripts/*.sh\n```\n\n### List of available setup scripts\n\n```bash\n# Install Ubuntu server essentials\n./scripts/ubuntu-init.sh\n\n# Add admin/moderator/regular user to server\n./scripts/adduser.sh\n\n# You can switch to new super admin user\nsu superadmin\n\n# Harden SSH\n./scripts/ssh.sh\n\n# Install and configure Fail2Ban\n./scripts/fail2ban.sh\n\n# Setup firewall\n./scripts/iptables.sh\n\n# Install Web-server\n./scripts/apache-install.sh # Apache2\n# OR\n./scripts/nginx-install.sh  # Nginx\n\n# Install PHP-FPM\n./scripts/php-fpm.sh\n\n# Install and secure Database\n./scripts/mariadb-install.sh # MariaDB\n# OR\n./scripts/mysql-install.sh  # MySQL\n\n# Add database user\n./scripts/mysql-add-user.sh\n# Grant database user\n./scripts/mysql-grant-user.sh\n# Or update database user\n./scripts/mysql-update-user.sh\n\n# Add a virtual site\n./scripts/apache-add-site.sh\n# OR\n./scripts/nginx-add-site.sh\n# OR\n./scripts/nginx-add-laravel.sh\n\n# Install Composer\n./scripts/composer-install.sh\n\n# Install WP CLI\n./scripts/wp-cli.sh\n\n# Adds a WP site\n./scripts/wp-add.sh\n\n# Issue a SSL certificate\n./scripts/ssl.sh\n\n# Install PhpMyAdmin\n./scripts/phpmyadmin.sh\n\n# Install redis\n./scripts/redis-install.sh\n```\n\n\n### Contents\n\n- [Install MySQL on Ubuntu 22.04](#install-mysql-on-ubuntu-2204)\n- [Docker Commands](#docker-commands)\n- [Install Docker and Docker Compose](#install-docker-and-docker-compose)\n- [LAMP Boilerplate](#lamp-boilerplate)\n- [LEMP Boilerplate](#lemp-boilerplate)\n- [User Management and SSH User](#user-management-and-ssh-user)\n- [SSH Key Authentication and Server Setup](#ssh-key-authentication-and-server-setup)\n- [Enabling OpCache in PHP](#enabling-opcache-in-php)\n- [PHP and PHP-FPM Configuration](#php-and-php-fpm-configuration)\n- [SSH, Fail2ban, and Firewall Configuration](#ssh-fail2ban-and-firewall-configuration)\n- [Enable SSL with Certbot](#enable-ssl-with-certbot)\n- [Understanding and Managing the `www-data` User](#understanding-and-managing-the-www-data-user)\n- [Apache Virtual Hosts Setup](#apache-virtual-hosts-setup)\n- [Configuring Nginx](#configuring-nginx)\n- [Install WP CLI for WordPress Management](#install-wp-cli-for-wordpress-management)\n- [WordPress Cookies and Sessions](#wordpress-cookies-and-sessions)\n- [WordPress Multisite and Single Rewrites](#wordpress-multisite-and-single-rewrites)\n- [WordPress Media Management Commands](#wordpress-media-management-commands)\n- [Directory and File Size Management Commands](#directory-and-file-size-management-commands)\n- [Enable Custom CSS on WordPress Multisite](#enable-custom-css-on-wordpress-multisite)\n\n### Install MySQL on Ubuntu 22.04\nCheat sheet for installing and securing MySQL on Ubuntu 22.04, including service management and user creation.\n\n### Docker Commands\nA collection of essential Docker commands for managing images and containers, as well as volume and network operations.\n\n### Install Docker and Docker Compose\nSteps to install Docker and Docker Compose on a Linux server.\n\n### LAMP Boilerplate\nA guide to setting up a Linux server with Apache, MySQL, and PHP (LAMP stack), including essential configurations.\n\n### LEMP Boilerplate\nInstructions for installing Nginx, PHP-FPM, and other necessary packages for a LEMP stack setup.\n\n### User Management and SSH User\nCommands for creating users, managing group membership, and configuring an SSH user for secure tunneling.\n\n### SSH Key Authentication and Server Setup\nHow to set up SSH key-based authentication and configure server settings for added security.\n\n### Enabling OpCache in PHP\nConfiguration options to enable and manage the OpCache extension for PHP.\n\n### PHP and PHP-FPM Configuration\nGuidance on tweaking PHP and PHP-FPM settings based on resource availability and application requirements.\n\n### SSH, Fail2ban, and Firewall Configuration\nSecuring SSH access, installing Fail2ban, and configuring a firewall with iptables.\n\n### Enable SSL with Certbot\nCommands to enable SSL using Certbot for domains managed by Apache.\n\n### Understanding and Managing the `www-data` User\nBest practices for managing file ownership and permissions when running web servers and PHP-FPM.\n\n### Apache Virtual Hosts Setup\nExamples of Apache virtual host configurations for different scenarios including React applications and proxy to other servers or ports.\n\n### Configuring Nginx\nBasic Nginx server block configuration and virtual host setup for WordPress Multisite.\n\n### Install WP CLI for WordPress Management\nInstructions for installing WP CLI to streamline management of WordPress installations.\n\n### WordPress Cookies and Sessions\nUnderstanding different types of cookies and their usage in WordPress.\n\n### WordPress Multisite and Single Rewrites\nCode templates for Apache mod_rewrite compatible with WordPress multisite (using directories or root) and single sites.\n\n### WordPress Media Management Commands\nCommand line operations to manage WordPress media, including removal and compression of images.\n\n### Directory and File Size Management Commands\nQuick commands to review and manage the sizes of directories and files.\n\n### Enable Custom CSS on WordPress Multisite\nA code snippet to allow custom CSS for users with appropriate capabilities on a WordPress Multisite network.\n\n---\nFor more detailed information, please refer to the respective cheat sheets within this repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimagd%2Fsysops-reference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimagd%2Fsysops-reference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimagd%2Fsysops-reference/lists"}