Manually Install LNMP

Step 1: Install Ufw and open ports

sudo apt update -y && apt upgrade -y && apt dist-upgrade -y && apt autoremove && apt autoclean ;

sudo apt install ufw ;

sudo ufw status ;

sudo ufw allow 80,443/tcp ;

sudo ufw allow 12345 ; # change to your own ports if you need some special ports ;

Step 2: Install Nginx, Php

sudo apt install nginx -y ;

sudo apt install -y php-fpm php-mysql php-curl php-gd php-intl php-mbstring php-soap php-xml php-xmlrpc php-zip php-imagick php-opcache php-memcached php-bcmath php-common;

Step 3: Install Mysql or MariaDB

sudo apt install mariadb-server -y ;

sudo mysql_secure_installation ;

Step 4: Create Database & User

sudo mariadb -u root -p ;

CREATE DATABASE database_name_here ;

CREATE USER 'username_here'@'localhost' IDENTIFIED BY 'passoword_here' ;

GRANT ALL PRIVILEGES ON database_name_here.* TO 'username_here'@'localhost' ;

FLUSH PRIVILEGES ;

exit
Scroll to Top