.. post:: Sep 26, 2020 :author: JeffreyGuan :category: 树莓派 :location: SF :tags: 树莓派,私有云,owncloud .. :excerpt: 1 .. figure:: https://gitee.com/double12gzh/wiki-pictures/raw/master/2020-09-26-private_cloud/4.png :alt: 树莓派-owncloud搭建私有云 ========================= 摘要:使用树莓派和owncloud搭建私有云。 1. 准备工作 ----------- 1.1 硬件 ~~~~~~~~ 满足以下条件的树莓派: - 网络连接正常 - 能够ssh - 外接了显示屏和鼠键 - 正确设置软件源并更新好系统 1.2 软件 ~~~~~~~~ 安装apache2, mysql, php等 .. code:: bash sudo apt-get install -y mysql-server apache2 php5 php5-gd php-xml-parser php5-intl php5-sqlite php5-mysql smbclient curl libcurl3 php5-curl phpmyadmin 安装owncloud .. code:: bash apt-get install -y ownCloud 1.3 配置mysql ~~~~~~~~~~~~~ - 登陆数据库 .. code:: bash mysql -u root -p - 添加授权 ``GRANT ALL ON 数据库名称.* to ‘数据库用户名’@‘localhost’ IDENTIFIED BY ‘数据库密码’;`` 例如: ``GRANT ALL ON mydatabasename.* to 'mydatabaseusername'@'localhost' IDENTIFIED BY 'mypassword';`` - 使上述命令生效 ``FLUSH PRIVILEGES;`` - 退出数据库 ``exit`` 到此树莓派上面的工作就全部完成了。 2. 访问 ------- 接下来用局域网内的其他设备,在浏览器地址栏中输入 ``http:://{树莓派IP地址}/owncloud`` 回车后可以看见下面界面: .. figure:: https://gitee.com/double12gzh/wiki-pictures/raw/master/2020-09-26-private_cloud/1.png :alt: .. figure:: https://gitee.com/double12gzh/wiki-pictures/raw/master/2020-09-26-private_cloud/2.png :alt: .. figure:: https://gitee.com/double12gzh/wiki-pictures/raw/master/2020-09-26-private_cloud/3.png :alt: 参考 ---- - `用树莓派搭建私有云吧|明明白白玩 Pi系列之四 `__ ---------------------- 欢迎关注我的微信公众号: .. figure:: https://gitee.com/double12gzh/wiki-pictures/raw/master/wechat_public.jpg :alt: