One-Click LEMP Installation: Nginx, MySQL and PHP on Ubuntu
What Will You Learn in This Guide?
In this guide, you will learn how to quickly install the LEMP (Linux, Nginx, MySQL, PHP) stack on an Ubuntu-based cloud server with a ready image.
We will cover server access, database management and SSL configuration without manual installation.
What is LEMP Stack?
LEMP; Running on Linux operating system,
It consists of Nginx web server, MySQL database and PHP components.
It is widely used for high performance web applications.
1. Creating a Server with a Ready LEMP Image
One-click installation feature automatically prepares basic services.
Steps to follow:
- Log in to the cloud management panel.
- Open the server creation screen.
- Select LEMP on Ubuntu from the Marketplace / Applications section.
- Identify a data center close to users.
- Choose a plan with at least 1 GB RAM.
- Create the server by adding the SSH key.
At the end of this step, you will be assigned a server IP address.
2. Connecting to the Server via SSH
To check the installation, you need to connect to the server.
ssh root@sunucu_ip_adresiniz
- This command connects to the server with administrator privileges.
3. Verifying LEMP Installation
- First check that PHP is installed correctly.
php -i | grep "PHP Version"
- This command shows the installed PHP version.
- To examine the default web directory:
nano /var/www/html/index.html
- This file is the sample page provided by Nginx.
You can test access by typing http://server\_ip\_your_address from the browser.
4. Accessing MySQL Root Password
- The MySQL root password is automatically generated in ready-made images.
cat /root/.digitalocean_password
- The file name may be different on some providers:
cat /root/credentials.txt
- After taking note of this information, you can increase database security.
5. Enabling HTTPS with SSL Certificate
- Stock LEMP images usually come with Certbot.
certbot --nginx -d ornek-site.com -d www.ornek-site.com
- This command gets a free SSL certificate via Let's Encrypt.
- To allow only HTTPS access:
ufw delete allow 80/tcp
- This action turns off HTTP traffic.
Frequently Asked Questions (FAQ)
1. Is one-click LEMP installation suitable for production environment? Yes. It is sufficient for small and medium-sized projects.
2. Is it any different from manual installation? There is no performance difference. It saves time.
3. Can I change the PHP version later? Yes. It can be changed with the package manager.
4. Can multiple sites run on the same server? Yes. You can use Nginx server block.
Result
One-click LEMP installation allows you to focus on the project without wasting time on infrastructure settings. For more secure and scalable LEMP servers, you can try the GenixNode infrastructure now.

