Install Lighttpd with PHP5 and MySQL (LLMP Stack) on Ubuntu 14.04

Lighttpd is a popular event-based web server alternative to Nginx. Lighttpd can be used to serve high traffic sites even on a small VPS.

Here, I will explain how to install Lighttpd with PHP 5 (PHP5-FPM) and MySQL on Ubuntu 14.04.

Step 1: Install Lighttpd

Install Lighttpd with the following commands.

sudo apt-get update
sudo apt-get install lighttpd

This will start Lighttpd once the install finishes. You can test the status of the server by accessing the IP address of your VPS in a web browser. Upon success, you will see the Lighttp welcome page.

If the page does not load, you can force-restart the service.

sudo service lighttpd start

Step 2: Install PHP 5

Install PHP5 with the following command.

sudo apt-get install php5-cgi php5-mysql

Note that the "php5-mysql" package is needed to use MySQL server with PHP.

Step 3: Enable FastCGI

Enable PHP5 CGI modules in Lighttpd with the following commands.

sudo lighty-enable-mod fastcgi 
sudo lighty-enable-mod fastcgi-php

After enabling the modules, you need to restart the Lighttpd service.

sudo service lighttpd force-reload

Step 4: Test PHP integration

Test the PHP integration with Lighttpd. To do this, create a test file inside the /var/www/ folder.

nano /var/www/info.php

Paste the following content into this file.

<?php phpinfo(); ?>

Now, access http://[SERVER_IP]/info.php in your web browser. If the configuration was setup properly, you will see the PHP info page.

Step 5: Install MySQL

Run the following command to install MySQL server. During the installation, you need to give the administrator password for MySQL root.

sudo apt-get install mysql-server

Once the install finishes, install a MySQL database.

mysql_install_db

Additionally, you can use the secure MySQL installation by running the following command.

mysql_secure_installation

Lämna en kommentar

The Rise of Machines: Real World Applications of AI

The Rise of Machines: Real World Applications of AI

Artificiell intelligens är inte i framtiden, det är här i nuet I den här bloggen Läs hur Artificiell intelligens-applikationer har påverkat olika sektorer.

DDOS-attacker: En kort översikt

DDOS-attacker: En kort översikt

Är du också ett offer för DDOS-attacker och förvirrad över de förebyggande metoderna? Läs den här artikeln för att lösa dina frågor.

Har du någonsin undrat hur hackare tjänar pengar?

Har du någonsin undrat hur hackare tjänar pengar?

Du kanske har hört att hackare tjänar mycket pengar, men har du någonsin undrat hur de tjänar den typen av pengar? låt oss diskutera.

Revolutionerande uppfinningar från Google som gör ditt liv lätt.

Revolutionerande uppfinningar från Google som gör ditt liv lätt.

Vill du se revolutionerande uppfinningar av Google och hur dessa uppfinningar förändrade livet för varje människa idag? Läs sedan till bloggen för att se uppfinningar av Google.

Fredag ​​Essential: Vad hände med AI-drivna bilar?

Fredag ​​Essential: Vad hände med AI-drivna bilar?

Konceptet med att självkörande bilar ska ut på vägarna med hjälp av artificiell intelligens är en dröm vi har ett tag nu. Men trots flera löften finns de ingenstans att se. Läs den här bloggen för att lära dig mer...

Technological Singularity: A Distant Future of Human Civilization?

Technological Singularity: A Distant Future of Human Civilization?

När vetenskapen utvecklas i snabb takt och tar över en hel del av våra ansträngningar, ökar också riskerna för att utsätta oss för en oförklarlig singularitet. Läs, vad singularitet kan betyda för oss.

Funktioner för Big Data Reference Architecture Layers

Funktioner för Big Data Reference Architecture Layers

Läs bloggen för att känna till olika lager i Big Data Architecture och deras funktionaliteter på enklaste sätt.

Utveckling av datalagring – Infographic

Utveckling av datalagring – Infographic

Lagringsmetoderna för data har utvecklats kan vara sedan födelsen av data. Den här bloggen tar upp utvecklingen av datalagring på basis av en infografik.

6 fantastiska fördelar med att ha smarta hemenheter i våra liv

6 fantastiska fördelar med att ha smarta hemenheter i våra liv

I denna digitala värld har smarta hemenheter blivit en avgörande del av livet. Här är några fantastiska fördelar med smarta hemenheter om hur de gör vårt liv värt att leva och enklare.

macOS Catalina 10.15.4 tilläggsuppdatering orsakar fler problem än att lösa

macOS Catalina 10.15.4 tilläggsuppdatering orsakar fler problem än att lösa

Nyligen släppte Apple macOS Catalina 10.15.4, en tilläggsuppdatering för att åtgärda problem, men det verkar som om uppdateringen orsakar fler problem som leder till att mac-datorer blir murade. Läs den här artikeln för att lära dig mer