首页 > 数据库技术 > 详细

RPi 2B apache2 mysql php5 and vsftp

时间:2016-02-20 00:24:22      阅读:270      评论:0      收藏:0      [点我收藏+]
/*************************************************************************
 *                RPi 2B apache2 mysql php5 and vsftp
 * 声明:
 *     本文主要记录RPi 2B如何安装Apache2、mysql、php5、vsftp服务器,并对其进行
 * 测试,为后续工作做准备,其中遇到SD卡空间不足的问题。
 *
 *                                    2016-2-19 深圳 南山平山村 曾剑锋
 ************************************************************************/

一、参考文章:
    1. Apache Server (PHP + MySQL) on Raspberry PI
        http://www.tuicool.com/articles/I7Jfue
    2. 树莓派(raspberry pi)学习10: 安装ftp服务器
        http://blog.csdn.net/c80486/article/details/8460854

二、安装流程:
    1. sudo apt-get update
    2. sudo apt-get install apache2 php5 libapache2-mod-php5
    3. sudo apt-get install mysql-server mysql-client php5-mysql
        mysql username: root
        mysql passwd: zengjf
    4. sudo apt-get install vsftpd
        username: pi
        passwd: raspberry

三、默认SD卡空间不够用:
    1. sudo raspi-config
    2. 选择选项卡1:Expand Filessystem

四、mysql 测试:
    pi@raspberrypi:~ $ mysql -hlocalhost -uroot -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 43
    Server version: 5.5.44-0+deb8u1 (Raspbian)
    
    Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type help; or \h for help. Type \c to clear the current input statement.
    
    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mysql              |
    | performance_schema |
    +--------------------+
    3 rows in set (0.00 sec)
    
    mysql> 

五、php5测试
    pi@raspberrypi:~ $ php -v
    PHP 5.6.17-0+deb8u1 (cli) (built: Jan 24 2016 12:25:22) 
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

六、apache2 php测试:
    1. cat /var/www/html/index.php
        <html>
            <head>
                <title> zengjf </title>
            </head>
            <body>
                <?php
                    echo "I am zengjf"
                ?>
            </body>
        </html>
    2. 浏览器访问:http://192.168.0.5
        <html>
            <head>
                <title>zengjf</title>
            </head>

            <body>
                I am zengjf    
            </body>
        </html>

七、vsftp 测试:
    浏览器键入:ftp://192.168.0.5
        / 的索引
        名称        大小    修改日期
        Desktop/              16/2/19 下午2:04:00
        Documents/            15/11/21 下午9:31:00
        Downloads/            15/11/21 下午9:37:00
        Music/                15/11/21 下午9:37:00
        Pictures/             15/11/21 下午9:37:00
        Public/               15/11/21 下午9:37:00
        Templates/            15/11/21 下午9:37:00
        Videos/               15/11/21 下午9:37:00
        python_games/         15/11/21 下午9:31:00
        show        0 B       16/2/19 下午2:06:00

 

RPi 2B apache2 mysql php5 and vsftp

原文:http://www.cnblogs.com/zengjfgit/p/5202407.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!