snapd_snapd使管理Nextcloud变得轻而易举
snapd
As I’ve described in both my Linux in Action book and Linux in Motion course, Nextcloud is a powerful way to build a file sharing and collaboration service using only open source software running on your own secure infrastructure. It’s DropBox, Skype, and Google Docs all rolled into one, but without the vendor lock-in, security, and privacy fears.
正如我在《 Linux in Action》一书和《 Linux in Motion》课程中所描述的那样,Nextcloud是一种仅使用在自己的安全基础架构上运行的开源软件来构建文件共享和协作服务的强大方法。 DropBox,Skype和Google Docs全部整合为一个,但没有供应商锁定,安全性和隐私担忧。
While the platform is certainly well-designed and polished, the initial installation can be tricky. Looking for proof? Try manually installing Nextcloud on an Ubuntu 18.04 server using any one of the detailed instructions available around the internet. Sometimes everything goes smoothly, but not always. You might encounter packages no longer supported by the official upstream repositories or changed dependencies. Don’t blame the people who wrote those guides: blame the pace of change in official Linux software repositories.
虽然平台肯定经过了精心设计和完善,但初始安装可能会很棘手。 寻找证据? 尝试使用Internet上任何可用的详细说明之一,在Ubuntu 18.04服务器上手动安装Nextcloud。 有时一切进展顺利,但并非总是如此。 您可能会遇到官方上游存储库不再支持的软件包或已更改的依赖项。 不要怪罪那些指南的编写者:怪怪官方Linux软件存储库的变化步伐。
使用快照安装Nextcloud (Using snapd to Install Nextcloud)
There is a better way, but it’s got its own dark side.
有更好的方法,但是它有其自身的阴暗面。
As I wrote in this article, Canonical’s snapd package management system was designed to simplify the safe and predictable distribution of software across multiple Linux distributions and releases. And it works. Take the Nextcloud snap. Rather than investing 15 minutes, a lot of terminal typing — and some serious troubleshooting when things don’t go the way you’d hoped — preparing the underlying software stack on your server for Nextcloud works with a single command:
如我在本文中所写 ,Canonical的快照式软件包管理系统旨在简化跨多个Linux发行版和发行版的安全且可预测的软件发行。 而且有效。 以Nextcloud快照。 无需花费15分钟的时间,而是需要进行大量终端输入操作(以及在事情不尽如人意时进行一些严重的故障排除),而是只需一个命令即可在服务器上为Nextcloud准备基础软件堆栈:
snap install nextcloud
That’s it. No really. The snap system will stand up a working Nextcloud server for you, complete with backend layers running standalone instances of MySQL, Apache, Redis, and PHP. Try it yourself on your snap-enabled Linux machine.
而已。 不完全是。 快照系统将为您架起一台正在运行的Nextcloud服务器,并具有运行MySQL,Apache,Redis和PHP的独立实例的后端层。 在支持快照的 Linux机器上自己尝试。
So far so good. You can now manually set up an admin account and assign a password (hopefully better than the one in this example):
到目前为止,一切都很好。 现在,您可以手动设置一个管理员帐户并分配一个密码(希望比本示例中的密码更好):
nextcloud.manual-install admin password
One more step. By default, Nextcloud will accept HTTP requests addressed to localhost from the server itself. But, as will usually be the case, you’ll probably be setting things up on a remote or virtual server (like an AWS EC2 instance, for instance). So you’ll need to tell Nextcloud to expect remote browser requests made to your IP address or domain name. This is how it might look. Note how you assign a separate ID number (1 and 2 in this example) for each domain.
再一步。 默认情况下,Nextcloud将从服务器本身接受发给localhost的 HTTP请求。 但是,通常情况下,您可能会在远程或虚拟服务器(例如,AWS EC2实例)上进行设置。 因此,您需要告诉Nextcloud期望对您的IP地址或域名发出的远程浏览器请求。 这就是它的外观。 请注意如何为每个域分配一个单独的ID号(在此示例中为1和2)。
nextcloud.occ config:system:set trusted_domains 1 \--value=nextcloud.bootstrap-it.com$ nextcloud.occ \ config:system:set trusted_domains 2 \--value=192.168.2.45
Those values will be saved to the config.php file, which you can read for yourself.
这些值将保存到config.php文件中,您可以自己阅读。
cat /var/snap/nextcloud/current/nextcloud/config/config.php
With that done, you should now be able to browse to the Nextcloud server’s IP address (or domain name) and log yourself into the admin console using the admin credentials you set up just before. I’ll let you explore the interface on your own.
完成此操作后,您现在应该能够浏览到Nextcloud服务器的IP地址(或域名),并使用之前设置的管理凭据将自己登录到管理控制台。 我将让您自己探索界面。
Nextcloud故障排除和管理 (Nextcloud Troubleshooting and Administration)
But I did say that the Nextcloud snap had its dark side, didn’t I? Well, suppose something goes wrong. Suppose, one fine day, your users are unexpectedly prevented from logging in normally to the Nextcloud UI. Even login attempts by admin users fail. Your first and only option at this point is to SSH into the server.
但是我确实说过,Nextcloud的一面是阴暗的,不是吗? 好吧,假设出了点问题。 假设有一天,出人意料地阻止了您的用户正常登录Nextcloud UI。 甚至管理员用户的登录尝试也会失败。 此时,您的第一个也是唯一的选择是SSH进入服务器。
I’m sure this won’t be your first administration experience on a Linux server. You’re wearing a fully-stocked tool belt and — to be honest about it — you’re actually looking forward to the challenge.
我敢肯定,这不会是您第一次在Linux服务器上进行管理。 您戴着一条存货充足的工具带,而且,老实说,您实际上是在期待挑战。
But wait! What’s this? The /etc/ directory contains no files with any obvious connection to the Apache, Redis, and MySQL services that you know are running, and the logs in /var/log/ are all mysteriously quiet. Even systemctl status doesn’t offer any hope. So much for your fully-stocked Linux tool belt.
可是等等! 这是什么? / etc /目录中没有包含与您正在运行的Apache,Redis和MySQL服务有任何明显连接的文件,并且/ var / log /中的日志都非常安静。 甚至systemctl的状态也没有任何希望。 您的库存充足的Linux工具带就这么多了。
Then, like the proverbial ton of bricks, it hits you: you installed Nextcloud using snapd. All the old rules don’t apply. Where are you going to go for help on this one? Well, if I may humbly suggest, you could start by reading my Managing Ubuntu Snaps article. That will explain where snapd hides important snap-based configuration files on your file system. It will also introduce you to some helpful snap admin tools.
然后,就像成堆的砖头一样,它给您带来了冲击:您使用snapd安装了Nextcloud。 所有旧规则都不适用。 您打算在哪里寻求帮助? 好吧,如果我谦虚地建议,您可以先阅读我的《管理Ubuntu Snaps》文章 。 这将说明快照在何处隐藏文件系统中重要的基于快照的配置文件。 它还将向您介绍一些有用的快照管理工具。
However, the rest of this article will focus on the Nextcloud project’s own command line tools — tools that can help you through some serious administration magic.
但是,本文的其余部分将重点介绍Nextcloud项目自己的命令行工具-这些工具可以帮助您克服一些严重的管理难题。
You already saw the Nextcloud CLI at work when you created your admin user and added one or two new trusted domains. One more important setup step is adding TLS encryption to your web service. The odds are that you would normally use the Electronic Freedom Frontier’s certbot tool to get a free cert from Let’s Encrypt. But that won’t work here…because snap. Instead, you’ll run Nextcloud’s own tool for requesting and installing a Let’s Encrypt certificate:
创建管理员用户并添加一个或两个新的受信任域时,您已经看到Nextcloud CLI在工作。 另一个重要的设置步骤是将TLS加密添加到您的Web服务。 很有可能您通常会使用Electronic Freedom Frontier的certbot工具从Let's Encrypt获得免费证书。 但这在这里是行不通的……因为快点。 相反,您将运行Nextcloud自己的工具来请求和安装Let's Encrypt证书:
nextcloud.enable-https lets-encrypt
But for a full overview of the whole range of available CLI operations, run nextcloud.occ. You’ll be shown a long list of facilities along with their descriptions and some syntax guidance. Spend a couple of minutes looking through what that command displayed on your machine.
但是,要全面了解所有可用的CLI操作,请运行nextcloud.occ。 系统将为您显示一长串设施,以及它们的描述和一些语法指导。 花几分钟看一下该命令在计算机上显示的内容。
nextcloud.occ
You could, for instance, list all the applications currently available to Nextcloud organized by Enabled or Disabled.
例如,您可以列出由Enabled或Disabled组织的Nextcloud当前可用的所有应用程序。
nextcloud.occ app:list
Enabled:- accessibility: 1.1.0- activity: 2.8.2- calendar: 1.6.4- cloud_federation_api: 0.1.0- comments: 1.5.0- dav: 1.8.1- federatedfilesharing: 1.5.0- federation: 1.5.0
[..]
Your next step might be to disable one of the currently enabled apps (or vice versa):
下一步可能是禁用一个当前启用的应用程序(反之亦然):
nextcloud.occ app:disable calendar
You can use app:update to manually update all or specified apps:
您可以使用app:update手动更新所有或指定的应用程序:
nextcloud.occ app:update --all
spreed new version available: 5.0.3
spreed updated
Someone forget a password? You can reset it:
有人忘记密码了吗? 您可以重置它:
nextcloud.occ user:resetpassword admin2
Enter a new password:
Confirm the new password:
Successfully reset password for admin2
I’m sure you’re getting the idea: you use top-level commands — like app, user, and maintenance — and add a colon and then a secondary command like list. Everything is nicely arranged into fairly intuitive domains. Here are some examples:
我确信您已经明白了:您使用顶级命令(例如app , user和maintenance) ,并添加冒号,然后添加辅助命令(例如list)。 一切都很好地安排在相当直观的域中。 这里有些例子:
nextcloud.occ app:list
nextcloud.occ user:add
nextcloud.occ maintenance:repair
Finally, the status command will print some basic version information:
最后, status命令将打印一些基本的版本信息:
nextcloud.occ status- installed: true- version: 15.0.7.0- versionstring: 15.0.7- edition:
I think you’ve got the basics you’ll need to find your way around. The rest is up to you.
我认为您已经具备了找到所需的基础知识。 其余的取决于您。
Looking for more? You might enjoy my books and Pluralsight courses on Linux, AWS, and Docker-related topics.
寻找更多? 您可能会喜欢我的 书籍和 有关Linux,AWS和Docker相关主题的 Pluralsight课程 。
翻译自: https://www.freecodecamp.org/news/snapd-nextcloud/
snapd
相关文章:

atitit.跨架构 bs cs解决方案. 自定义web服务器的实现方案 java .net jetty HttpListener...
atitit.跨架构 bs cs解决方案. 自定义web服务器的实现方案 java .net jetty HttpListener 1. 自定义web服务器的实现方案,基于原始socket vs 基于tcpListener vs 基于HttpListener1 2. download1 3. Lib3 4. Code3 5. HttpListener类4 6. Reef5 1. 自定义web服务器…

Python高级函数--map/reduce
名字开头大写 后面小写;练习: 1 def normalize(name): 2 return name[0].upper() name[1:].lower() 3 L1 [adam, LISA, barT] 4 L2 list(map(normalize, L1)) 5 print(L2) reduce求积: 1 from functools import reduce 2 3 def prod(…

样式集(9) - 切换Tab菜单
先上效果图 下面是以vue实现的示例代码: 代码解析: 很简单的代码,直接复制粘贴使用吧~ 别忘记一键三连哦,点赞,收藏,关注,谢谢~ 后续持续更新更多干货哦!! <temp…

python字典{:4}_Python字典101:详细的视觉介绍
python字典{:>4}欢迎 (Welcome) In this article, you will learn how to work with Python dictionaries, an incredibly helpful built-in data type that you will definitely use in your projects.在本文中,您将学习如何使用Python字典ÿ…

asp.net提交危险字符处理方法之一
在form表单提交前,可以在web页面,submit按钮的click事件中,使用js函数对,可能有危险字符的内容进行编码。 有3个函数可用: encodeURI() 函数可把字符串作为 URI 进行编码。 escape() 函数可对字符串进行编码࿰…

mysql帐号,权限管理
-> use mysql; //选择数据库 -> select host,user,password from user; //查询已有用户 -> insert into user (host,user,password) values(localhost,kiscms,password(kiscms)); //插入一个用户 -> select host,user,password from user; //再次查询用户 -> fl…

样式集(10) - 滑动删除功能实现,VUE完整源码附效果图
先看效果图 实现方式: 使用 scroll-view 标签,进行横向滑动,达到左滑出现删除按钮, 注:如果不是使用uni-app或者小程序框架,没有 scroll-view 组件的话可以通过CSS实现哦 下面看uni-app的实现代码&#…

机器学习关键的几门课程_互联网上每门机器学习课程,均按您的评论排名
机器学习关键的几门课程by David Venturi大卫文图里(David Venturi) 互联网上每门机器学习课程,均按您的评论排名 (Every single Machine Learning course on the internet, ranked by your reviews) A year and a half ago, I dropped out of one of the best com…

[POJ2104]K-th Number(区间第k值 记录初始状态)
题目链接:http://poj.org/problem?id2104 给n个数和m个查询,查询[i, j]内第k小的数是多少。(主席树、划分树那种高大上的姿势叒不会啊QAQ 可以在维护这n个数的同时维护刚刚输入的时候他们的下标,之后预处理排序一次,查…

Geant4采用make和cmake编译运行geant4自带例子的方法
该教程介绍如何将geant4中自带的例子通过camke编译成可执行文件,并运行程序。 1 在linux主目录下创建一个geant4_workdir目录,并将geant4自带的例子B1复制到该目录下,如图1所示,geant4自带的B1源文件所在目录为geant4安装目录&…

GitLab设置中文
第一步,点击右上角的头像 点击Preferences,选择语言 选择简体中文然后保存

java python算法_用Python,Java和C ++示例解释的排序算法
java python算法什么是排序算法? (What is a Sorting Algorithm?) Sorting algorithms are a set of instructions that take an array or list as an input and arrange the items into a particular order.排序算法是一组指令,这些指令采用数组或列表…

c++运算符重载总结
c的一大特性就是重载(overload),通过重载可以把功能相似的几个函数合为一个,使得程序更加简洁、高效。在c中不止函数可以重载,运算符也可以重载。由于一般数据类型间的运算符没有重载的必要,所以运算符重载主要是面向对象之间的。…

一道面试题:js返回函数, 函数名后带多个括号的用法及join()的注意事项
博客搬迁,给你带来的不便,敬请谅解! http://www.suanliutudousi.com/2017/11/13/js%E8%BF%94%E5%9B%9E%E5%87%BD%E6%95%B0%E4%B8%AD%EF%BC%8C%E5%87%BD%E6%95%B0%E5%90%8D%E5%90%8E%E5%B8%A6%E5%A4%9A%E4%B8%AA%E6%8B%AC%E5%8F%B7%E7%9A%84%E…

小程序画布画海报保存成图片可以保存实现完整代码
老规矩先来个效果图: 因为是截图所以会有些模糊,在真机上会比较清晰 下面针对效果图来看看里面都画了什么元素,代码在文章的最后,大家想直接拷代码可以略过这,这里是方便大家理解代码。 首先,咱们的海报有…

fcm和firebase_我如何最终使Netlify Functions,Firebase和GraphQL一起工作
fcm和firebaseIn a previous post I confessed defeat in attempting to get an AWS Lambda GraphQL server to connect to a Firebase server. I didn’t give up right away, though, and a short time later found a different Node package to achieve what I couldn’t be…

深入了解Mvc路由系统
请求一个MVC页面的处理过程 1.浏览器发送一个Home/Index 的链接请求到iis。iis发现时一个asp.net处理程序。则调用asp.net_isapi 扩展程序发送asp.net框架 2.在asp.net的第七个管道事件中会遍历UrlRoutingModule中RouteCollection的RoteBase集合 通过调用其GetRouteData方法进行…

uni-app h5页面左上角出现“取消“字眼解决办法
在项目根目录的index.html中加上一行代码 <link rel"stylesheet" href"<% BASE_URL %>static/index.<% VUE_APP_INDEX_CSS_HASH %>.css" /> 如图:

unity编辑器扩展_01(在工具栏中创建一个按钮)
代码: [MenuItem("Tools/Test",false,1)] static void Test() { Debug.Log("test"); } 注意:MenuItem中第一个参数:需要创建选项在工具栏中的路径,此路径的父目录可以是Unity中已存在的,也…

postgres语法_SQL Create Table解释了MySQL和Postgres的语法示例
postgres语法A table is a group of data stored in a database.表是存储在数据库中的一组数据。 To create a table in a database you use the CREATE TABLE statement. You give a name to the table and a list of columns with its datatypes.要在数据库中创建表&#…

jquery-ajax请求:超时设置,增加 loading 提升体验
前端发送Ajax请求到服务器,服务器返回数据这一过程,因原因不同耗时长短也有差别,且这段时间内页面显示空白。如何优化这段时间内的交互体验,以及长时间内服务器仍未返回数据这一问题,是我们开发中不容忽视的重点。 常见…

第三章.SQL编程
2016年3月2日13:55:17(记忆笔记) 变量是存储数据的容器。 如何在SQL中定义自己的变量! First:第一套变量定义 整型 Declare num int Set num10 Print num 第二套变量定义 字符串类型(char varchar nvarchar) Declare name nvarchar(32) Set name’小帅’ Pri…

移动端自动播放音视频实现代码
视频组件 <video :custom-cache"false" :src"item.voideoUrl" :id"audio index" :vslide-gesture-in-fullscreen"false" :direction0 :enable-progress-gesture"false" :show-fullscreen-btn"false" loop obj…

grafana美人鱼_编码美人鱼–我如何从海洋生物学家转到前端开发人员
grafana美人鱼I have wanted to share my story for a while, but I didn’t know exactly how to start, or even what name to give it. 我想分享我的故事一段时间,但我不知道确切的开头,甚至不知道用什么名字。 But recently I was talking with som…
网络安全基础扫盲
1. 名词解释 APT 高级持续性威胁。利用先进的攻击手段对特定目标进行长期持续性网络攻击的攻击形式。其高级性主要体现在APT在发动攻击之前需要对攻击对象的业务流程和目标系统进行精确的收集。 VPN 虚拟专用网络(Virtual private network) VPN是Virtual…

Install Package and Software
svn http://tortoisesvn.sourceforge.net/ git https://download.tortoisegit.org/ http://git-for-windows.github.io/转载于:https://www.cnblogs.com/exmyth/p/5246529.html

小程序保存网络图片
小程序保存网络实现流程: 1.把图片下载到本地 2.检查用户的授权状态(三种状态:未授权,已授权,未同意授权),判断是否授权保存图片的能力,如果是用户点击了不同意授权给小程序保存图…

aws 认证_引入#AWSCertified挑战:您的第一个AWS认证之路
aws 认证You may already know that Amazon Web Services (AWS) is the largest, oldest, and most popular cloud service provider. But did you know they offer professional certifications, too?您可能已经知道Amazon Web Services(AWS)是最大,最古老和最受欢…

node!!!
node.js Node是搞后端的,不应该被被归为前端,更不应该用前端的观点去理解,去面试node开发人员。所以这份面试题大全,更侧重后端应用与对Node核心的理解。 github地址: https://github.com/jimuyouyou/node-interview-questions 注…

POJ 1556 The Doors(计算几何+最短路)
这题就是,处理出没两个点。假设能够到达,就连一条边,推断可不能够到达,利用线段相交去推断就可以。最后求个最短路就可以 代码: #include <cstdio> #include <cstring> #include <algorithm> #inclu…