美图齐众专注资阳网站设计 资阳网站制作 资阳网站建设
资阳网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

CentOS7中安装Snapd具体步骤

CentOS 7中如何安装Snapd?本篇文章为大家分享一下CentOS 7安装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 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.zsjierui.cn/article/dpcidde.html