7096703065b22e182ba8150.37523185-shutterstock-524944387

I started to working with wordPress and Magento and needed to learn both CMS's. I started with LAMP on Ubuntu on a old PC and then found programs like XAMPP and Wamp.   With all these I think they are all great but there was always something missing for me - when you need to dig deeper into the configuration of PHP or MySQL or Apache things get messy.

I guess I was always looking for more of a Experimental Lab setup where I could do break fixes and try things out. It took me along time to find 'Virtualization' and I don't think it was even around when I first started experimenting the best you could achieve was a duel boot setup. I have been installing and configuring web servers for a few years now. I'm running more of a virtualization server setup (ESXI6.5) but I recommend using Oracle's VirtualBox or Vmware Workstation before going to a bare metal hypervisor (ESXI).

This post is more about how to get LEMP (Linux, Nginx, MySQL, PHP ) up and running on a Debian server.

First you will need to select a Linux distribution. I recommend Debian, Ubuntu or Centos.

Once you have a Linux distribution installed I go for a ease of being able to manage the server with as little footprint or overhead as possible. I favor Debian without the Graphical User Interface or Ubuntu do a Server version which I also recommend. From here on in I will outline the step I take on a Debian Linux installation.

After the initial installation of the Linux operating system I look towards some way of managing the server operating system and the web server. I have used Ajenti, AnotherCE and Webmin. Because I also want to manage the server and manage it then as a Web-server Webmin is my favored program.

I have been installing and configuring web servers for a few years now. I started with LAMP on Ubuntu.

As my installations became more refined I wanted to record some of my findings.

I wanted to record a installation with some of my default installation information.

Selected Linux distribution is Debian Ubuntu or Centos. I think it has long been seen as a good stable server.

Next I install Webmin as I recommend this as a administration client.

Also you need to install

 

sudo apt install open-vm-tools

On the first install of Debian I install VMware Tools.

https://kb.vmware.com/s/article/1018414

 

You need to access the installation files and need to add the repo to /etc/apt/sources.list.

$ su

# cd etc

File min on webmin

Go to Webmin –> Webmin Configuration –> Webmin Modules

Click on the option “From ftp or http URL” and copy/paste this URL;

https://github.com/Real-Gecko/Filemin/tree/master/distrib/filemin-2.2.0.linux.wbm.gz

 

MYSQL

Download the file to a tmp

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

dpkg -i mysql-apt-config_0.8.10-1_all.deb
apt-get update
apt-get install mysql-server
mysql_secure_installation

Webmin

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.881_all.deb

dpkg --install webmin_1.881_all.deb

apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

 

Webmin nginx module

Webmin /Webmin configuration / Webmin Modules  / Install / /

Nginx

https://www.justindhoffman.com/sites/justindhoffman.com/files/nginx-0.11.wbm_.gz

Filemin

https://github.com/Real-Gecko/Filemin/releases

https://github.com/Real-Gecko/Filemin/releases/download/2.2.3/filemin-2.2.3.linux.full.wbm.gz

 

LEMP (Linux/Nginx/MySQL/PHP/)

Nginx

apt-get install nginx nginx-common nginx-full

 

PHP

php7.0 php7.0-fpm php7.0-mysql

php7.0-mbstring(Laravel)

/etc/php/7.0/fpm/pool.d/www.conf

listen.allowed_clients = 127.0.0.1

 

 

Mysql

mysql-common mysql-server

# mysql_secure_installation