RaspberryPi 搭建云

RaspberryPi 搭建云

RaspberryPi 搭建云

换源

1
sudo nano /etc/apt/sources.list
  • 改为
1
deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

安装 Apache

1
sudo apt-get install apache2

安装 MySQL

1
sudo apt-get install mysql-server

配置mysql

1
sudo vim /etc/apache2/apache2.conf
  • None改成All
  • 设置 MySQL 账户密码
1
2
3
4
sudo mysql -u root -p
update mysql.user set plugin='mysql_native_password';
update mysql.user set password=PASSWORD("newpassword") where User='root';
flush privileges;

安装 PHP 及依赖

1
sudo apt-get install php5 php5-gd php-xml-parser php5-intl php5-sqlite php5-mysql smbclient curl libcurl3 php5-curl

安装phpMyAdmin

1
sudo apt-get install phpmyadmin

下载ownCloud

1
2
3
4
sudo wget https://download.owncloud.org/community/owncloud-9.1.4.zip
sudo unzip owncloud-9.1.4.zip -d /var/www/html/
cd /var/www/html/owncloud
sudo mkdir data
  • 修改目录权限
1
2
3
sudo chown -R www-data:www-data data
sudo chown -R www-data:www-data config
sudo chown -R www-data:www-data apps

配置 OwnCloud

  • 浏览器打开
1
raspberryIP/owncloud

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×