CentOS7中安装和配置Snapd

Snap 是 Canonical 开发的包管理系统,默认安装于 Ubuntu 16.04 及其后的发行版本中。

十载的绥德网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都全网营销的优势是能够根据用户设备显示端的尺寸不同,自动调整绥德建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联建站从事“绥德网站设计”,“绥德网站推广”以来,每个客户项目都认真落实执行。

优势:

  • 自包含:不受限于发行版的系统库版本,且每个包之间不存在运行库依赖。
  • 只读挂载:应用程序不能修改或删除,且不会污染系统应用程序或库。
  • 回退:内置回退旧版本。
  • 快照:内置备份和恢复应用数据。
  • 版本新:相比发行版更新缓慢,其应用程序版本都比较新。

具体方法

1、首先安装COPR插件和EPEL,通过添加epel存储库并安装copr yum插件来启动安装,运行如下命令:

sudo yum install epel-release

sudo yum install yum-plugin-copr

2、然后添加repo:

$ sudo yum copr enable ngompa/snapcore-el7

Loaded plugins: copr, fastestmirror

You are about to enable a Copr repository. Please note that this repository is not part of the main Fedora distribution, and quality may vary.

The Fedora Project does not exercise any power over the contents of this repository beyond the rules outlined in the Copr FAQ at

https://fedorahosted.org/copr/wiki/UserDocs#WhatIcanbuildinCopr, and packages are not held to any quality or securty level.

Please do not file bug reports about these packages in Fedora Bugzilla. In case of problems, contact the owner of this repository.

Do you want to continue? [y/N]: y

copr done

3、添加存储库后,安装snapd软件包,运行以下命令:

sudo yum -y install snapd

4、等待安装完成后启用snapd socket:

$ sudo systemctl enable –now snapd.socket

Created symlink from /etc/systemd/system/sockets.target.wants/snapd.socket to /usr/lib/systemd/system/snapd.socket.

5、限制需要从/snap到/var/lib/snapd/snap下的/snap或符号链接下的snaps,为它创建一个符号链接,如下命令:

sudo ln -s /var/lib/snapd/snap /snap

做到这里,Snapd已经安装完成了。

附:snap用法及参数(英文)

# snap –help

用法:snap [OPTIONS]

Install, configure, refresh and remove snap packages. Snaps are ‘universal’ packages that work across many different Linux systems,enabling secure distribution of the latest apps and utilities for cloud, servers, desktops and the internet of things.

This is the CLI for snapd, a background service that takes care of snaps on the system. Start with ‘snap list’ to see installed snaps.

应用选项:

–version——打印版本并退出

帮助选项:

-h, –help——显示此帮助消息

可用的命令:

abort——中止待定更改

ack——Adds an assertion to the system

alias——Sets up a manual alias

aliases——Lists aliases in the system

buy——Buys a snap

changes——List system changes

connect——Connects a plug to a slot

disable——Disables a snap in the system

disconnect——Disconnects a plug from a slot

download——Downloads the given snap

enable——Enables a snap in the system

find——Finds packages to install (aliases: search)

get——Prints configuration options

help——帮助

info——show detailed information about a snap

install——Installs a snap to the system

interface——Lists snap interfaces

interfaces——Lists interfaces in the system

known——Shows known assertions of the provided type

list——List installed snaps

login——Authenticates on snapd and the store

logout——Log out of the store

logs——Retrieve logs of services

pack——pack the given target dir as a snap

prefer——Prefer aliases from a snap and disable conflicts

refresh——Refreshes a snap in the system

remove——Removes a snap from the system

restart——Restart services

revert——Reverts the given snap to the previous state

run——Run the given snap command

services——Query the status of services

set——Changes configuration options

start——Start services

stop——Stop services

switch——Switches snap to a different channel

tasks——List a change’s tasks (aliases: change)

try——Tests a snap in the system

unalias——Unalias a manual alias or an entire snap

version ——Shows version details

watch——Watch a change in progress

whoami——Prints the email the user is logged in with.

当前名称:CentOS7中安装和配置Snapd
当前网址:http://www.stwzsj.com/qtweb/news40/11790.html

网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联