Raspberry Pi Building Cloud Disk Tutorial

1. Replace the software source

First open the file
and comment out the original source address with # sign in front.

sudo nano /etc/apt/sources.list

然后把下面的源地址复制进去
deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

复制好了以后点击ctrl -x保存退出

输入下面指令更新一下
sudo apt-get update

2. Install Apache

Apache is the world's number one web server software (open source web server). It can run on almost all widely used computer platforms. Because of its cross-platform and security is widely used, it is one of the most popular web server-side software

sudo apt-get install apache2 

3. Install MySQL

MySQL is the best relational database management system application software. It is small in size, fast in speed, and low in total cost of ownership. Especially with the feature of open source , MySQL is generally chosen as the website database for the development of small and medium-sized websites.

sudo apt-get install mysql-server

4. Install PHP and its dependencies

PHP is a general open source scripting language. The grammar absorbs the characteristics of C language, Java and Perl, is conducive to learning, widely used, and is mainly suitable for the field of Web development.

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

5. Install phpMyAdmin

sudo apt-get install phpmyadmin 

img

img

img

6. Download ownCloud

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

7. Modify directory permissions

OwnCloud needs to have write permissions to some directories during the installation process. For this, web server users (www-data for Debian-based systems) must have permissions to the apps, data, and config directories. Run the following command to finish

sudo chown -R www-data:www-data data

sudo chown -R www-data:www-data config

sudo chown -R www-data:www-data apps

8. Configure mysql

 sudo nano /etc/apache2/apache2.conf

Change the unknown in the file below from None to All
img

img

Many articles on the Internet say that the password will be entered during the installation process, Barabara, so I will concentrate on waiting for the download, so. . . The installation is complete. . . Then when I log in, I will say that I have encountered a login verification problem. Most of them say that it is Balabala who updates the password, but it still cannot be solved. After checking a lot of information, I found that there was a problem with the mysql password verification method under its baseband linux version.

 sudo mysql -u root -p 然后随便输密码是能登录进去的

update mysql.user set plugin='mysql_native_password'; #重置加密方式

update mysql.user set password=PASSWORD("newpassword") where User='root'; #设置新密码,在newpassword处输入你想设置的密码

flush privileges; #刷新权限信息

9. Configure owncloud

Open the browser and enter http://IP/owncloud to enter the setting installation interface

img
Feel free to set an account password you like (the account password for logging in to the cloud in the future)

img

Fill in the account password set by mysql just now

img

Click the installation to complete
and wait for a while after completing the filling, the setting will be successful and it can be used normally.
Insert picture description here

10. Disadvantages and improvements:

1. After it is set up, it can only be accessed in your local area network.
2. The Raspberry Pi itself has a small memory and cannot store too many things.
In the following video we will teach you how to do intranet penetration and hard disk mounting to solve the problem. The two questions above.

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41676577/article/details/112856658