温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

CentOS7怎么中安装Snapd

发布时间:2022-02-17 09:40:31 来源:亿速云 阅读:330 作者:iii 栏目:开发技术

本篇内容介绍了“CentOS7怎么中安装Snapd”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

CentOS7怎么中安装Snapd

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

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

sudo yum -y install snapd

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

sudo systemctl enable --now snapd.socket

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

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

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

附:snap用法及参数

snap --help应用选项:



--version——打印版本并退出



帮助选项:



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



可用的命令:



abort——中止待定更改



ack——Adds an assertion to the systemalias——Sets up a manual aliasaliases——Lists aliases in the system



buy——Buys a snap



changes——List system changes



connect——Connects a plug to a slotdisable——Disables a snap in the system



disconnect——Disconnects a plug from a slot



download——Downloads the given snapenable——Enables a snap in the system



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



get——Prints configuration optionshelp——帮助



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 typelist——List installed snaps



login——Authenticates on snapd and the storelogout——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 commandservices——Query the status of servicesset——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”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI