新聞中心
Snap 是 Canonical 開發(fā)的包管理系統(tǒng),默認(rèn)安裝于 Ubuntu 16.04 及其后的發(fā)行版本中。

十載的綏德網(wǎng)站建設(shè)經(jīng)驗(yàn),針對設(shè)計、前端、開發(fā)、售后、文案、推廣等六對一服務(wù),響應(yīng)快,48小時及時工作處理。成都全網(wǎng)營銷的優(yōu)勢是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動調(diào)整綏德建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計,從而大程度地提升瀏覽體驗(yàn)。創(chuàng)新互聯(lián)建站從事“綏德網(wǎng)站設(shè)計”,“綏德網(wǎng)站推廣”以來,每個客戶項目都認(rèn)真落實(shí)執(zhí)行。
優(yōu)勢:
-
自包含:不受限于發(fā)行版的系統(tǒng)庫版本,且每個包之間不存在運(yùn)行庫依賴。
-
只讀掛載:應(yīng)用程序不能修改或刪除,且不會污染系統(tǒng)應(yīng)用程序或庫。
-
回退:內(nèi)置回退舊版本。
-
快照:內(nèi)置備份和恢復(fù)應(yīng)用數(shù)據(jù)。
-
版本新:相比發(fā)行版更新緩慢,其應(yīng)用程序版本都比較新。
具體方法
1、首先安裝COPR插件和EPEL,通過添加epel存儲庫并安裝copr yum插件來啟動安裝,運(yùn)行如下命令:
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軟件包,運(yùn)行以下命令:
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,為它創(chuàng)建一個符號鏈接,如下命令:
sudo ln -s /var/lib/snapd/snap /snap
做到這里,Snapd已經(jīng)安裝完成了。
附:snap用法及參數(shù)(英文)
# 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.
應(yīng)用選項:
–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
轉(zhuǎn)載來源:http://www.5511xx.com/article/djgsgci.html


咨詢
建站咨詢
