Raspberry Pi tutorial

Next >>

Introduction

Raspberry Pi is a series of board computers developed by the Raspberry Pi Foundation.
All models uses a Broadcom processors with speed ranges from 700 Mhz to 1.4 GHz.
On-board RAM memory ranges from 256 MB to 1 GB.


Raspberry Pi 3B+ specifications:

RaspberryPi

- Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit SoC @ 1.4GHz
- 1GB LPDDR2 SDRAM
- 2.4GHz and 5GHz IEEE 802.11.b/g/n/ac wireless LAN, Bluetooth 4.2, BLE
- Gigabit Ethernet over USB 2.0 (maximum throughput 300 Mbps)
- Extended 40-pin GPIO header
- Full-size HDMI
- 4 USB 2.0 ports
- CSI camera port for connecting a Raspberry Pi camera
- DSI display port for connecting a Raspberry Pi touchscreen display
- 4-pole stereo output and composite video port
- Micro SD port for loading your operating system and storing data
- 5V/2.5A DC power input
- Power-over-Ethernet (PoE) support (requires separate PoE HAT)

Installing operating system image

Download the image of Raspbian from the Raspberry Pi website:


RaspberryPi

The image is named raspbian.img.
For copy this image to a microSD card (8GB or up), and make the microSD card bootable, you must download and install the Etcher application.


Etcher

Connect the micro SD card to the PC, select the file raspbian.img, press Next and wait for the card to finish copying.
Extract the card from your PC and plug it into the Raspberry Pi card and power on. For the first booting OS, you must connect a keyboard, a display and a mouse for initial settings. After that, you can access your board over SSH or with VNC viewer.


RaspberryPi

You can set the VNC server on Raspberry Pi3B+ board, install a VNC viewer on your PC and access the graphical interface Pixel from VNC Viewer:


VNC

Complete the user and password, and the graphical interface Pixel is shown:


Pixel

For a SSH connetion, install Putty aplication:


Putty

Choose SSH, set the Host name, SSH port and click OK:


Putty

Installing Apache web server:

First, update the available packages by typing the following command into the Terminal:


sudo apt-get update
sudo apt-get upgrade -y


Then, install the apache2 package with this command:


sudo apt-get install apache2 -y


y default, Apache puts a test HTML file (index.html) in the web folder (/var/www/html). This default web page is served when you browse to http://localhost/


Apache

For read/write permission to the web directory, type:


sudo chown -R pi:www-data /var/www/html/
sudo chmod -R 770 /var/www/html/


Then, edit apache.conf file with nano editor:


nano /etc/apache2/apache2.conf


and change AllowOverride None with AllowOverride All:


AllowOverride None


cu


AllowOverride All


Setarile directorului www vor fi


<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directoty>


Now, reset the Apache web server:


sudo service apache2 restart


Installing PHP5:

To allow your Apache server to process PHP files, you'll need to install the latest version of PHP and the PHP module for Apache. Type the following command to install these:


sudo apt-get install php libapache2-mod-php -y


Now remove the index.html file and create the file index.php. In this file write:


echo "lt;?php phpinfo ();?>"


Browse to: http://localhost/ and the file index.php will be shown.


Php

Installing MySql server:

For installing MySql server, type:


sudo apt-get install mysql-server php-mysql -y


After that, restart the Apache web server:


sudo service apache2 restart


Now, open Terminal and type:


sudo mysql


and the MySql server will responde. Type:


show databases;


and all databasee will be shown.


MySql

Installing PhpMyAdmin utilities:

For installing PhpMyAdmin, type in Terminal:


sudo apt-get install phpmyadmin -y


For accesiing PhpMyAdmin remote from web browser, type in Terminal:


sudo ln -s /usr/share/phpmyadmin /var/www/html


Now, browsing to: http://loalhost/phpmysql:


PhpMyAdmin

Now, you can create in graphical mode: new users, new databases, tables, etc.


PhpMyAdmin
Next >>