php MariaDB MySql Apache and phpmyadmin set up.

Post Reply
mpskinner
Site Admin
Posts: 69
Joined: Wed Sep 20, 2017 6:52 am

php MariaDB MySql Apache and phpmyadmin set up.

Post by mpskinner » Wed Oct 25, 2017 11:00 pm

The IP address below is my Pi's ip address.

Code: Select all

sudo ssh pi@192.168.1.4
PW ***************

Its good practice to upgrade your system to all the latest code.

Code: Select all

sudo apt-get update && sudo apt-get upgrade -y
Install Apache

Code: Select all

sudo apt-get install apache2 -y
Go to the apache default IP address is the IP address of your PI Zero

Install phg. This one Worked.

Code: Select all

sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip

<?php phpinfo(); ?>

Code: Select all

sudo apt-get install mariadb-server

Code: Select all

sudo mysql -u root -p  
just press enter..

Code: Select all

CREATE USER 'newuser'@'localhost' IDENTIFIED BY '*********';

Code: Select all

GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
Install phpmyadmin

Code: Select all

sudo apt-get install phpmyadmin
Open this file

Code: Select all

sudo nano /etc/apache2/apache2.conf
Paste at bottom

Code: Select all

Include /etc/phpmyadmin/apache.conf

Code: Select all

/etc/init.d/apache2 restart
or

Code: Select all

sudo service apache2 restart
Give PI a Static IP address

Code: Select all

sudo nano /etc/dhcpcd.conf
static routers & static domain_name_server are your router ip address..static ip_address= Your chosen IP for your PI. Leave /24 alone
Paste at Bottom :

Code: Select all

interface wlan0

static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

Post Reply