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

in bananapi •  8 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.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

继续试水

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