2016-03-11

Setup a WordPress LAMP Web Server on your Raspberry Pi

The Raspberry Pi is one of the most popular ARM CPU boards for makers. Although it's not as powerful as a desktop PC, but it's still able to act as a web server. Just a little bit slow. .

Once we've set up our own Wordpress site, we also have a LAMP(Linux, Apache, MySQL, PHP) stack on our board. We can put our PHP programs to collect data from the devices and store them into the local database.

There is a formal tutorial page on the Raspberry Pi web site as follows:



My Summarized Notes:

Install Apache

sudo apt-get install apache2 -y
 

Changing the default web page

cd /var/www/html 
ls -al
 sudo chown pi: index.html
  

Install PHP

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

Install MySQL

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

Download and Extract WordPress


cd /var/www/html/ 
sudo chown pi: . 
sudo rm * 
wget http://wordpress.org/latest.tar.gz

 
tar xzf latest.tar.gz
mv wordpress/* .
rm -rf wordpress latest.tar.gz
 

Set up your WordPress Database


mysql -uroot -ppassword  
 mysql> create database wordpress;

Exit out of the MySQL prompt with Ctrl + D.

WordPress Configuration

Find out your Pi's IP address
hostname -I

Navigate to
http://YOUR-IP-ADDRESS


......

沒有留言:

張貼留言