Skip to content

Installation

Noaman edited this page Dec 16, 2022 · 5 revisions

Installation Steps

sudo apt-get update

Setup Screen and Git

sudo apt-get install screen git -y

Use Screen to install the LEMP Stack

screen -S installer

If you have not setup SSH key based authentication, then installer will not continue.

sudo ssh-keygen
touch /root/.ssh/authorized_keys
echo $(cat /root/.ssh/id_rsa.pub) >> /root/.ssh/authorized_keys  

Please save the private key generated at this /root/.ssh/id_rsa path somewhere safe otherwise you will loose access to your VPS as we will be disabling password based authentication.

Clone the repo at the specified path (The path is important!)

sudo git clone https://github.com/noamanahmed/lemp /opt/lemp

(Optional) Open install.sh script if you want to know what is going to happe.

nano /opt/lemp/install.sh

(Optional) I recommend first looking into all available options

sudo /opt/lemp/install.sh --help             
LEMP Installer
	--without_security 
	Disable Security Packages Installation and Configurations 
	--without_python 
	Disable Python Packages Installation and Configurations
	--without_nginx 
	Disable nginx Installation and Configurations
	--without_mysql 
	Disable mysql Installation and Configurations
	--without_php 
	Disable php Installation and Configurations
	--with_mongodb 
	Enable mongodb Installation and Configurations
	--with_mongodb_express 
	Enable MongoDB Express Installation and Configurations (Requires --with_mongodb flag)
	--without_nvm 
	Disable nvm Installation and Configurations
	--without_proftpd 
	Disable proftpd Installation and Configurations
	--without_letsencrypt 
	Disable letsencrypt Installation and Configurations
	--without_redis 
	Disable redis Installation and Configurations
	--without_docker 
	Disable docker Installation and Configurations
	--without_composer 
	Disable composer Installation and Configurations
	--without_java 
	Disable java Installation and Configurations
	--without_meilisearch 
	Disable meilisearch Installation and Configurations
	--with_jenkins 
	 Enable Jenkins Installation and Configurations
	--without_jailkit 
	Disable jailkit Installation and Configurations
	--without_scripts 
	Disable scripts Installation and Configurations
	--without_supervisor 
	Disable supervisor Installation and Configurations
	--without_hostname_site 
	Disable hostname_site Installation and Configurations
	--without_phpmyadmin 
	Disable phpmyadmin Installation and Configurations
	--without_phppgadmin 
	Disable phppgadmin Installation and Configurations
	--with_postgres 
	Enable Postgress Installation and Configurations 
	--with_pgadmin 
	Enable pgAdmin4 Installation and Configurations (Requires --with_postgres flag) 
	--with_elk 
	Enable  Installation and Configurations
	--with_kafka 
	 Enable  Installation and Configurations
	--with_rabbitmq 
	 Enable  Installation and Configurations
	--with_netdata 
	 Enable  Installation and Configurations
	--with_glitchtip 
	 Enable  Installation and Configurations
	--without_monit 
	Disable monit Installation and Configurations
	--without_kernel 
	Disable kernel Installation and Configurations
	--with_mailhog 
	 Enable  Installation and Configurations
	--with_mailserver 
	 Enable  Installation and Configurations
	--with_zabbix 
	 Enable  Installation and Configurations
	--slack_notification_webhook https://hooks.slack.com/services/XXXXXXX/XXXXXX/XXXXXXXXXX 
	Enter Slack Notification Webhook URL to receieve important notifications.
	--uptime_robot_key YOUR_MAIN_API_KEY 
	Enter Uptime Robot Main API key to create/delete monitors

When done reading with the flags to configure the installer.The script will create a new sudo user.If the user already exists,it will add it to the sudo group. The password will be used for running commands with sudo.

/opt/lemp/install.sh -u noaman -h hostname.example.com -p myVerySecurePassword#!

Now exit out of screen using Ctr/Cmd A + D. The script would install silently in the background. It generally took a 60 minute installation time with a 1GB Virmach VPS

Read Me before Quick Start!

  • Make sure the installer has completed to avoid any hiccups.
  • Update the current bash shell using source ~/.bashrc or exit/logout and login again. If you are logging in again,then make sure you are using the correct SSH port which is NOT 22 but would have been changed to 6000.
  • The installer outputs a log file location in /tmp path. Its best to review it and see if everything went well
  • All most all of the sites (PHP,Python,NodeJS etc) comes with a basic setup to make sure everyhing went well
Clone this wiki locally