{"id":34987,"date":"2024-09-19T16:37:34","date_gmt":"2024-09-19T09:37:34","guid":{"rendered":"http:\/\/jupitek.maudemo.vip\/index.php\/2024\/09\/19\/saltstack-command-line-reference\/"},"modified":"2024-09-19T16:37:34","modified_gmt":"2024-09-19T09:37:34","slug":"saltstack-command-line-reference","status":"publish","type":"post","link":"https:\/\/jupitek.maudemo.vip\/index.php\/2024\/09\/19\/saltstack-command-line-reference\/","title":{"rendered":"Tham kh\u1ea3o d\u00f2ng l\u1ec7nh SaltStack"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/saltstack\/salt\" target=\"_blank\" rel=\"noreferrer noopener\">SaltStack<\/a>&nbsp;l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 qu\u1ea3n l\u00fd c\u1ea5u h\u00ecnh m\u1ea1nh m\u1ebd. Sau \u0111\u00e2y l\u00e0 h\u01b0\u1edbng d\u1eabn tham kh\u1ea3o nhanh v\u1ec1 giao di\u1ec7n d\u00f2ng l\u1ec7nh (CLI) c\u1ee7a Salt.<\/p>\n<h2 id=\"salt\">salt<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt\"><\/a><\/h2>\n<p>\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 ra l\u1ec7nh cho c\u00e1c minion c\u00f9ng l\u00fac.&nbsp;<code>salt<\/code>Cho ph\u00e9p b\u1ea1n v\u1eeba \u0111i\u1ec1u khi\u1ec3n v\u1eeba truy v\u1ea5n c\u00e1c minion.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt -c \/home\/salt\/conf test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-s<\/code>,<code>--static<\/code><\/td>\n<td>Ch\u1ec9 tr\u1ea3 v\u1ec1 d\u1eef li\u1ec7u sau khi t\u1ea5t c\u1ea3 l\u00ednh \u0111\u00e3 tr\u1edf v\u1ec1.<\/td>\n<td><code>salt --static<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--async<\/code><\/td>\n<td>Thay v\u00ec ch\u1edd \u0111\u1ee3i c\u00f4ng vi\u1ec7c tr\u00ean m\u1ed9t ho\u1eb7c nhi\u1ec1u minion, h\u00e3y in ID c\u00f4ng vi\u1ec7c v\u00e0 th\u1eddi \u0111i\u1ec3m ho\u00e0n th\u00e0nh c\u00f4ng vi\u1ec7c.<\/td>\n<td><code>salt '*' pkg.install apache2 --async<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--subset<\/code><\/td>\n<td>Th\u1ef1c hi\u1ec7n l\u1ec7nh tr\u00ean m\u1ed9t nh\u00f3m minion ng\u1eabu nhi\u00ean.<\/td>\n<td><code>salt '*' telegram.post_message message=\"Hello random 3!\" --subset 3<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-v<\/code>,<code>--verbose<\/code><\/td>\n<td>In d\u1eef li\u1ec7u b\u1ed5 sung, ch\u1eb3ng h\u1ea1n nh\u01b0 ID c\u00f4ng vi\u1ec7c.<\/td>\n<td><code>salt 'minion1' user.add steve --verbose<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--hide-timeout<\/code><\/td>\n<td>Ch\u1ec9 in nh\u1eefng minion c\u00f3 th\u1ec3 ti\u1ebfp c\u1eadn \u0111\u01b0\u1ee3c.<\/td>\n<td><code>salt '*' test.ping --hide-timeout<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-b<\/code>,<code>--batch-size<\/code><\/td>\n<td>Th\u1ef1c hi\u1ec7n tr\u00ean m\u1ed9t lo\u1ea1t ho\u1eb7c m\u1ed9t ph\u1ea7n tr\u0103m s\u1ed1 l\u00ednh.<\/td>\n<td><code>salt '*' test.ping --batch-size 25%<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-a<\/code>,<code>--auth<\/code><\/td>\n<td>S\u1eed d\u1ee5ng ph\u01b0\u01a1ng ti\u1ec7n x\u00e1c th\u1ef1c b\u00ean ngo\u00e0i. B\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c nh\u1eafc nh\u1eadp th\u00f4ng tin x\u00e1c th\u1ef1c. C\u00e1c t\u00f9y ch\u1ecdn l\u00e0&nbsp;<code>auto<\/code>,&nbsp;<code>keystone<\/code>,&nbsp;<code>ldap<\/code>, v\u00e0&nbsp;<code>pam<\/code>. C\u00f3 th\u1ec3 s\u1eed d\u1ee5ng v\u1edbi&nbsp;<code>-T<\/code>.<\/td>\n<td><code>salt -a pam '*' status.meminfo<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-T<\/code>,<code>--make-token<\/code><\/td>\n<td>\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng v\u1edbi&nbsp;<code>-a<\/code>. T\u1ea1o m\u00e3 th\u00f4ng b\u00e1o x\u00e1c th\u1ef1c trong th\u01b0 m\u1ee5c g\u1ed1c c\u1ee7a ng\u01b0\u1eddi d\u00f9ng \u0111ang ho\u1ea1t \u0111\u1ed9ng c\u00f3 th\u1eddi gian h\u1ebft h\u1ea1n m\u1eb7c \u0111\u1ecbnh l\u00e0 12 gi\u1edd. Th\u1eddi gian h\u1ebft h\u1ea1n c\u1ee7a m\u00e3 th\u00f4ng b\u00e1o \u0111\u01b0\u1ee3c \u0111\u1eb7t trong t\u1ec7p c\u1ea5u h\u00ecnh Salt master.<\/td>\n<td><code>salt -T -a pam '*' status.cpuinfo<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--return<\/code><\/td>\n<td>\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 ch\u1ecdn m\u1ed9t ng\u01b0\u1eddi tr\u1ea3 v\u1ec1 thay th\u1ebf. C\u00e1c t\u00f9y ch\u1ecdn l\u00e0&nbsp;<code>carbon<\/code>,&nbsp;<code>cassandra<\/code>,&nbsp;<code>couchbase<\/code>,&nbsp;<code>couchdb<\/code>,&nbsp;<code>elasticsearch<\/code>,&nbsp;<code>etcd<\/code>,&nbsp;<code>hipchat<\/code>,&nbsp;<code>local<\/code>,&nbsp;<code>local_cache<\/code>,&nbsp;<code>memcache<\/code>,&nbsp;<code>mongo<\/code>,&nbsp;<code>mysql<\/code>,&nbsp;<code>odbc<\/code>,&nbsp;<code>postgres<\/code>,&nbsp;<code>redis<\/code>,&nbsp;<code>sentry<\/code>,&nbsp;<code>slack<\/code>,&nbsp;<code>sms<\/code>, ,&nbsp;<code>smtp<\/code>,&nbsp;<code>sqlite3<\/code>,&nbsp;<code>syslog<\/code>, v\u00e0&nbsp;<code>xmpp<\/code>.<\/td>\n<td><code>salt '*' status.all_status --return mongo<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code>,&nbsp;<code>--doc<\/code>,<code>--documentation<\/code><\/td>\n<td>Tr\u1ea3 v\u1ec1 t\u1ea5t c\u1ea3 t\u00e0i li\u1ec7u c\u00f3 s\u1eb5n cho m\u1ed9t ch\u1ee9c n\u0103ng m\u00f4-\u0111un ho\u1eb7c t\u1ea5t c\u1ea3 c\u00e1c ch\u1ee9c n\u0103ng n\u1ebfu kh\u00f4ng \u0111\u01b0\u1ee3c cung c\u1ea5p.<\/td>\n<td><code>salt 'minion3' service.available -d<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt 'minion2' state.apply -l info<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/log\/salt\/master<\/code><\/td>\n<td><code>salt '*' test.ping --log-file \/home\/salt\/log<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c ghi nh\u1eadt k\u00fd c\u1ee7a t\u1ec7p nh\u1eadt k\u00fd. C\u00e1c t\u00f9y ch\u1ecdn gi\u1ed1ng nh\u01b0<code>--log-level<\/code><\/td>\n<td><code>salt '*' test.ping --log-level all<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-E<\/code>,<code>--pcre<\/code><\/td>\n<td>Bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau s\u1ebd \u0111\u01b0\u1ee3c di\u1ec5n gi\u1ea3i l\u00e0 Bi\u1ec3u th\u1ee9c ch\u00ednh quy t\u01b0\u01a1ng th\u00edch v\u1edbi Perl (PCRE) ch\u1ee9 kh\u00f4ng ph\u1ea3i l\u00e0 m\u1ed9t glob shell.<\/td>\n<td><code>salt -E 'minion[0-9]' service.reload apache2<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-L<\/code>,<code>--list<\/code><\/td>\n<td>Bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau s\u1ebd \u0111\u01b0\u1ee3c hi\u1ec3u l\u00e0 m\u1ed9t danh s\u00e1ch ph\u00e2n c\u00e1ch b\u1eb1ng d\u1ea5u ph\u1ea9y.<\/td>\n<td><code>salt -L 'minion1,minion2' service.show sshd<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-G<\/code>,<code>--grain<\/code><\/td>\n<td>Bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau d\u01b0\u1edbi d\u1ea1ng bi\u1ec3u th\u1ee9c glob kh\u1edbp v\u1edbi h\u1ea1t Salt. &lt;gi\u00e1 tr\u1ecb h\u1ea1t&gt;:&lt;bi\u1ec3u th\u1ee9c glob&gt;.<\/td>\n<td><code>salt -G 'os:Ubuntu' service.available mysql<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--grain-pcre<\/code><\/td>\n<td>Bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau d\u01b0\u1edbi d\u1ea1ng Bi\u1ec3u th\u1ee9c ch\u00ednh quy t\u01b0\u01a1ng th\u00edch v\u1edbi Perl kh\u1edbp v\u1edbi c\u00e1c gi\u00e1 tr\u1ecb \u0111\u01b0\u1ee3c tr\u1ea3 v\u1ec1 b\u1edfi c\u00e1c h\u1ea1t Salt tr\u00ean minion.&lt;gi\u00e1 tr\u1ecb h\u1ea1t&gt;:&lt;bi\u1ec3u th\u1ee9c ch\u00ednh quy&gt;<\/td>\n<td><code>salt --grain-pcre 'os:Arch' service.restart apache2<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-I<\/code>,<code>--pillar<\/code><\/td>\n<td>S\u1eed d\u1ee5ng gi\u00e1 tr\u1ecb tr\u1ee5 thay v\u00ec glob v\u1ecf \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh m\u1ee5c ti\u00eau.<\/td>\n<td><code>salt -I 'role:production' test.echo 'playback'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--out<\/code><\/td>\n<td>Ch\u1ecdn m\u1ed9t \u0111\u1ea7u ra thay th\u1ebf \u0111\u1ec3 hi\u1ec3n th\u1ecb d\u1eef li\u1ec7u tr\u1ea3 v\u1ec1. C\u00e1c \u0111\u1ea7u ra kh\u1ea3 d\u1ee5ng l\u00e0:&nbsp;<code>grains<\/code>,&nbsp;<code>highstate<\/code>,&nbsp;<code>json<\/code>,&nbsp;<code>key<\/code>,&nbsp;<code>overstatestage<\/code>,&nbsp;<code>pprint<\/code>,&nbsp;<code>raw<\/code>,&nbsp;<code>txt<\/code>,&nbsp;<code>yaml<\/code>. L\u01b0u \u00fd: khi s\u1eed d\u1ee5ng,&nbsp;<code>--out json<\/code>b\u1ea1n c\u00f3 th\u1ec3 mu\u1ed1n s\u1eed d\u1ee5ng th\u00eam&nbsp;<code>--static<\/code>.<\/td>\n<td><code>salt '*' test.version --out json --static<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-call\">salt-call<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-call\"><\/a><a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-call\"><\/a><\/h2>\n<p>Ch\u1ea1y c\u00e1c ch\u1ee9c n\u0103ng m\u00f4-\u0111un tr\u00ean m\u1ed9t minion thay v\u00ec master. N\u00f3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 ch\u1ea1y m\u1ed9t minion \u0111\u1ed9c l\u1eadp.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-call --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-call -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-call -c \/home\/salt\/conf test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-g<\/code>,<code>--grains<\/code><\/td>\n<td>Nh\u1eadn th\u00f4ng tin \u0111\u01b0\u1ee3c t\u1ea1o ra b\u1edfi c\u00e1c h\u1ea1t mu\u1ed1i.<\/td>\n<td><code>salt-call --grains<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-m<\/code>,<code>--module-dirs<\/code><\/td>\n<td>Ch\u1ecdn m\u1ed9t th\u01b0 m\u1ee5c m\u00f4-\u0111un b\u1ed5 sung. B\u1ea1n c\u00f3 th\u1ec3 cung c\u1ea5p t\u00f9y ch\u1ecdn n\u00e0y nhi\u1ec1u l\u1ea7n cho nhi\u1ec1u th\u01b0 m\u1ee5c.<\/td>\n<td><code>salt-call -m \/home\/salt\/modules1 -m \/home\/salt\/modules2<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code>,&nbsp;<code>--doc<\/code>,<code>--documentation<\/code><\/td>\n<td>Tr\u1ea3 v\u1ec1 t\u1ea5t c\u1ea3 t\u00e0i li\u1ec7u c\u00f3 s\u1eb5n cho ch\u1ee9c n\u0103ng c\u1ee7a m\u00f4-\u0111un ho\u1eb7c t\u1ea5t c\u1ea3 c\u00e1c ch\u1ee9c n\u0103ng n\u1ebfu kh\u00f4ng \u0111\u01b0\u1ee3c cung c\u1ea5p.<\/td>\n<td><code>salt-call system.get_system_time -d<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--master<\/code><\/td>\n<td>Ch\u1ecdn master n\u00e0o \u0111\u1ec3 s\u1eed d\u1ee5ng. Minion ph\u1ea3i \u0111\u01b0\u1ee3c x\u00e1c th\u1ef1c v\u1edbi master. N\u1ebfu master b\u1ecb b\u1ecf qua, master \u0111\u1ea7u ti\u00ean trong c\u1ea5u h\u00ecnh minion s\u1ebd \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng.<\/td>\n<td><code>salt-call --master master1<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--return<\/code><\/td>\n<td>\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 ch\u1ecdn m\u1ed9t ng\u01b0\u1eddi tr\u1ea3 v\u1ec1 thay th\u1ebf. C\u00e1c t\u00f9y ch\u1ecdn l\u00e0&nbsp;<code>carbon<\/code>,&nbsp;<code>cassandra<\/code>,&nbsp;<code>couchbase<\/code>,&nbsp;<code>couchdb<\/code>,&nbsp;<code>elasticsearch<\/code>,&nbsp;<code>etcd<\/code>,&nbsp;<code>hipchat<\/code>,&nbsp;<code>local<\/code>,&nbsp;<code>local_cache<\/code>,&nbsp;<code>memcache<\/code>,&nbsp;<code>mongo<\/code>,&nbsp;<code>mysql<\/code>,&nbsp;<code>odbc<\/code>,&nbsp;<code>postgres<\/code>,&nbsp;<code>redis<\/code>,&nbsp;<code>sentry<\/code>,&nbsp;<code>slack<\/code>,&nbsp;<code>sms<\/code>, ,&nbsp;<code>smtp<\/code>,&nbsp;<code>sqlite3<\/code>,&nbsp;<code>syslog<\/code>, v\u00e0&nbsp;<code>xmpp<\/code>.<\/td>\n<td><code>salt-call --return mongo status.all_status<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--local<\/code><\/td>\n<td>Ch\u1ea1y Salt nh\u01b0 th\u1ec3 kh\u00f4ng c\u00f3 ng\u01b0\u1eddi \u0111i\u1ec1u khi\u1ec3n.<\/td>\n<td><code>salt-call --local system.get_system_time<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--file-root<\/code><\/td>\n<td>\u0110\u1eb7t m\u1ed9t th\u01b0 m\u1ee5c l\u00e0m th\u01b0 m\u1ee5c t\u1eadp tin c\u01a1 s\u1edf.<\/td>\n<td><code>salt-call --file-root \/home\/salt<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--pillar-root<\/code><\/td>\n<td>\u0110\u1eb7t m\u1ed9t th\u01b0 m\u1ee5c l\u00e0m th\u01b0 m\u1ee5c tr\u1ee5 c\u1ed9t c\u01a1 s\u1edf.<\/td>\n<td><code>salt-call --file-root \/home\/salt\/pillar<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-call -l all test.exception 'oh no!'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/var\/log\/salt\/minion<\/code>.<\/td>\n<td><code>salt-call --logfile \/home\/salt\/log\/minion test.exception 'oh no!'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn c\u00f3 s\u1eb5n l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-call --log-file-level all test.exception 'oh no!'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--out<\/code><\/td>\n<td>Ch\u1ecdn m\u1ed9t \u0111\u1ea7u ra thay th\u1ebf \u0111\u1ec3 hi\u1ec3n th\u1ecb d\u1eef li\u1ec7u tr\u1ea3 v\u1ec1. C\u00e1c \u0111\u1ea7u ra kh\u1ea3 d\u1ee5ng l\u00e0:&nbsp;<code>grains<\/code>,&nbsp;<code>highstate<\/code>,&nbsp;<code>json<\/code>,&nbsp;<code>key<\/code>,&nbsp;<code>overstatestage<\/code>,&nbsp;<code>pprint<\/code>,&nbsp;<code>raw<\/code>,&nbsp;<code>txt<\/code>,&nbsp;<code>yaml<\/code>.<\/td>\n<td><code>salt-call test.version --out json<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-cloud\">salt-cloud<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-cloud\"><\/a><a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-cloud\"><\/a><\/h2>\n<p>\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 cung c\u1ea5p m\u00e1y \u1ea3o tr\u00ean \u0111\u00e1m m\u00e2y c\u00f4ng c\u1ed9ng v\u1edbi Salt.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-cloud --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-cloud -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-cloud -c \/home\/salt\/conf<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-a<\/code>,<code>--action<\/code><\/td>\n<td>Th\u1ef1c hi\u1ec7n h\u00e0nh \u0111\u1ed9ng c\u1ee5 th\u1ec3 c\u1ee7a nh\u00e0 cung c\u1ea5p \u0111\u00e1m m\u00e2y. Y\u00eau c\u1ea7u m\u1ed9t phi\u00ean b\u1ea3n.<\/td>\n<td><code>salt-cloud -a reboot testlinode<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-f<\/code>,<code>--function<\/code><\/td>\n<td>Th\u1ef1c hi\u1ec7n ch\u1ee9c n\u0103ng c\u1ee5 th\u1ec3 c\u1ee7a nh\u00e0 cung c\u1ea5p \u0111\u00e1m m\u00e2y kh\u00f4ng \u00e1p d\u1ee5ng cho m\u1ed9t phi\u00ean b\u1ea3n. Y\u00eau c\u1ea7u m\u1ed9t nh\u00e0 cung c\u1ea5p.<\/td>\n<td><code>salt-cloud -f clone my-linode-config linode_id=1234567 datacenter_id=2 plan_id=5<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-p<\/code>,<code>--profile<\/code><\/td>\n<td>Ch\u1ecdn c\u1ea5u h\u00ecnh \u0111\u1ec3 x\u00e2y d\u1ef1ng m\u00e1y \u1ea3o \u0111\u00e1m m\u00e2y.<\/td>\n<td><code>salt-cloud -p linode-1024 mynewlinode<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-m<\/code>,<code>--map<\/code><\/td>\n<td>Ch\u1ecdn t\u1ec7p b\u1ea3n \u0111\u1ed3 \u0111\u1ec3 t\u1ea1o VM c\u1ee7a b\u1ea1n. N\u1ebfu VM t\u1ed3n t\u1ea1i, n\u00f3 s\u1ebd b\u1ecb b\u1ecf qua.<\/td>\n<td><code>salt-cloud -m \/path\/to\/map<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-H<\/code>,<code>--hard<\/code><\/td>\n<td>\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng khi t\u1ea1o VM b\u1eb1ng t\u1ec7p b\u1ea3n \u0111\u1ed3. N\u1ebfu \u0111\u01b0\u1ee3c \u0111\u1eb7t, s\u1ebd h\u1ee7y t\u1ea5t c\u1ea3 VM kh\u00f4ng \u0111\u01b0\u1ee3c li\u1ec7t k\u00ea trong t\u1ec7p b\u1ea3n \u0111\u1ed3.<\/td>\n<td><code>salt-cloud -m \/path\/to\/map -H<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code>,<code>--destroy<\/code><\/td>\n<td>H\u1ee7y c\u00e1c VM \u0111\u01b0\u1ee3c \u0111\u1eb7t t\u00ean. C\u00f3 th\u1ec3 s\u1eed d\u1ee5ng&nbsp;<code>-m<\/code>\u0111\u1ec3 cung c\u1ea5p b\u1ea3n \u0111\u1ed3 c\u00e1c VM c\u1ea7n h\u1ee7y.<\/td>\n<td><code>salt-cloud -m \/path\/to\/map -d<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-P<\/code>,<code>--parallel<\/code><\/td>\n<td>X\u00e2y d\u1ef1ng c\u00e1c VM song song.<\/td>\n<td><code>salt-cloud -P -p linode-profile newlinode1 newlinode2<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-u<\/code>,<code>--update-boostrap<\/code><\/td>\n<td>C\u1eadp nh\u1eadt salt-bootstrap.<\/td>\n<td><code>salt-cloud -u<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-y<\/code>,<code>--assume-yes<\/code><\/td>\n<td>Tr\u1ea3 l\u1eddi \u201cc\u00f3\u201d cho t\u1ea5t c\u1ea3 c\u00e1c c\u00e2u h\u1ecfi.<\/td>\n<td><code>salt-cloud -y -d linode1 linode2<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-k<\/code>,<code>-keep-tmp<\/code><\/td>\n<td>Kh\u00f4ng x\u00f3a c\u00e1c t\u1eadp tin \/tmp.<\/td>\n<td><code>salt-cloud -k -m \/path\/to\/map<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--show-deploy-args<\/code><\/td>\n<td>Bao g\u1ed3m c\u00e1c \u0111\u1ed1i s\u1ed1 tri\u1ec3n khai trong d\u1eef li\u1ec7u tr\u1ea3 v\u1ec1.<\/td>\n<td><code>salt-cloud --show-deploy-args -m \/path\/to\/map<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--script-args<\/code><\/td>\n<td>C\u00e1c \u0111\u1ed1i s\u1ed1 \u0111\u01b0\u1ee3c truy\u1ec1n v\u00e0o t\u1eadp l\u1ec7nh bootstrap khi tri\u1ec3n khai.<\/td>\n<td><code>salt-cloud -m \/path\/to\/map --script-args '-h'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-Q<\/code>,<code>--query<\/code><\/td>\n<td>Truy v\u1ea5n c\u00e1c n\u00fat \u0111ang ch\u1ea1y tr\u00ean nh\u00e0 cung c\u1ea5p \u0111\u00e1m m\u00e2y \u0111\u00e3 c\u1ea5u h\u00ecnh.<\/td>\n<td><code>salt-cloud -Q<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-F<\/code>,<code>--full-query<\/code><\/td>\n<td>Truy v\u1ea5n VM v\u00e0 in t\u1ea5t c\u1ea3 th\u00f4ng tin c\u00f3 s\u1eb5n. C\u00f3 th\u1ec3 s\u1eed d\u1ee5ng v\u1edbi -m \u0111\u1ec3 cung c\u1ea5p b\u1ea3n \u0111\u1ed3.<\/td>\n<td><code>salt-cloud -F<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-S<\/code>,<code>--select-query<\/code><\/td>\n<td>Truy v\u1ea5n VM v\u00e0 in th\u00f4ng tin \u0111\u00e3 ch\u1ecdn. C\u00f3 th\u1ec3 s\u1eed d\u1ee5ng v\u1edbi -m \u0111\u1ec3 cung c\u1ea5p b\u1ea3n \u0111\u1ed3.<\/td>\n<td><code>salt-cloud -S<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--list-providers<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb danh s\u00e1ch c\u00e1c nh\u00e0 cung c\u1ea5p \u0111\u00e3 c\u1ea5u h\u00ecnh.<\/td>\n<td><code>salt-cloud --list-providers<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--list-profiles<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb danh s\u00e1ch c\u00e1c c\u1ea5u h\u00ecnh \u0111\u00e3 c\u1ea5u h\u00ecnh. Cung c\u1ea5p nh\u00e0 cung c\u1ea5p \u0111\u00e1m m\u00e2y, ch\u1eb3ng h\u1ea1n nh\u01b0&nbsp;<code>linode<\/code>, ho\u1eb7c chuy\u1ec3n \u0111\u1ebfn&nbsp;<code>all<\/code>\u0111\u1ec3 xem t\u1ea5t c\u1ea3 c\u00e1c c\u1ea5u h\u00ecnh \u0111\u00e3 c\u1ea5u h\u00ecnh.<\/td>\n<td><code>salt-cloud --list-profiles linode<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--list-locations<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb danh s\u00e1ch c\u00e1c v\u1ecb tr\u00ed kh\u1ea3 d\u1ee5ng. Cung c\u1ea5p nh\u00e0 cung c\u1ea5p \u0111\u00e1m m\u00e2y, ch\u1eb3ng h\u1ea1n nh\u01b0&nbsp;<code>linode<\/code>, ho\u1eb7c chuy\u1ec3n \u0111\u1ebfn&nbsp;<code>all<\/code>\u0111\u1ec3 xem t\u1ea5t c\u1ea3 v\u1ecb tr\u00ed cho c\u00e1c c\u1ea5u h\u00ecnh \u0111\u00e3 \u0111\u1ecbnh c\u1ea5u h\u00ecnh.<\/td>\n<td><code>salt-cloud --list-locations linode<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--list-images<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb danh s\u00e1ch h\u00ecnh \u1ea3nh c\u00f3 s\u1eb5n. Cung c\u1ea5p nh\u00e0 cung c\u1ea5p \u0111\u00e1m m\u00e2y, ch\u1eb3ng h\u1ea1n nh\u01b0&nbsp;<code>linode<\/code>, ho\u1eb7c chuy\u1ec3n \u0111\u1ebfn&nbsp;<code>all<\/code>\u0111\u1ec3 xem t\u1ea5t c\u1ea3 h\u00ecnh \u1ea3nh cho c\u00e1c c\u1ea5u h\u00ecnh \u0111\u00e3 \u0111\u1ecbnh c\u1ea5u h\u00ecnh.<\/td>\n<td><code>salt-cloud --list-images linode<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--list-sizes<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb danh s\u00e1ch c\u00e1c k\u00edch th\u01b0\u1edbc kh\u1ea3 d\u1ee5ng. Cung c\u1ea5p nh\u00e0 cung c\u1ea5p \u0111\u00e1m m\u00e2y, ch\u1eb3ng h\u1ea1n nh\u01b0&nbsp;<code>linode<\/code>, ho\u1eb7c chuy\u1ec3n \u0111\u1ebfn&nbsp;<code>all<\/code>\u0111\u1ec3 xem t\u1ea5t c\u1ea3 c\u00e1c k\u00edch th\u01b0\u1edbc cho c\u00e1c c\u1ea5u h\u00ecnh \u0111\u00e3 c\u1ea5u h\u00ecnh.<\/td>\n<td><code>salt-cloud --list-sizes linode<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--out<\/code><\/td>\n<td>Ch\u1ecdn m\u1ed9t \u0111\u1ea7u ra thay th\u1ebf \u0111\u1ec3 hi\u1ec3n th\u1ecb d\u1eef li\u1ec7u tr\u1ea3 v\u1ec1. C\u00e1c \u0111\u1ea7u ra kh\u1ea3 d\u1ee5ng l\u00e0:&nbsp;<code>grains<\/code>,&nbsp;<code>highstate<\/code>,&nbsp;<code>json<\/code>,&nbsp;<code>key<\/code>,&nbsp;<code>overstatestage<\/code>,&nbsp;<code>pprint<\/code>,&nbsp;<code>raw<\/code>,&nbsp;<code>txt<\/code>,&nbsp;<code>yaml<\/code>.<\/td>\n<td><code>salt-call test.version --out json<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-cp\">salt-cp<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-cp\"><\/a><a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-cp\"><\/a><\/h2>\n<p>\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 sao ch\u00e9p c\u00e1c t\u1ec7p t\u1eeb m\u00e1y ch\u1ee7 \u0111\u1ebfn t\u1ea5t c\u1ea3 c\u00e1c minion Salt kh\u1edbp v\u1edbi bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau c\u1ee5 th\u1ec3.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-cp --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-cp -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-cp '*' -c \/home\/salt\/conf \/file\/to\/copy \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-t<\/code>,<code>--timeout<\/code><\/td>\n<td>S\u1ed1 gi\u00e2y ch\u1edd ph\u1ea3n h\u1ed3i t\u1eeb minion. M\u1eb7c \u0111\u1ecbnh l\u00e0 5 gi\u00e2y.<\/td>\n<td><code>salt-cp '*' -t 25 \/file\/to\/copy \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-cp '*' -l all \/file\/to\/copy \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/var\/log\/salt\/master<\/code>.<\/td>\n<td><code>salt-cp '*' --logfile \/home\/salt\/log\/minion \/file\/to\/copy \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn c\u00f3 s\u1eb5n l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-cp '*' --log-file-level all \/file\/to\/copy \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-E<\/code>,<code>--pcre<\/code><\/td>\n<td>Bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau s\u1ebd \u0111\u01b0\u1ee3c di\u1ec5n gi\u1ea3i l\u00e0 Bi\u1ec3u th\u1ee9c ch\u00ednh quy t\u01b0\u01a1ng th\u00edch v\u1edbi Perl (PCRE) ch\u1ee9 kh\u00f4ng ph\u1ea3i l\u00e0 m\u1ed9t glob shell.<\/td>\n<td><code>salt-cp -E 'minion[0-9]' \/file\/to\/copy \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-L<\/code>,<code>--list<\/code><\/td>\n<td>Bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau s\u1ebd \u0111\u01b0\u1ee3c hi\u1ec3u l\u00e0 m\u1ed9t danh s\u00e1ch ph\u00e2n c\u00e1ch b\u1eb1ng d\u1ea5u ph\u1ea9y.<\/td>\n<td><code>salt -L 'minion1,minion2' \/file\/to\/copy \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-G<\/code>,<code>--grain<\/code><\/td>\n<td>Bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau kh\u1edbp v\u1edbi h\u1ea1t Salt. &lt;gi\u00e1 tr\u1ecb h\u1ea1t&gt;:&lt;bi\u1ec3u th\u1ee9c glob&gt;.<\/td>\n<td><code>salt -G 'os:Ubuntu' \/file\/to\/copy \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--grain-pcre<\/code><\/td>\n<td>Bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau d\u01b0\u1edbi d\u1ea1ng Bi\u1ec3u th\u1ee9c ch\u00ednh quy t\u01b0\u01a1ng th\u00edch v\u1edbi Perl kh\u1edbp v\u1edbi c\u00e1c gi\u00e1 tr\u1ecb \u0111\u01b0\u1ee3c tr\u1ea3 v\u1ec1 b\u1edfi c\u00e1c h\u1ea1t Salt tr\u00ean minion.&lt;gi\u00e1 tr\u1ecb h\u1ea1t&gt;:&lt;bi\u1ec3u th\u1ee9c ch\u00ednh quy&gt;<\/td>\n<td><code>salt-cp --grain-pcre 'os:Arch' \/file\/to\/copy \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-C<\/code>,<code>--chunked<\/code><\/td>\n<td>S\u1eed d\u1ee5ng ch\u1ebf \u0111\u1ed9 chunked \u0111\u1ec3 sao ch\u00e9p t\u1ec7p. H\u1ed7 tr\u1ee3 t\u1ec7p l\u1edbn, sao ch\u00e9p v\u00e0 n\u00e9n th\u01b0 m\u1ee5c \u0111\u1ec7 quy.<\/td>\n<td><code>salt-cp -C \/some\/large\/file \/destination<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-n<\/code>,<code>--no-compression<\/code><\/td>\n<td>V\u00f4 hi\u1ec7u h\u00f3a gzip \u1edf ch\u1ebf \u0111\u1ed9 chunked.<\/td>\n<td><code>salt-cp -C -n \/some\/large\/file \/destination<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-key\">salt-key<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-key\"><\/a><a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-key\"><\/a><\/h2>\n<p>\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 qu\u1ea3n l\u00fd kh\u00f3a c\u00f4ng khai c\u1ee7a m\u00e1y ch\u1ee7 Salt.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-key --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-key -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-key -c \/home\/salt\/conf<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-u<\/code>,<code>--user<\/code><\/td>\n<td>Cung c\u1ea5p cho ng\u01b0\u1eddi d\u00f9ng \u0111\u1ec3 ch\u1ea1y salt-key.<\/td>\n<td><code>salt-key --user steven<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-q<\/code>,<code>--quiet<\/code><\/td>\n<td>Ng\u0103n ch\u1eb7n \u0111\u1ea7u ra<\/td>\n<td><code>salt-key -q<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-y<\/code>,<code>--yes<\/code><\/td>\n<td>Tr\u1ea3 l\u1eddi c\u00f3 cho t\u1ea5t c\u1ea3 c\u00e1c c\u00e2u h\u1ecfi. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>False<\/code>.<\/td>\n<td><code>salt-key -y True<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--rotate-aes-key<\/code><\/td>\n<td>Thi\u1ebft l\u1eadp \u0111\u1ec3&nbsp;<code>False<\/code>ng\u0103n phi\u00ean kh\u00f3a \u0111\u01b0\u1ee3c l\u00e0m m\u1edbi khi kh\u00f3a b\u1ecb x\u00f3a ho\u1eb7c b\u1ecb t\u1eeb ch\u1ed1i. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>True<\/code>.<\/td>\n<td><code>salt-key --rotate-aes-key False<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/var\/log\/salt\/minion<\/code>.<\/td>\n<td><code>salt-key --logfile \/home\/salt\/log\/minion -D<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn c\u00f3 s\u1eb5n l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-key --log-file-level all --accept '*'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--list<\/code><\/td>\n<td>Li\u1ec7t k\u00ea c\u00e1c kh\u00f3a c\u00f4ng khai.&nbsp;<code>pre<\/code>,&nbsp;<code>un<\/code>, v\u00e0&nbsp;<code>unaccepted<\/code>s\u1ebd li\u1ec7t k\u00ea c\u00e1c kh\u00f3a ch\u01b0a \u0111\u01b0\u1ee3c ch\u1ea5p nh\u1eadn\/ch\u01b0a k\u00fd.&nbsp;<code>acc<\/code>ho\u1eb7c&nbsp;<code>accepted<\/code>s\u1ebd li\u1ec7t k\u00ea c\u00e1c kh\u00f3a \u0111\u00e3 \u0111\u01b0\u1ee3c ch\u1ea5p nh\u1eadn\/\u0111\u00e3 k\u00fd.&nbsp;<code>rej<\/code>ho\u1eb7c&nbsp;<code>rejected<\/code>s\u1ebd li\u1ec7t k\u00ea c\u00e1c kh\u00f3a b\u1ecb t\u1eeb ch\u1ed1i.&nbsp;<code>all<\/code>s\u1ebd li\u1ec7t k\u00ea t\u1ea5t c\u1ea3 c\u00e1c kh\u00f3a.<\/td>\n<td><code>salt-key -l all<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-a<\/code>,<code>--accept<\/code><\/td>\n<td>Ch\u1ea5p nh\u1eadn kh\u00f3a c\u00f4ng khai. Globs \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3.<\/td>\n<td><code>salt-key --accept 'minion*'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-A<\/code>,<code>--accept-all<\/code><\/td>\n<td>Ch\u1ea5p nh\u1eadn t\u1ea5t c\u1ea3 c\u00e1c kh\u00f3a \u0111ang ch\u1edd x\u1eed l\u00fd.<\/td>\n<td><code>salt-key -A<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-r<\/code>,<code>--reject<\/code><\/td>\n<td>T\u1eeb ch\u1ed1i m\u1ed9t kh\u00f3a c\u1ee5 th\u1ec3. Globs \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3.<\/td>\n<td><code>salt-key -r 'minion*'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-R<\/code>,<code>--reject-all<\/code><\/td>\n<td>T\u1eeb ch\u1ed1i t\u1ea5t c\u1ea3 c\u00e1c kh\u00f3a \u0111ang ch\u1edd x\u1eed l\u00fd.<\/td>\n<td><code>salt-key -R<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--include-all<\/code><\/td>\n<td>Bao g\u1ed3m c\u00e1c kh\u00f3a kh\u00f4ng ch\u1edd x\u1eed l\u00fd khi ch\u1ea5p nh\u1eadn v\u00e0 t\u1eeb ch\u1ed1i.<\/td>\n<td><code>salt-key -r 'minion*' --include-all<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-p<\/code>,<code>--print<\/code><\/td>\n<td>In kh\u00f3a c\u00f4ng khai.<\/td>\n<td><code>salt-key --print 'minion1'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code>,<code>--delete<\/code><\/td>\n<td>X\u00f3a kh\u00f3a c\u00f4ng khai. Globs \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3.<\/td>\n<td><code>salt-key -d 'minion*'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-D<\/code>,<code>--delete-all<\/code><\/td>\n<td>X\u00f3a t\u1ea5t c\u1ea3 kh\u00f3a c\u00f4ng khai.<\/td>\n<td><code>salt-key --delete-all -y<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-f<\/code>,<code>--finger<\/code><\/td>\n<td>In d\u1ea5u v\u00e2n tay c\u1ee7a ch\u00eca kh\u00f3a.<\/td>\n<td><code>salt-key --finger 'minion1'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-F<\/code>,<code>--finger-all<\/code><\/td>\n<td>In d\u1ea5u v\u00e2n tay c\u1ee7a t\u1ea5t c\u1ea3 c\u00e1c ch\u00eca kh\u00f3a.<\/td>\n<td><code>salt-key --F<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--gen-keys<\/code><\/td>\n<td>\u0110\u1eb7t t\u00ean \u0111\u1ec3 t\u1ea1o c\u1eb7p kh\u00f3a.<\/td>\n<td><code>salt-key --gen-keys newminion<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--gen-keys-dir<\/code><\/td>\n<td>Ch\u1ecdn n\u01a1i l\u01b0u c\u1eb7p kh\u00f3a m\u1edbi t\u1ea1o. Ch\u1ec9 ho\u1ea1t \u0111\u1ed9ng v\u1edbi&nbsp;<code>--gen-keys<\/code>.<\/td>\n<td><code>salt-key --gen-keys newminion --gen-keys-dir \/home\/salt\/keypairs<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--keysize<\/code><\/td>\n<td>\u0110\u1eb7t k\u00edch th\u01b0\u1edbc kh\u00f3a cho kh\u00f3a \u0111\u01b0\u1ee3c t\u1ea1o. Ph\u1ea3i c\u00f3 gi\u00e1 tr\u1ecb t\u1eeb 2048 tr\u1edf l\u00ean. Ch\u1ec9 ho\u1ea1t \u0111\u1ed9ng v\u1edbi&nbsp;<code>--gen-keys<\/code>.<\/td>\n<td><code>salt-key --gen-keys newminion --keysize 4096<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--gen-signature<\/code><\/td>\n<td>T\u1ea1o ch\u1eef k\u00fd cho kh\u00f3a c\u00f4ng khai c\u1ee7a ch\u1ee7 c\u00f3 t\u00ean l\u00e0&nbsp;<code>master_pubkey_signature<\/code>. \u0110i\u1ec1u n\u00e0y y\u00eau c\u1ea7u m\u1ed9t c\u1eb7p kh\u00f3a k\u00fd m\u1edbi c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c t\u1ea1o b\u1eb1ng&nbsp;<code>--auto-create<\/code>t\u00f9y ch\u1ecdn.<\/td>\n<td><code>salt-key --gen-signature --auto-create<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--priv<\/code><\/td>\n<td>T\u1ec7p kh\u00f3a ri\u00eang t\u01b0 d\u00f9ng \u0111\u1ec3 t\u1ea1o ch\u1eef k\u00fd.<\/td>\n<td><code>salt-key --priv key.pem<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--signature-path<\/code><\/td>\n<td>\u0110\u01b0\u1eddng d\u1eabn t\u1ec7p cho ch\u1eef k\u00fd m\u1edbi.<\/td>\n<td><code>salt-key --gen-signature --auto-create --signature-path \/path\/to\/signature<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--pub<\/code><\/td>\n<td>T\u1ec7p kh\u00f3a c\u00f4ng khai d\u00f9ng \u0111\u1ec3 t\u1ea1o ch\u1eef k\u00fd.<\/td>\n<td><code>salt-key --gen-signature key.pub<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--auto-create<\/code><\/td>\n<td>T\u1ef1 \u0111\u1ed9ng t\u1ea1o c\u1eb7p kh\u00f3a k\u00fd.<\/td>\n<td><code>salt-key --gen-signature --auto-create<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-master\">salt-master<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-master\"><\/a><a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-master\"><\/a><\/h2>\n<p>M\u1ed9t con qu\u1ef7 d\u00f9ng \u0111\u1ec3 \u0111i\u1ec1u khi\u1ec3n l\u00ednh Salt.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-master --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-master -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-master -c \/home\/salt\/conf<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-u<\/code>,<code>--user<\/code><\/td>\n<td>Cung c\u1ea5p cho ng\u01b0\u1eddi d\u00f9ng \u0111\u1ec3 ch\u1ea1y salt-master.<\/td>\n<td><code>salt-master --user steven<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code>,<code>--daemon<\/code><\/td>\n<td>Ch\u1ea1y salt-master nh\u01b0 m\u1ed9t daemon.<\/td>\n<td><code>salt-master -d<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--pid-file<\/code><\/td>\n<td>Ch\u1ec9 \u0111\u1ecbnh \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p c\u1ee7a pidfile. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/run\/salt-master.pid<\/code><\/td>\n<td><code>salt-master --pid-file \/path\/to\/new\/pid<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-master -l info<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/log\/salt\/master<\/code><\/td>\n<td><code>salt-master --log-file \/home\/salt\/log<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c ghi nh\u1eadt k\u00fd c\u1ee7a t\u1ec7p nh\u1eadt k\u00fd. C\u00e1c t\u00f9y ch\u1ecdn gi\u1ed1ng nh\u01b0<code>--log-level<\/code><\/td>\n<td><code>salt-master --log-level all<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-minion\">salt-minion<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-minion\"><\/a><a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-minion\"><\/a><\/h2>\n<p>M\u1ed9t con qu\u1ef7 \u0111\u01b0\u1ee3c \u0111i\u1ec1u khi\u1ec3n b\u1edfi m\u1ed9t Salt master.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-minion --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-minion -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-minion -c \/home\/salt\/conf<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-u<\/code>,<code>--user<\/code><\/td>\n<td>Cung c\u1ea5p cho ng\u01b0\u1eddi d\u00f9ng \u0111\u1ec3 ch\u1ea1y salt-minion.<\/td>\n<td><code>salt-minion --user steven<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code>,<code>--daemon<\/code><\/td>\n<td>Ch\u1ea1y salt-minion nh\u01b0 m\u1ed9t daemon.<\/td>\n<td><code>salt-minion -d<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--pid-file<\/code><\/td>\n<td>Ch\u1ec9 \u0111\u1ecbnh \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p c\u1ee7a pidfile. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/run\/salt-minion.pid<\/code><\/td>\n<td><code>salt-minion --pid-file \/path\/to\/new\/pid<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-master -l info<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/log\/salt\/minion<\/code><\/td>\n<td><code>salt-minion --log-file \/home\/salt\/log<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c ghi nh\u1eadt k\u00fd c\u1ee7a t\u1ec7p nh\u1eadt k\u00fd. C\u00e1c t\u00f9y ch\u1ecdn gi\u1ed1ng nh\u01b0<code>--log-level<\/code><\/td>\n<td><code>salt-minion --log-level all<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-run\">salt-run<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-run\"><\/a><a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-run\"><\/a><\/h2>\n<p>Ch\u1ea1y Salt runner tr\u00ean Salt master.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-run --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-run -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-run -c \/home\/salt\/conf foo.bar<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-t<\/code>,<code>--timeout<\/code><\/td>\n<td>S\u1ed1 gi\u00e2y ch\u1edd ph\u1ea3n h\u1ed3i t\u1eeb minion. M\u1eb7c \u0111\u1ecbnh l\u00e0 5 gi\u00e2y.<\/td>\n<td><code>salt-run -t 25 foo.bar<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code>,&nbsp;<code>--doc<\/code>,<code>--documentation<\/code><\/td>\n<td>Tr\u1ea3 v\u1ec1 t\u1ea5t c\u1ea3 t\u00e0i li\u1ec7u c\u00f3 s\u1eb5n cho m\u1ed9t m\u00f4-\u0111un ho\u1eb7c tr\u00ecnh ch\u1ea1y.<\/td>\n<td><code>salt-run foo.bar -d<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-run -l info foo.bar<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/log\/salt\/master<\/code><\/td>\n<td><code>salt-minion --log-file \/home\/salt\/log foo.bar<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c ghi nh\u1eadt k\u00fd c\u1ee7a t\u1ec7p nh\u1eadt k\u00fd. C\u00e1c t\u00f9y ch\u1ecdn gi\u1ed1ng nh\u01b0<code>--log-level<\/code><\/td>\n<td><code>salt-minion --log-level all foo.bar<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-ssh\">salt-ssh<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-ssh\"><\/a><a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-ssh\"><\/a><\/h2>\n<p>S\u1eed d\u1ee5ng giao th\u1ee9c SSH \u0111\u1ec3 th\u1ef1c thi c\u00e1c l\u1ec7nh salt.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-ssh --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-ssh -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-ssh '*' -c \/home\/salt\/conf test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-r<\/code>,&nbsp;<code>--raw<\/code>,<code>--raw-shell<\/code><\/td>\n<td>Ch\u1ea1y l\u1ec7nh shell th\u00f4.<\/td>\n<td><code>salt-ssh '*' -r echo 'test'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--roster<\/code><\/td>\n<td>Ch\u1ecdn h\u1ec7 th\u1ed1ng danh s\u00e1ch \u0111\u1ec3 s\u1eed d\u1ee5ng. M\u1eb7c \u0111\u1ecbnh l\u00e0 danh s\u00e1ch t\u1ec7p ph\u1eb3ng.<\/td>\n<td><code>salt-ssh '192.168.0.0\/16' --roster scan pkg.install apache2<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--roster-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c t\u1ec7p danh s\u00e1ch. M\u1eb7c \u0111\u1ecbnh l\u00e0 c\u00f9ng th\u01b0 m\u1ee5c v\u1edbi t\u1ec7p c\u1ea5u h\u00ecnh ch\u00ednh.<\/td>\n<td><code>salt-ssh 'minion1' --roster-file \/path\/to\/roster test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--refresh<\/code>,<code>--refresh-cache<\/code><\/td>\n<td>S\u1eed d\u1ee5ng \u0111\u1ec3 bu\u1ed9c l\u00e0m m\u1edbi d\u1eef li\u1ec7u c\u1ee7a m\u1ee5c ti\u00eau trong b\u1ed9 \u0111\u1ec7m ph\u00eda m\u00e1y ch\u1ee7 tr\u01b0\u1edbc khi \u0111\u1ea1t \u0111\u1ebfn khung th\u1eddi gian l\u00e0m m\u1edbi t\u1ef1 \u0111\u1ed9ng.<\/td>\n<td><code>salt-ssh 'minion1' --refresh-cache status.diskstats<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--max-procs<\/code><\/td>\n<td>S\u1ed1 l\u01b0\u1ee3ng minion giao ti\u1ebfp c\u00f9ng l\u00fac. Nh\u00ecn chung, nhi\u1ec1u k\u1ebft n\u1ed1i h\u01a1n c\u00f3 ngh\u0129a l\u00e0 giao ti\u1ebfp nhanh h\u01a1n. M\u1eb7c \u0111\u1ecbnh l\u00e0 25.<\/td>\n<td><code>salt-ssh '*' --max-procs 50 test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-v<\/code>,<code>--verbose<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb ID c\u00f4ng vi\u1ec7c.<\/td>\n<td><code>salt-ssh '*' -v test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-s<\/code>,<code>--static<\/code><\/td>\n<td>Tr\u1ea3 v\u1ec1 d\u1eef li\u1ec7u minion d\u01b0\u1edbi d\u1ea1ng nh\u00f3m.<\/td>\n<td><code>salt-ssh '*' -s status.meminfo<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-w<\/code>,<code>--wipe<\/code><\/td>\n<td>X\u00f3a c\u00e1c t\u1ec7p Salt khi c\u00f4ng vi\u1ec7c ho\u00e0n t\u1ea5t.<\/td>\n<td><code>salt-ssh '*' -w state.apply<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-W<\/code>.<code>--rand-thin-dir<\/code><\/td>\n<td>Tri\u1ec3n khai \u0111\u1ebfn m\u1ed9t th\u01b0 m\u1ee5c t\u1ea1m th\u1eddi ng\u1eabu nhi\u00ean v\u00e0 d\u1ecdn d\u1eb9p th\u01b0 m\u1ee5c khi ho\u00e0n t\u1ea5t.<\/td>\n<td><code>salt-ssh '*' -W state.apply<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--python2-bin<\/code><\/td>\n<td>\u0110\u01b0\u1eddng d\u1eabn t\u1ec7p \u0111\u1ebfn t\u1ec7p nh\u1ecb ph\u00e2n python2 c\u00f3 c\u00e0i \u0111\u1eb7t Salt.<\/td>\n<td><code>salt-ssh '*' --python2-bin \/file\/to\/bin test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--python3-bin<\/code><\/td>\n<td>\u0110\u01b0\u1eddng d\u1eabn t\u1ec7p \u0111\u1ebfn t\u1ec7p nh\u1ecb ph\u00e2n python3 c\u00f3 c\u00e0i \u0111\u1eb7t Salt.<\/td>\n<td><code>salt-ssh '*' --python3-bin \/file\/to\/bin test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--jid<\/code><\/td>\n<td>Cung c\u1ea5p ID c\u00f4ng vi\u1ec7c thay v\u00ec t\u1ea1o m\u1ed9t ID.<\/td>\n<td><code>salt-ssh '*' -v --jid 00000000000000000000 test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--priv<\/code><\/td>\n<td>Cung c\u1ea5p kh\u00f3a ri\u00eang SSH n\u00e0o s\u1ebd \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 x\u00e1c th\u1ef1c.<\/td>\n<td><code>salt-ssh '*' --priv \/path\/to\/privkey status.netstats<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-i<\/code>,<code>--ignore-host-keys<\/code><\/td>\n<td>V\u00f4 hi\u1ec7u h\u00f3a StrictHostKeyChecking \u0111\u1ec3 ng\u0103n ch\u1eb7n vi\u1ec7c y\u00eau c\u1ea7u ph\u00ea duy\u1ec7t k\u1ebft n\u1ed1i.<\/td>\n<td><code>salt-ssh '*' -i pkg.install mysql-client<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--no-host-keys<\/code><\/td>\n<td>B\u1ecf qua kh\u00f3a m\u00e1y ch\u1ee7 SSH. H\u1eefu \u00edch n\u1ebfu l\u1ed7i v\u1eabn ti\u1ebfp di\u1ec5n v\u1edbi&nbsp;<code>--ignore-host-keys<\/code>.<\/td>\n<td><code>salt-ssh '*' -i --no-host-keys pkg.install cowsay<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--user<\/code><\/td>\n<td>Cung c\u1ea5p cho ng\u01b0\u1eddi d\u00f9ng th\u00f4ng tin \u0111\u1ec3 x\u00e1c th\u1ef1c.<\/td>\n<td><code>salt-ssh '*' --user steven -r cowsay 'hello!'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--passwd<\/code><\/td>\n<td>Cung c\u1ea5p m\u1eadt kh\u1ea9u \u0111\u1ec3 x\u00e1c th\u1ef1c.<\/td>\n<td><code>salt-ssh 'minion2' --passwd p455w0rd system.reboot<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--askpass<\/code><\/td>\n<td>Y\u00eau c\u1ea7u nh\u1eafc nh\u1eadp m\u1eadt kh\u1ea9u.<\/td>\n<td><code>salt-ssh 'minion1' --askpass sys.doc<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--key-deploy<\/code><\/td>\n<td>Tri\u1ec3n khai kh\u00f3a SSH \u0111\u01b0\u1ee3c \u1ee7y quy\u1ec1n cho t\u1ea5t c\u1ea3 c\u00e1c minion.<\/td>\n<td><code>salt-ssh '*' --key-deploy --passwd test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--sudo<\/code><\/td>\n<td>Ch\u1ea1y l\u1ec7nh v\u1edbi quy\u1ec1n cao h\u01a1n.<\/td>\n<td><code>salt-ssh '*' -r --sudo somecommand<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--scan-ports<\/code><\/td>\n<td>Danh s\u00e1ch c\u00e1c c\u1ed5ng \u0111\u01b0\u1ee3c ph\u00e2n t\u00e1ch b\u1eb1ng d\u1ea5u ph\u1ea9y \u0111\u1ec3 qu\u00e9t trong danh s\u00e1ch qu\u00e9t.<\/td>\n<td><code>salt-ssh '192.168.0.0\/16' --roster scan --scan-ports 22,23 test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--scan-timeout<\/code><\/td>\n<td>H\u1ebft th\u1eddi gian qu\u00e9t danh s\u00e1ch.<\/td>\n<td><code>salt-ssh '192.168.0.0\/16' --roster scan --scan-timeout 100 test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-ssh -l info test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/log\/salt\/ssh<\/code><\/td>\n<td><code>salt-ssh --log-file \/home\/salt\/log test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c ghi nh\u1eadt k\u00fd c\u1ee7a t\u1ec7p nh\u1eadt k\u00fd. C\u00e1c t\u00f9y ch\u1ecdn gi\u1ed1ng nh\u01b0<code>--log-level<\/code><\/td>\n<td><code>salt-ssh --log-level all test.ping<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-E<\/code>,<code>--pcre<\/code><\/td>\n<td>Bi\u1ec3u th\u1ee9c m\u1ee5c ti\u00eau s\u1ebd \u0111\u01b0\u1ee3c di\u1ec5n gi\u1ea3i l\u00e0 Bi\u1ec3u th\u1ee9c ch\u00ednh quy t\u01b0\u01a1ng th\u00edch v\u1edbi Perl (PCRE) ch\u1ee9 kh\u00f4ng ph\u1ea3i l\u00e0 m\u1ed9t glob shell.<\/td>\n<td><code>salt-ssh -E 'minion[0-9]' service.reload apache2<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--out<\/code><\/td>\n<td>Ch\u1ecdn m\u1ed9t \u0111\u1ea7u ra thay th\u1ebf \u0111\u1ec3 hi\u1ec3n th\u1ecb d\u1eef li\u1ec7u tr\u1ea3 v\u1ec1. C\u00e1c \u0111\u1ea7u ra kh\u1ea3 d\u1ee5ng l\u00e0:&nbsp;<code>grains<\/code>,&nbsp;<code>highstate<\/code>,&nbsp;<code>json<\/code>,&nbsp;<code>key<\/code>,&nbsp;<code>overstatestage<\/code>,&nbsp;<code>pprint<\/code>,&nbsp;<code>raw<\/code>,&nbsp;<code>txt<\/code>,&nbsp;<code>yaml<\/code>.<\/td>\n<td><code>salt-ssh '*' test.version --out json<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-syndic\">salt-syndic<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-syndic\"><\/a><a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-syndic\"><\/a><\/h2>\n<p>M\u1ed9t tay sai \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp tr\u00ean m\u1ed9t ng\u01b0\u1eddi ch\u1ee7 cho ph\u00e9p truy\u1ec1n l\u1ec7nh t\u1eeb m\u1ed9t ng\u01b0\u1eddi ch\u1ee7 c\u1ea5p cao h\u01a1n.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-syndic --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-syndic -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-syndic -c \/home\/salt\/conf<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-u<\/code>,<code>--user<\/code><\/td>\n<td>Cung c\u1ea5p cho ng\u01b0\u1eddi d\u00f9ng \u0111\u1ec3 ch\u1ea1y salt-syndic.<\/td>\n<td><code>salt-syndic --user steven<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code>,<code>--daemon<\/code><\/td>\n<td>Ch\u1ea1y salt-syndic nh\u01b0 m\u1ed9t daemon.<\/td>\n<td><code>salt-syndic -d<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--pid-file<\/code><\/td>\n<td>Ch\u1ec9 \u0111\u1ecbnh \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p c\u1ee7a pidfile. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/run\/salt-syndic.pid<\/code><\/td>\n<td><code>salt-syndic --pid-file \/path\/to\/new\/pid<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-syndic -l info<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/log\/salt\/master<\/code><\/td>\n<td><code>salt-syndic --log-file \/home\/salt\/log<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c ghi nh\u1eadt k\u00fd c\u1ee7a t\u1ec7p nh\u1eadt k\u00fd. C\u00e1c t\u00f9y ch\u1ecdn gi\u1ed1ng nh\u01b0<code>--log-level<\/code><\/td>\n<td><code>salt-syndic --log-level all<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"spm\">spm<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#spm\"><\/a><\/h2>\n<p>Tr\u00ecnh qu\u1ea3n l\u00fd g\u00f3i mu\u1ed1i<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-y<\/code>,<code>--yes<\/code><\/td>\n<td>Tr\u1ea3 l\u1eddi \u201cc\u00f3\u201d cho t\u1ea5t c\u1ea3 c\u00e1c c\u00e2u h\u1ecfi.<\/td>\n<td><code>spm remove -y apache<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-f<\/code>,<code>--force<\/code><\/td>\n<td>Bu\u1ed9c&nbsp;<code>spm<\/code>th\u1ef1c hi\u1ec7n m\u1ed9t h\u00e0nh \u0111\u1ed9ng m\u00e0 th\u00f4ng th\u01b0\u1eddng n\u00f3 s\u1ebd t\u1eeb ch\u1ed1i th\u1ef1c hi\u1ec7n.<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>spm -l info install apache<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/log\/salt\/spm<\/code><\/td>\n<td><code>spm --log-file \/home\/salt\/log install mysql<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c ghi nh\u1eadt k\u00fd c\u1ee7a t\u1ec7p nh\u1eadt k\u00fd. C\u00e1c t\u00f9y ch\u1ecdn gi\u1ed1ng nh\u01b0<code>--log-level<\/code><\/td>\n<td><code>spm --log-level all remove nginx<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>Y\u00eau c\u1ea7u<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>update_repo<\/code><\/td>\n<td>C\u1eadp nh\u1eadt si\u00eau d\u1eef li\u1ec7u kho l\u01b0u tr\u1eef \u0111\u01b0\u1ee3c c\u1ea5u h\u00ecnh c\u1ee5c b\u1ed9.<\/td>\n<td><code>spm update_repo<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>install<\/code><\/td>\n<td>C\u00e0i \u0111\u1eb7t g\u00f3i theo t\u00ean t\u1eeb kho l\u01b0u tr\u1eef SPM \u0111\u00e3 c\u1ea5u h\u00ecnh.<\/td>\n<td><code>spm install nginx<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>remove<\/code><\/td>\n<td>X\u00f3a m\u1ed9t g\u00f3i h\u00e0ng.<\/td>\n<td><code>spm remove apache<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>info<\/code><\/td>\n<td>L\u1ea5y th\u00f4ng tin v\u1ec1 g\u00f3i \u0111\u00e3 c\u00e0i \u0111\u1eb7t.<\/td>\n<td><code>spm info mysql<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>files<\/code><\/td>\n<td>Li\u1ec7t k\u00ea c\u00e1c t\u1eadp tin c\u1ee7a g\u00f3i \u0111\u00e3 c\u00e0i \u0111\u1eb7t.<\/td>\n<td><code>spm files mongodb<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>local<\/code><\/td>\n<td>Th\u1ef1c hi\u1ec7n l\u1ec7nh tr\u00ean m\u1ed9t g\u00f3i c\u1ee5c b\u1ed9, kh\u00f4ng ph\u1ea3i g\u00f3i trong kho l\u01b0u tr\u1eef ho\u1eb7c g\u00f3i \u0111\u00e3 c\u00e0i \u0111\u1eb7t. Kh\u00f4ng ho\u1ea1t \u0111\u1ed9ng v\u1edbi&nbsp;<code>remove<\/code>.<\/td>\n<td><code>spm local install \/path\/to\/package<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>build<\/code><\/td>\n<td>X\u00e2y d\u1ef1ng m\u1ed9t g\u00f3i.<\/td>\n<td><code>spm build \/path\/to\/package<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>create_repo<\/code><\/td>\n<td>Qu\u00e9t th\u01b0 m\u1ee5c \u0111\u1ec3 t\u00ecm g\u00f3i SPM h\u1ee3p l\u1ec7 v\u00e0 x\u00e2y d\u1ef1ng t\u1ec7p SPM-METADATA trong th\u01b0 m\u1ee5c \u0111\u00f3.<\/td>\n<td><code>spm create_rep \/path\/to\/package<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"salt-api\">salt-api<a href=\"https:\/\/www.linode.com\/docs\/guides\/salt-command-line-reference\/#salt-api\"><\/a><\/h2>\n<p>\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 b\u1eaft \u0111\u1ea7u Salt API<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>L\u1ef1a ch\u1ecdn<\/th>\n<th>S\u1ef1 mi\u00eau t\u1ea3<\/th>\n<th>V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--version<\/code><\/td>\n<td>T\u1ea3i phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a Salt.<\/td>\n<td><code>salt-api --version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-h<\/code>,<code>--help<\/code><\/td>\n<td>Hi\u1ec3n th\u1ecb l\u1ec7nh Salt v\u00e0 v\u0103n b\u1ea3n tr\u1ee3 gi\u00fap.<\/td>\n<td><code>salt-api -h<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code>,<code>--config-dir<\/code><\/td>\n<td>Thay \u0111\u1ed5i th\u01b0 m\u1ee5c c\u1ea5u h\u00ecnh Salt. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>\/etc\/salt<\/code>.<\/td>\n<td><code>salt-api -c \/home\/salt\/conf<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-u<\/code>,<code>--user<\/code><\/td>\n<td>Cung c\u1ea5p ng\u01b0\u1eddi d\u00f9ng \u0111\u1ec3 ch\u1ea1y salt-api.<\/td>\n<td><code>salt-api --user steven<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code>,<code>--daemon<\/code><\/td>\n<td>Ch\u1ea1y salt-api nh\u01b0 m\u1ed9t daemon.<\/td>\n<td><code>salt-api -d<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--pid-file<\/code><\/td>\n<td>Ch\u1ec9 \u0111\u1ecbnh \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p c\u1ee7a pidfile. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/run\/salt-api.pid<\/code><\/td>\n<td><code>salt-api --pid-file \/path\/to\/new\/pid<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code>,<code>--log-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c nh\u1eadt k\u00fd b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n. M\u1eb7c \u0111\u1ecbnh l\u00e0&nbsp;<code>warning<\/code>. C\u00e1c t\u00f9y ch\u1ecdn kh\u1ea3 d\u1ee5ng l\u00e0&nbsp;<code>all<\/code>,&nbsp;<code>garbage<\/code>,&nbsp;<code>trace<\/code>,&nbsp;<code>debug<\/code>,&nbsp;<code>info<\/code>,&nbsp;<code>warning<\/code>,&nbsp;<code>error<\/code>, v\u00e0&nbsp;<code>quiet<\/code>.<\/td>\n<td><code>salt-api -l info<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file<\/code><\/td>\n<td>Thay \u0111\u1ed5i \u0111\u01b0\u1eddng d\u1eabn t\u1ec7p nh\u1eadt k\u00fd. M\u1eb7c \u0111\u1ecbnh l\u00e0<code>\/var\/log\/salt\/api<\/code><\/td>\n<td><code>salt-api --log-file \/home\/salt\/log<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>--log-file-level<\/code><\/td>\n<td>Thay \u0111\u1ed5i m\u1ee9c ghi nh\u1eadt k\u00fd c\u1ee7a t\u1ec7p nh\u1eadt k\u00fd. C\u00e1c t\u00f9y ch\u1ecdn gi\u1ed1ng nh\u01b0<code>--log-level<\/code><\/td>\n<td><code>salt-api --log-level all<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"more-information\">Th\u00f4ng tin th\u00eam<\/h2>\n<p>B\u1ea1n c\u00f3 th\u1ec3 mu\u1ed1n tham kh\u1ea3o c\u00e1c ngu\u1ed3n sau \u0111\u1ec3 bi\u1ebft th\u00eam th\u00f4ng tin v\u1ec1 ch\u1ee7 \u0111\u1ec1 n\u00e0y. M\u1eb7c d\u00f9 ch\u00fang t\u00f4i cung c\u1ea5p v\u1edbi hy v\u1ecdng r\u1eb1ng ch\u00fang s\u1ebd h\u1eefu \u00edch, nh\u01b0ng xin l\u01b0u \u00fd r\u1eb1ng ch\u00fang t\u00f4i kh\u00f4ng th\u1ec3 \u0111\u1ea3m b\u1ea3o t\u00ednh ch\u00ednh x\u00e1c ho\u1eb7c t\u00ednh k\u1ecbp th\u1eddi c\u1ee7a c\u00e1c t\u00e0i li\u1ec7u \u0111\u01b0\u1ee3c l\u01b0u tr\u1eef b\u00ean ngo\u00e0i.<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.saltproject.io\/en\/latest\/ref\/cli\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">T\u00e0i li\u1ec7u d\u00f2ng l\u1ec7nh SaltStack<\/a><\/li>\n<li><a href=\"https:\/\/docs.saltproject.io\/en\/latest\/ref\/clouds\/all\/salt.cloud.clouds.linode.html\" target=\"_blank\" rel=\"noreferrer noopener\">M\u00f4-\u0111un \u0111\u00e1m m\u00e2y Linode<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>SaltStack&nbsp;l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 qu\u1ea3n l\u00fd c\u1ea5u h\u00ecnh m\u1ea1nh m\u1ebd. Sau \u0111\u00e2y l\u00e0 h\u01b0\u1edbng d\u1eabn tham kh\u1ea3o nhanh v\u1ec1 giao di\u1ec7n d\u00f2ng l\u1ec7nh (CLI) c\u1ee7a Salt. salt \u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 ra l\u1ec7nh cho c\u00e1c minion c\u00f9ng l\u00fac.&nbsp;saltCho ph\u00e9p b\u1ea1n v\u1eeba \u0111i\u1ec1u khi\u1ec3n v\u1eeba truy v\u1ea5n c\u00e1c minion. L\u1ef1a ch\u1ecdn S\u1ef1 mi\u00eau t\u1ea3 V\u00ed d\u1ee5<\/p>\n","protected":false},"author":1,"featured_media":36042,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124],"tags":[],"class_list":["post-34987","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-salt"],"_links":{"self":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/posts\/34987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/comments?post=34987"}],"version-history":[{"count":0,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/posts\/34987\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/media\/36042"}],"wp:attachment":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/media?parent=34987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/categories?post=34987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/tags?post=34987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}