IT men's VPS series of tutorials Part II: privatization of network disk - to deal with public network disk crisis

This article is an article of partial technology. It is about the application of VPS and life-related applications, but it is not very difficult. I am also a management professional and I am now selling it.

And this article is a series of tutorials, has written the first one before, on the penetration of the intranet, the specific can be seen here:

IT men's VPS series of tutorials Chapter 1: Intranet penetration (Frp) - to save you from the public IP network, an overview of this article is a partial technology article, the target population has not contacted the field of white. Although it is a technical article, it is not very difficult. I am also a management professional born and sold now. Look at Aunt Zhang's article here is really not much, so it is worth mentioning. The article is a series of tutorials. Since there are too many ideas in the mind, there is no motivation to write them out at one time, so the series is made. What is VPS? VPS(Virpavilion1019| Likes 397 Comments 261 Favorites 3k View Details


You have received a lot of evaluations from netizens. There are encouragement and guidance. Thank you very much. You also have enough motivation to continue writing down.

This knowledge is not my own initiative. Many of them come from the Internet. Therefore, I would like to thank this open and free environment and thank the users for their sharing spirit.

I. Overview

In the past year, we have seen too many network disks fall, and it was suddenly so sudden that we were even caught off guard. We have not asked whether there is a place for commercial network disk in the future. How can they find a balance between profitability and service? I cannot answer this question and cannot evaluate it. But the reality is that many people have started to build their own Private network disk, I am no exception.

Therefore, this article will tell you: Use Owncloud to build a private network disk on the VPS.

ownCloud is an open source free storage management tool that can help you quickly set up a set of dedicated web services. You can implement cross-platform file synchronization, sharing, version control, team collaboration, and so on like Dropbox.

Use Owncloud to build a private network disk, advantages and disadvantages:

advantage:

(1) The network disk is set up on its own VPS, at least it will not appear that the commercial network disk is inverted, and the stability and privacy are relatively high. (2) Owncloud is an open source software with very good functionality and provides a very rich client, PC, Android, IOS, etc., and it has a very powerful synchronization function. (3) Owncloud can mount files from external storage (such as FTP, WebDAV, Amazon S3, and even Dropbox and Google Drive) to ownCloud for seamless storage and sharing.

Disadvantages:

(1) Owncloud needs to use VPS storage space for storage, so storage space is very valuable, even if it is mounted Amazon S3, Alibaba Cloud OSS or Dropbox network disk, is also very precious, it is unlikely that a disk drive 2T storage space . Therefore, it is impossible for you to want to save video. I usually use data as the primary factor, taking into account photos.
(2) There is a little bit of technology in setting up the platform. Once Owncloud has problems, it needs to be solved by yourself.

In summary, whether it is suitable or not depends on your use. If it is video, photo storage, then this may not be suitable for you, if you want to have a private data network disk, with synchronization and sharing capabilities, this will suit you.

Second, the construction process

1, create a VPS

Creating a VPS and registering a domain name has already been described in detail in the previous section.
In this article I used a Digitalocean SFO node and a me domain registered from Namecheap (I have to say that these two were sent via Github's StudentPack. It would be very affordable, if the student must not let go).

(1) When creating a VPS, there is a requirement for the Linux version. Refer to the official request. Please note.

Server

Debian 7 and 8
SUSE Linux Enterprise Server 12 and 12 SP1
Red Hat Enterprise Linux/Centos 6.5 and 7 (7 is 64-bit only)
Ubuntu 14.04 LTS

(2) The domain name resolution is somewhat different from the previous one. I only want to use a subdomain name doc.xxx.me as the domain name of the network disk. Just make an A record here and point the domain name directly to our VPS address. And so parsing this write:

2, install LNMP

Owncloud is a php language program, if you want to run on Linux, then you need to install a series of programs (Nginx/MySQL/PHP or other), and LNMP (specifically, the military brother) is a one-click installation package, can be convenient Install the LNMP (Nginx/MySQL/PHP) production environment.

LNMP is a long-maintained military brother, completely free of charge, a key installation package, which does not require one by one to enter the command, no need to watch, compile and install optimized compiler parameters, improve performance, solve unnecessary software dependencies, especially for the configuration automatically optimize. Details can be accessed at https://lnmp.org/ Of course there are other one-click packages such as Vesta, Pagoda, OneinStack, etc., but individuals have always loved the military brother's LNMP and recommend it to everyone.

(1) Using Putty to log in to the VPS, enter the following three commands:

Apt-get update
Screen -S lnmp
Wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz && cd lnmp1.4 && ./install.sh lnmp

(2) Installation and configuration

After that, there are some configurations for LNMP installation. Note that Owncloud has certain requirements on the version. For example, the database requires MySQL or MariaDB 5.5 or above, PHP version (5.6 or above), so pay attention to the installation. Details can be poked here.

The default item is a direct carriage return, non-default items enter the corresponding number, the password must be modified, specific options can be seen in the figure. Finally press any key to start the installation.

The specific explanation can be seen in the instructions of the military brother: https://lnmp.org/install.html

After a period of time is the compilation and installation, wait for a cup of coffee, until the following prompt is installed, the time is longer.

3, install Owncloud

(1) Add a vhost

Lnmp vhost add

After some configuration, according to the following figure

(2) Download and Unzip Owncloud

Cd /home/domain
Wget https://download.owncloud.org/community/owncloud-10.0.2.zip
Unzip owncloud-10.0.2.zip
Cd owncloud
Mv * ../

(3) New database

Access the phpmyadmin folder in the vps root directory, such as http://vps/phpmyadmin/, username is root, and the password is just set.

Click Account - Create New User Account

Enter the user name and password and give them permission. Finally click on the lower right corner to execute.

(4) Adjust the authority

Add to owncloud

Cd /home/domain
Chown -R www *

(4) open pathinfo

This involves the operation of a vi editor, you can specifically search for the vi editor Baidu, Linux is the foundation, it is worth learning.

Vi /usr/local/nginx/conf/vhost/domain.conf
Replace include enable-php.conf; with include enable-php-pathinfo.conf;
Lnmp nginx restart

(5) Install Owncloud

Visit the domain name that you just set up, enter the login username and password for Owncloud, the username and password you just created for the database, and note the arrows.

After clicking Finish Setup, wait a moment to install ok.

After the installation is complete, the first login will also prompt the client's download link.

After landing interface.

(6) adjust the php upload size limit

Since PHP's default upload file size limit is 50M, you need to adjust:

Vi /usr/local/php/etc/php.ini
Find upload_max_filesize, modified to upload_max_filesize=500M
Find post_max_size, modified to post_max_size=500M
Lnmp restart


4, multi-client installation

(1) PC client

First go to https://owncloud.org/install/#install-clients to download the client and install it.

Enter the domain name

Enter user name and password

Select sync content

In the system, it operates like a normal folder.

(2) Mobile client

I don't know when the mobile client will start charging, but I don't normally need it.

5. Mount external network disk

The biggest advantage is that free expansion of your storage space, foreign network disk generally have dozens to dozens of free space G, and this is interconnected by VPS and network disk, like foreign network disk you understand; if If you have money, you can also choose Amazon S3 to pay for the object storage, the effect is very good.

For example, if Google and Dropbox are installed, they can get about 40-50g of stable space. In Owncloud or PC, it is also directly reflected as a folder format, which is very convenient and automatically synchronizes in the company and home.

6, Owncloud other features: I just want to say, too many functions, I did not fully understand that there are many plug-ins, so everyone to explore it.

(1) Plug-ins: Owncloud has a lot of plug-ins that can implement additional functions, which are generally subject to availability.
(2) Sharing: Partial data and folders can be shared, and can be encrypted or not encrypted.
(3) User Management: Multiple users can be added. User rights, quotas, etc. can be set.
(4)....

Third, other

(1) Owncloud can also be built on home NAS. The advantage is that the speed and storage capacity of the internal network are greatly improved, but the public network access capability is weaker.
(2) There are also some other open source programs that can implement private network drives, such as KODExplorer.
(3) In fact, personally think that private network disk and commercial network disk are also different and complementary, each has its own strengths, the key point is to choose the right product based on their own needs.

If anything is inappropriate, please feel free to comment.

Mini PC V310 Series

Mini Pc V310 Series,Mini Fan Pc,Ryzen Nuc,Amd Ryzen Mini Pc

Guangdong Elieken Electronic Technology Co.,Ltd. , https://www.elieken.com