Book Image

Banana Pi Cookbook

By : RYAD E DAJANI, Ryad El-Dajani
Book Image

Banana Pi Cookbook

By: RYAD E DAJANI, Ryad El-Dajani

Overview of this book

This book is intended for anybody who wants to learn how they can utilize the capabilities of the Banana Pi to its full potential. It's full of step-by-step guides and detailed descriptions for the whole range of possibilities in a language that is appropriate for computer enthusiasts and experts alike. It would be helpful to have a basic knowledge of Unix-like operating systems or programming, but no prior experience is required as every concept is explained in the appropriate sections.
Table of Contents (8 chapters)

Setting up a web application


In this recipe, we are going to explore the possibilities of the Banana Pi to run dynamic web applications. We will install the Nginx web server, the MySQL database server, and the PHP scripting language. In order to get this complete, we are going to set up the widely used blog software, WordPress, on top of our upcoming web stack.

Getting ready

The following ingredients are required to cook the web stack:

  • A running Banana Pi with a Debian-based Linux system

  • A configured network on the Banana Pi

How to do it…

We need to split this recipe into four parts.

  • The setup of the web server

  • The setup of the database server

  • The setup of PHP

  • The setup of WordPress

Installing the Nginx web server

There are a number of web servers on the market. In this recipe, we are going to use the Nginx (pronounced engine-x) web server as it performs well with the Banana Pi.

To set up the Nginx software, perform the following:

  1. Open a shell.

  2. Install Nginx:

    $ sudo apt-get install nginx
    
  3. Apt will ask you...