• Home
  • WordPress
  • web Hosting
  • linux
  • mysql
  • nginx
  • apache2
  • devops

Raju Ginni

wordpress tutorials seo hosting etc

You are here: Home / Linux sysadmin tutorials linux system administrator / Install Lemp nginx mysql php fpm Stack on Debian 11 with repository

Install Lemp nginx mysql php fpm Stack on Debian 11 with repository

 

Note: we install latest versions form debian repository only not form ngninx , mtsql official repos

Pros: Easy to install cons: not latest packages

 

sudo apt update && sudo apt upgrade

 

sudo apt install nginx

sudo apt install php8.1-fpm

or  sudo apt install php-fpm  (7.4 latest version)

sudo apt install mysql  (only mariadb-server)

sudo apt install mysql-server

sudo apt install mysql-server-8.0 E: Package ‘mysql-server-8.0’ has no installation candidate

 

we are adding mysql 8 debian repository from mysql source (install mysql on ubuntu)

https://dev.mysql.com/downloads/repo/apt/

wget https://dev.mysql.com/get/mysql-apt-config_0.8.26-1_all.deb

 

sudo dpkg -i mysql-apt-config_0.8.26-1_all.deb

 

select ok

sudo apt-get update && sudo apt-get install mysql-server

enter password mysq8 sha5 based or legacy password

root@instance-1:~# service mysql status
● mysql.service – MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:>
Active: active (running) since Tue 2023-08-29 07:00:36 UTC; 14s ago

Table of Contents

Toggle
  • check latest package versions available in Debian repository
  • All Are installed lets do some configuration

check latest package versions available in Debian repository

apt-cache policy <packageName>

apt-cache policy nginx

apt-cache policy nginx

Reading state information… Done
E: Unable to locate package php8.1-fpm
E: Couldn’t find any package by glob ‘php8.1-fpm’
root@instance-1:~#

nginx:
Installed: (none)
Candidate: 1.18.0-6.1+deb11u3
Version table:
1.18.0-6.1+deb11u3 500  nginx latest version  ( nginx-1.25.2) too old
500 https://deb.debian.org/debian bullseye/main amd64 Packages
500 https://deb.debian.org/debian-security bullseye-security/main amd64 Packages

checking it on ubunut 20.04 LTS

root@murali:~# apt-cache policy nginx
nginx:
Installed: 1.18.0-6ubuntu14.3
Candidate: 1.18.0-6ubuntu14.4
Version table:
1.18.0-6ubuntu14.4 500
500 http://mirrors.digitalocean.com/ubuntu jammy-updates/main amd64 Packages
*** 1.18.0-6ubuntu14.3 500
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
100 /var/lib/dpkg/status
1.18.0-6ubuntu14 500
500 http://mirrors.digitalocean.com/ubuntu jammy/main amd64 Packages

 

All Are installed lets do some configuration

nginx configuration

mysql configuration

php -fpm configuartion

 

backing files form other servers

mysqldump -u root -p spro > /var/www/html/sarkariresultpro.in/spro.sql

zip -r /var/www/html/spro.zip /var/www/html/sarkariresultpro.in/

 

copy to new server by scp command

1st connect servers then use

scp /var/www/html/spro.zip /var/www/html/

mv /var/www/html/var/www/html/sarkariresultpro.in/ /var/www/html/sarkariresultpro.in/

unzip /var/www/html/spro.zip /var/www/html

or cd var/www/html

unzip spro.zip

 

import mysql 

create database spro;

mysql -u root spro -p < /var/www/html/sarkariresultpro.in/spro.sql
nginx configuration

Linux sysadmin tutorials linux system administrator

  • top 10 apt & apt-get commands (most used) apt vs apt-get
  • If-Else Statements in Shell Scripting
  • linux commands pdf (files & Directories, zip & unzip process, search etc)
  • Find Files with Specific Text on Linux grep find command
  • linux performance tuning inode limit file descriptors tco, kernel etc
  • Variables and Data Types in Shell Scripting
  • Top 10 most used Cat commands with examples (create, view, append files)
  • Ip tables / ufw / firewall d commands for block port ip rate limiting
  • Top 10 zip / tar commands to compress & extract files in linux
  • TOP 10 mv & cp commands in linux to move & copy files in Linux
  • Top 10 GREP Commands in linux to search files directory words strings
  • lsof netstat commands to know listening ports in linux 3 ways
  • Upgrade Ubuntu from 18.04 (19.10) to 20.04 LTS command line or gui server | desktop
  • 3 Ways (SCP, rsync, Sftp) linux server migration between two remote server apache nginx
  • linux system specs commands (CPU, Memory, Disk )speed, type. manufacture
  • linux sysctl command tweaks & hardening
  • linux security limits.conf deciding user limits process limits for nginx server
  • ulimit linux unlimited command unlimto set & know user limits open files file descriptor max user process etc.
  • red hat linux certification cost jobs salary syllabus courses fees
  • ufw firewall commads allow port enable disable ubuntu 20.04
  • ddos attack prevention
  • change ssh port in linux - avoid sshd ddos attacks
  • ping command
  • memcached install ubuntu wordpress
  • check linux version (lsb_release -a) ubuntu debian 32 or 64 bit
  • rsync command linux with examples comparison to scp
  • how to uninstall package in linux ubuntu rpm, yum apt-get
  • increase open file limit linux File descriptor ft nginx , mysql, lemp
  • remove repository ubuntu
  • htop commad memory details virtual vs shard vs resident
  • chown command in Linux with Examples
  • Kill PHP process
  • VIrtual Memory vs RSS Memory vs Shared memory in Linux
  • oom killer fixing it by configuration linux ubuntu
  • Install Lemp nginx mysql php fpm Stack on Debian 11 with repository
  • connect two remote servers linux command line
  • auto start after oom killer Mysql & php fpm nginx etc ubuntu wth systemd or cron job
  • load average Linux 1, 5, 15 min 2,4,8 cores explained
  • Control Structures in Shell Scripting
  • Shell Scripting Roadmap for Beginners to Advanced
  • awk commands with practical examples
  • Shell Scripting Tutorial for Beginners 🚀
  • find Command in Linux with Examples
  • sed Command in Linux with Examples (Beginner to Advanced)
  • Linux Text processing commands in with Examples
  • linux disk management commands
  • fdisk command in linux with examples
  • how to add a new disk in linux
  • Linux mount Command with Examples
  • fstab options with examples
  • Top 50 Shell Scripting Interview Questions and Answers
  • Linux Networking Interview Questions and Answers
  • Linux Networking Commands Cheat Sheet with Examples pdf
  • Netstat & SS Commands cheat sheet with examples Interview Questions
  • Nmap Cheat Sheet – Network Scanning & Security
  • Bash Brackets ([], (), {}, $( ), $(( ))) – Types, Uses & Examples

hi i am raju ginni, primalry i manage wordpress websites on GCP cloud platform as a cloud engineer, and create content on passionate things.
you can follow me on youtbe

© 2025 - All Rights Reserved Disclaimer & Privacy Policy