How to install Apache、MYSQL、PHP5 and run a Wordpress website on BananaPi

in #bananapi8 years ago

In my previous post, I introduce you how to install OpenCV on BananaPi and also provide two example program wrote in C++ and Python.
[在香蕉派上使用摄像头:安装 & C++/Python示例程序]/Using OpenCV on BananaPi : Install & example programs in C++ / Python

In this article, I'll introduce you how to install Apache、MYSQL、PHP5 and run a Wordpress website on BananaPi.

Install Apache2 /安装Apache2

to install apache2, just run following command:
sudo apt-get install apache2

Now, Open the BananaPi Ip address in browser:

Install PHP5/安装PHP5

To install php5, run following command:
sudo apt-get install php5

You need restart apache2 to make php5 take effect
sudo /etc/init.d/apache2 restart

"Hello World" page

    <?
    echo "Hello World!";
    ?>

"php info" page

    <?
    phpinfo();
    ?>

Browse page info page in browser:

Install MySQL

Run following command to install MySQL
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql (用于在PHP中链接MYSQL数据库)

Basic control command:
Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status

Install Wordpress

The official website:
https://wordpress.org

Download
sudo wget https://wordpress.org/latest.tar.gz

Extract it/解压
sudo tar xzvf latest.tar.gz

Create Database and tables
mysql -u root -p

create database wordpress;

Visit installation directory of WordPress in browser (change to your BananaPi IP)
http://192.168.1.42/wordpress/

Redirect to setup page
http://192.168.1.42/wordpress/wp-admin/setup-config.php
Just following the instructions on the page.

Finished

Enjoy it.

Sort:  

继续试水

Upvoted! Here you can find both free & premium WordPress themes: https://www.mageewp.com/wordpress-themes/

Coin Marketplace

STEEM 0.22
TRX 0.21
JST 0.035
BTC 98577.14
ETH 3328.76
USDT 1.00
SBD 3.09