当前位置:网站首页>A small strategy: how to maximize the use of Qingyun qingcloud special model

A small strategy: how to maximize the use of Qingyun qingcloud special model

2021-01-23 20:04:11 Qingyun qingcloud

lately Qingyun QingCloud It's a special sale , The cheapest mainframe (VM Instance) It's as low as the annual fee 89.9 RMB , Weiqian Ramen now has to 51 It's a bowl …, What can I do after I buy it ? Someone blogs 、 Someone ran Git、 Someone did the test , Here's an idea , It can extract the value of this machine to the greatest extent , And solve practical problems and needs in work and life .

from 2007 The mobile Internet, which gradually emerged in, has made us each have a variety of electronic devices on hand , Like my own daily equipment :

  • Android Phone - Telephone ( At any time )
  • iPad Pro - Mobile office AIDS ( travel on business )
  • Mac Book Pro - Mobile office equipment ( travel on business )
  • PC with Arch Linux - Fixed office equipment ( Office or home )

There are more people using Windows equipment , It can be seen that in our daily work and life, we span a wide range of devices . In order to solve the problem in so many different manufacturers 、 Data synchronization and consistency between devices of different operating systems , You're going to think about it Dropbox and Baidu SkyDrive , however :

  • The former is outside the wall , Climbing over the wall is a very technical job 、 And it's not suitable for data synchronization 、 High cost 、 And there's the extra xx risk …;
  • The latter has serious privacy and user data security problems ;
  • If you have a lot of data , The free version will not be able to support , And pay , It will be much more than 89.9 element .

Famous open source project Nextcloud It's easy to perfectly address this need , And because it's self deployed (self-hosted), So there's no privacy issue 、 Free version restrictions and other issues . Of course ,Nextcloud It's not just a network disk and file synchronization function , Through its plug-in system, it is easy to realize a complete productivity platform .

The following operation uses a computer located in guangdong 2 District Of Arch Linux host , You can choose what you like Region and Linux Distribution . I won't describe how to create a host , Just follow the guide .

1. Prepare the work environment

1.1. EIP

After the host is created , need EIP( Elastic public network IP Address ) Connect to the Internet . stay Web Console Go to the navigation bar Network and CDN -> Public network IP, Then apply for a IPv4 EIP, Bind to your host .

1.2. Docker

modify pacman Mirror source :

/etc/pacman.d/mirrorlist

Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch

Refresh the operating system :

    
pacman -Syyu
reboot

install Docker:

pacman -S docker

To configure Docker Daemon:

/etc/docker/daemon.json
{
    "experimental": true,
    "bridge": "none",
    "registry-mirrors": [
        "https://docker.mirrors.ustc.edu.cn/"
    ]
}

start-up 、 Enable Docker:

systemctl start docker
systemctl enable docker

2. function nextcloud

Create a working directory :

mkdir -p /srv/nextcloud/{server,data}

Pull the latest stable version 、 And start the nextcloud server:

docker pull nextcloud:latest

docker run --name nextcloud --restart unless-stopped \ 
    -v /srv/nextcloud/server:/var/www/html \
    -v /srv/nextcloud/data:/var/www/html/data \
    --network host -d nextcloud:latest

Then open the browser , Enter the address http://your-eip-address, You can start to nextcloud server Do initialization configuration . The template uses... By default TCP 80 port , Please remember to go to Security -> A firewall , Make sure TCP The downside 80 The port is open .

Initialization configuration is simple , There are only three projects :

  • In the initialization interface , The first user created has administrator rights ;
  • keep Storage & database unchanged ;
  • Cancel (uncheck) Install recommended apps.

And then click Finish Setup, Just wait for it to finish .

3. Optimize nextcloud

Nextcloud It's a huge system , There are many places that can be adjusted and optimized , Here I just point out two optimization of network disk and file synchronization function that are more suitable for small groups or individuals , After all, we usually buy low configuration models when promoting sales .

3.1. It's no use banning apps

Use the nextcloud After the administrator login , open apps Configuration page , The address is http://your-eip-address/setti..., Disable the following apps:

  • Accessibility
  • Activity
  • Collaborative tags
  • Federation
  • First run wizard
  • Nextcloud announcements
  • Privacy
  • Recommendations
  • Support
  • Usage survey

3.2. cron job

Nextcloud There's a series of jobs that work backstage , Create two new profiles :

/etc/systemd/system/nextcloud-cron.service

[Unit]
Description=Nextcloud cron.php job

[Service]
ExecStart=docker exec --user www-data nextcloud php -f /var/www/html/cron.php

/etc/systemd/system/nextcloud-cron.timer

[Unit]
Description=Run Nextcloud cron.php every 10 minutes

[Timer]
OnBootSec=5min
OnUnitActiveSec=10min
Unit=nextcloud-cron.service

[Install]
WantedBy=timers.target

Enable 、 start-up :

systemctl daemon-reload
systemctl enable nextcloud-cron.timer
systemctl start nextcloud-cron.timer

then , Log in as administrator account nextcloud, Get into Settings -> Administration -> Basic settings -> Background jobs, Choose Cron This project , that will do .

4. nextcloud client

Nextcloud client Support all operating systems on the market , Include Windows、Linux、Mac OS X、Android、iOS、iPadOS, It can be downloaded and installed from its official website or various mobile application markets .

5.( Optional ) The ultimate cost saving operation

Rational use of Qingyun QingCloud Some of our free policies , Take a little bit of technical time , It can save money forever , Here are two examples .

5.1. Use IPv6 EIP

If your daily network environment ( The office 、 Family, etc ) Yes IPv6 Words of support , It is strongly recommended to use after the above configuration IPv6 Of EIP Address substitution IPv4 Of , Because Qingyun QingCloud IPv6 The address is free . Now in most cases in China ,IPv6 It's deployed by default , Take Beijing Telecom as an example , Its ADSL Broadband and mobile phones 4G The network has been well supported IPv6, And the Bureau turns it on by default .

Be careful , because IPv6 The address cannot be used directly in the browser address bar , So you have to use FQDN Domain name resolves to IPv6 Address , Qingyun QingCloud Free... Is provided DNS Authoritative analysis service , be located Web Console Of the navigation bar Network and CDN -> DNS.

5.2. Use object store

Qingyun QingCloud Is stored in 10GB Within capacity is free , And in the same place as Region The traffic between hosts is intranet , Steady speed, high speed 、 And it's totally free , stay Web Console Go to the navigation bar Storage -> Object storage , And then create a bucket.

Nextcloud Can support S3 Objects are stored as external storage, And Qingyun QingCloud Object storage is fully compatible compatible S3 APIs, Just do the following three steps :

  1. In the administrator interface apps I use External storage support.
  2. stay Settings -> Administration -> External storages Choose All user to mount external storage、 And ensure Amazon S3 Is the selected subitem .
  3. stay Settings -> Personal -> External storages Choose from Amazon S3, Then enter the corresponding Qingyun QingCloud Object to store information .

That's more 10GB Free space .

More ways to play , You can dig ,have fun !

More can be found at www.qingcloud.com

版权声明
本文为[Qingyun qingcloud]所创,转载请带上原文链接,感谢
https://chowdera.com/2021/01/20210123200322612a.html

随机推荐