a pure Raspi web server with Raspbian Debian

Raspberry pi server

 Setups and configurations

 Raspberry pi - Rpi

 Apache / LAMP server

Windward

 The game not the island group

anchor life saver

 Regarding unity3d

🙂 In-game char icons

 Public game server settings

🛠 Hafenzoll @raspberry
🛠 Windward defaults

 Social news aggregation

Community @steam
🌍 Windward #reddit

 Official Windward wiki

🛠 Wiki @gamepedia
Duckduckgo pirate flag
Something else

 This is in German language

💻 Linux - ubuntusers.de

 Get a handy weather widget

🌤 Weather code snippet

 Hotchpotch of weblinks

📖 Yellow pages

 We got some boring movies

🎥 Cinematique
Archives
Search cloud
Front desk clerk

No ads, no trackers and
no web beacons. Promised.

Raspberry pi | Install php5, mySQL & phpMyAdmin


Apache Setup Raspberry pi mini computer to dedicated game server. LAMP. Apache Raspberry pi mini computer. Dedicated game server.
That is simply just another http web server powered by Apache Software
and the Raspberry pi Foundation with Raspbian Debian OS Stretch Lite on it.


Initially bring your system up to date and reboot your machine if required.


user@raspberry:~ $ sudo su
root@raspberry:~# apt-get update && apt-get upgrade && apt-get dist-upgrade
user@raspberry:~ $ reboot


Install php5


Fundamental services are required to turn the Raspberry pi into a real web server consisting of Apache - the web server itself -, php script language and MySQL database module. When installed on a Linux based system, the collective term is LAMP.


Linux  Apache  MySQL  PHP

php 5 logo

To allow the web server to process php files, you'll need to install php and the php module for Apache.
Start your terminal program e.g. PuTTy and login to your Raspberry. Continue as superuser.


user@raspberry:~ $ sudo su
root@raspberry:~# apt-get install php5 libapache2-mod-php5
root@raspberry:~# service apache2 restart


The root directory for web contents was /var/www in Raspbian Wheezy but is /var/www/html in Raspbian Stretch Lite.

Rename the file /var/www/html/index.html.

Be sure to check you’re not deleting files you need before running.


root@raspberry:~# cd /var/www/html
root@raspberrypi:/var/www/html# mv index.html index.old


Create a simple file index.php in /var/www/html.


root@raspberrypi:/var/www/html# nano index.php


index.php php5 phpinfo();


<?php phpinfo(); ?>


You can use a plain phpinfo() info page to view the current php details for your web server.
This file outputs a large amount of information:


◦ Information about php compilation options and extensions
◦ php version
◦ Server information and environment (if compiled as a module)
◦ php environment
◦ OS version information, paths, master and local values of configuration options
◦ http headers
◦ php license


Install mySQL


MySQL is a very popular database engine for example to 🔗 phpBB Forum. Like the php language script, its overwhelming presence on web servers enhanced its popularity. Most likely php & MySQL both work together.

We need to install MySQL server and the Python bindings for mySQL.


When installing MySQL you will be asked for a root password. Remember this to allow your website to access the MySQL database.


user@raspberry:~ $ sudo su
root@raspberry:~# apt-get install mysql-server mysql-client php5-mysql
root@raspberry:~# service apache2 restart


Install phpMyAdmin


phpMyAdmin is a software tool to bring MySQL to the Web. phpMyAdmin is a tool written in php intended to handle the administration of MySQL. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add columns, execute any SQL statement, manage indexes on columns.

phpmyadmin logo

user@raspberry:~ $ sudo su
root@raspberry:~# apt-get install phpmyadmin


The installation routine will ask you for few configuration options.


When installation is finished, open /etc/php5/apache2/php.ini with a text editor and find the Dynamic Extensions section ; Dynamic Extensions ; .


root@raspberry:~# nano /etc/php5/apache2/php.ini


Just add between Dynamic & Module the two lines:


;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

extension=msqli.so OR extension=/PATH_TO_EXTENSION/msqli.so
extension=msql.so OR extension=/PATH_TO_EXTENSION/msql.so

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

Now you have the MySQL extensions for php enabled.


Afterwards, run this command:

root@raspberry:~# sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin


This links your server's Document Root to /var/www/html on Raspbian Stretch Lite OS.

Due to security reasons you should use a different sub-folder.

For example /var/www/html/a-d-m-i-n/phpmyadmin


Restart apache service.


root@raspberry:~# service apache2 restart


Access phpMyAdmin by http://www.yourdomain.tld/phpmyadmin .


Few textual parts to this article were taken from the 🔗 official forum under raspberrypi.org.


Official Releases


🔗 php: Hypertext Preprocessor | 🔗 MySQL | 🔗 phpMyAdmin


Wordpress


WordPress is open source software you can use to create a beautiful website, blog, or application.


🔗 Build a LAMP web server for WordPress

🔗 Installing Wordpress - Wordpress Codex


Raspi is not a particularly fast machine. I think that Wordpress is bit too heavy for the little Pi.


18-Oct 2017

Hafenzoll 2019