Raspberry PI origins from UK. It is a small (credit-card size) fully functional PC that installs Linux. To now, there are two models A and B of Raspberry PI. The A model has 1 USB, 256MB RAM and The enhanced B model has 2 USB, 512 RAM. Both are equipped with ARM 700MHz (single core) CPU, a SD card slot. The B model also comes with an onboard Ethernet interface. The Raspberry PI requires a micro USB power (5V, 1A) and it doesn’t have the power switch. It can be connected to monitor using HDMI or TV using composite video (RCA).
The SD card is used as the booting device ‘hard drive’, a minimal 4GB is required. You can download Linux images from official website. And you can use Win32 Disk Imager to write the *.img to SD card.
Insert the SD card into Raspberry PI.
Power it on and on the first time a configuration program (sudo raspi-config) will run. Using this configuration tool, you’ll be able to set up SSH, keyboard, Memory Split between CPU and GPU etc.
Run the following command to install Apache2 and PHP,
1 | sudo apt-get install apache2 php5 libapache2-mod-php5 |
sudo apt-get install apache2 php5 libapache2-mod-php5
And as we know, PHP without MySQL database is pretty much useless, so we use the following command to install MySQL.
1 | sudo apt-get install mysql-server mysql-client php5-mysql |
sudo apt-get install mysql-server mysql-client php5-mysql
During the MySQL setup, you will be prompted for the root password for MySQL database, and after that we’ll be able to check if MySQL is properly installed.
You can run sudo service mysql restart and sudo service apache restart to restart the MySQL and apache server manually. And you can run php -v to see the version of PHP.
pi@raspberrypi:~$ php -v PHP 5.4.4-14+deb7u9 (cli) (built: Apr 26 2014 21:57:41) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
The apache server will store a index.html by default on /var/www/index.html and if you open a browser and type in the IP address of the Raspberry PI, you will get something like this, which means your Raspberry PI now serves as a HTTP server.
Raspberry Pi
- Visiting The Raspberry Shop in Cambridge UK
- Overclocking ARM CPU of Raspberry PI 4 and 400 with Temperature Cooling Measures
- BASH Script to Monitor the CPU Frequency and Temperature on Raspberry PI
- All-In-One Raspberry PI 400 Kit - Personal Computer Kit with Raspbian OS
- How to Monitor the CPU Temperature of Raspberry PI using Python Script?
- Use PHP Script to Monitor Temperature and Uptime for Raspberry PI in the Browser
- Review: Raspberry PI B Plus Model
- Different Approaches to Reduce the CPU Temperature of Raspberry PI
- Test SD Card Speed on Raspberry PI
- Remote Desktop Connection for Raspberry PI (xrdp)
- Using a external USB cooler fan to drop temperature of Raspberry PI (Model B) from 51 degrees downto 40 degrees for just ten minutes
- How to Get the CPU Temperature on Raspberry PI using BASH Script?
- Apache Server (PHP + MySQL) on Raspberry PI
Devops / Site Reliability Engineering
- Python/Bash Script to Print the Optimized Parameters for MySQL Servers
- Learn to Manage Your MySQL Database with a Python Script
- A Simple PHP Command Line Tool to Convert MySQL Tables from MyISAM to InnoDB in Specified Database
- How to Print MySQL Table Summary using PHP?
- Secure the Linux Server by Disallow the Remote Root Login (SSH and FTP and MySQL database)
- Bash Script to Check, Repair, Optimise and Backup MySQL database
- Duplicate a MySQL table - Copy Table / Duplicate Database / PHP Script
- MySQL server stopped due of out of memory exception on Ubuntu VPS
- Running Apache Server (PHP + MySQL) on Raspberry PI
- How to Optimise SQL Queries? Quick Tips
- Recovery Models in SQL Server
- Database Optimisation Script in PHP
–EOF (The Ultimate Computing & Technology Blog) —
Last Post: VBScript Coding Exercise - Insertion Sorting Algorithm
Next Post: How to Get the CPU Temperature on Raspberry PI using BASH Script?