What is the difference between LAMP stack and LEMP stack?

Mihai B.

Well-known member
Registered
Joined
Apr 19, 2016
Messages
238
Points
18
I have read some articles on web hosting blogs and web hosts there mentioned to LAMP and LEMP but I really don't understand what they are. Can anyone tell me what is LAMP and what is LEMP stack? differences between LAMP stack and LEMP stack?
 

VirtuBox

Well-known member
Registered
Joined
May 3, 2016
Messages
1,622
Points
83
LAMP for Linux Apache MySQL PHP
LEMP for Linux Nginx (Engine X) MySQL PHP

The only difference is the web server, Apache or Nginx
 

Mihai B.

Well-known member
Registered
Joined
Apr 19, 2016
Messages
238
Points
18
Mihai B.
I have to install and configure elements (Linux Apache MySQL PHP) separately?
and without using a hosting control panel
 

overcast

Well-known member
Registered
Joined
Jun 27, 2017
Messages
88
Points
0
overcast
LAMP and LEMP both stacks give you option to install Mysql and PHP. And the difference only is in the server Ngix or Apache. So the hosting control panel can be chosen here. You can choose between the cpanel and plesk. You get choice here. And if you are in unmanaged vps or dedicated server then yes, you have to install of it separately. There are some containers which have everything bundled but that goes with Cloud VPS and Cloud dedicated packages in some hosts.
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
With a control panel such as cPanel all the elements needed for a lamp or lemp stack is included(nginx will need to be installed).
cPanel does not officially support nginx yet but you can set up nginx on cPanel using NginxCP installation script.

If you want to do a manual lamp install without using a control here is how.

Installing lamp stack on centOS 7 without using a control panel as root:
Update packages:
Code:
yum update
Apache Install

Install Apache:
Code:
yum install httpd
Start Apache:
Code:
systemctl start httpd.service
Set Apache to start at boot:
Code:
systemctl enable httpd.service

Installing MariaDB(MySQL)

Code:
yum install mariadb-server mariadb
Start MariaDB:
Code:
systemctl start mariadb
Enable MariaDB on boot:
Code:
systemctl enable mariadb.service
Finish setting up the MariaDB Install:
Code:
mysql_secure_installation
You will be asked for the root password. Because you didn't set it earlier, press Enter to set a password now.
Type "Y" to set the root password.
Enter and confirm the new password.
You will be asked more questions as part of the security configuration. Answer Y to these questions

Installing PHP:

Code:
yum install php php-mysql
Restart Apache:
Code:
systemctl restart httpd.service
Test PHP:

create a file in /var/www/html/ called test.php
Enter the following into the file

Code:
<?php
phpinfo();
?>
go to http: //your server's IP address/test.php and make sure php is working.

Hope this helps.
 

Mihai B.

Well-known member
Registered
Joined
Apr 19, 2016
Messages
238
Points
18
Mihai B.
If I move sites from a hosting control as cPanel to LAMP or LEMP that installing mariadb, will my sites work normally? or it can cause some errors when moving from MySQL to Mariadb? I am wondering this.
 

VirtuBox

Well-known member
Registered
Joined
May 3, 2016
Messages
1,622
Points
83

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
LJSHost
I feel this is one of the big advantages over cPanel. Plesk makes it easy to just choose what you want to use, cPanel really need to add this without the need of a manual install or 3rd party script.
 

UWH-David

Member
Registered
Joined
Jan 18, 2016
Messages
45
Points
8
Depends, are you using an .htaccess with your account with any rewrites? In such a case you will want to stick with LAMP (you can still use nginx as a reverse proxy frontend). Another option is to use an apache .htaccesss -> nginx convertor and use LEMP. The least hassle will come from using LAMP and extracting your host virtual configs from your httpd.conf file.
 

Mihai B.

Well-known member
Registered
Joined
Apr 19, 2016
Messages
238
Points
18
Mihai B.
Does this tool existed online or can I install it on my LEMP? For any hosting panels running with Nginx, do they also support to run .htaccess file? where can I find these?
 

UWH-David

Member
Registered
Joined
Jan 18, 2016
Messages
45
Points
8
Here you go!

https://winginx.com/en/htaccess

You place the config in the nginx vhost file for the domain.

Does this tool existed online or can I install it on my LEMP? For any hosting panels running with Nginx, do they also support to run .htaccess file? where can I find these?
 

24x7serverman

Well-known member
Hosting Provider
Registered
Joined
Jul 25, 2017
Messages
651
Points
28
LAMP stack is consist of Linux, Apache, MySQL and PHP/perl/python. Below are the more details -

1. Linux - It is operating system. It is the base of stack component. So it can be Ubuntu, Centos etc.
2. Apache - Apache is web server. It can be used with Linux or Windows.
3. MySQL - It is relational database management system.
4. PHP/perl/python - These are server side scripting languages. You can use any of them.

LEMP stack consist of Linux,Ngnix, MySQL database, PHP/perly.python.

1. Major difference is that Apache webserver is replaced with Ngnix in LEMP. Ngnix pronounced as engine-X. That is why it's LEMP stack.

2. Ngnix can handle more requests concurrently than Apache. The same hardware produces the great output in Ngnix.

3. Apache slows down on heavy load. It will create new threads for consuming more RAM and CPU on heavy load. Ngnix can handle the heavy load with the same configuration and hardware. It will not create separate processes.

4. Apache refuses the new connections when load gets increase on server. Ngnix will never refuse the new connections as it can handle thousands of connections a time.

5. Deadlok occurs in Apache while Ngnix will never block any request.

6. Ngnix is faster and manage heavy load.

But in real scenario, both will work fine. Just it's mater of choice that what and how much processes you are going to run. If there are light weight processes then you can go with Apache.

Hope this will help you.
 
Older Threads
Recommended Threads
Replies
0
Views
1,257
Replies
1
Views
2,450
Replies
22
Views
6,944

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top