{"id":772,"date":"2019-12-31T08:19:56","date_gmt":"2019-12-31T08:19:56","guid":{"rendered":"http:\/\/www.liutianfeng.com\/?p=772"},"modified":"2020-06-04T09:34:21","modified_gmt":"2020-06-04T09:34:21","slug":"suse-zypper%e5%b8%b8%e8%a7%81%e6%93%8d%e4%bd%9c-%e6%b7%bb%e5%8a%a0%e5%88%a0%e9%99%a4repo%e6%ba%90","status":"publish","type":"post","link":"https:\/\/www.liutianfeng.com\/?p=772","title":{"rendered":"SuSE zypper\u5e38\u89c1\u64cd\u4f5c \u6dfb\u52a0\u5220\u9664repo\u6e90"},"content":{"rendered":"<p>zypper\u5e2e\u52a9\u4fe1\u606f\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\"># zypper --help\r\n  Usage:\r\n\tzypper [--global-options] &lt;command&gt; [--command-options] [arguments]\r\n\tzypper &lt;subcommand&gt; [--command-options] [arguments]\r\n\r\n  Global Options:\r\n\t--help, -h\t\tHelp.\r\n\t--version, -V\t\tOutput the version number.\r\n\t--promptids\t\tOutput a list of zypper's user prompts.\r\n\t--config, -c &lt;file&gt;\tUse specified config file instead of the default.\r\n\t--userdata &lt;string&gt;\tUser defined transaction id used in history and plugins.\r\n\t--quiet, -q\t\tSuppress normal output, print only error\r\n\t\t\t\tmessages.\r\n\t--verbose, -v\t\tIncrease verbosity.\r\n\t--[no-]color\t\tWhether to use colors in output if tty supports it.\r\n\t--no-abbrev, -A\t\tDo not abbreviate text in tables.\r\n\t--table-style, -s\tTable style (integer).\r\n\t--non-interactive, -n\tDo not ask anything, use default answers\r\n\t\t\t\tautomatically.\r\n\t--non-interactive-include-reboot-patches\r\n\t\t\t\tDo not treat patches as interactive, which have\r\n\t\t\t\tthe rebootSuggested-flag set.\r\n\t--xmlout, -x\t\tSwitch to XML output.\r\n\t--ignore-unknown, -i\tIgnore unknown packages.\r\n\r\n\t--reposd-dir, -D &lt;dir&gt;\tUse alternative repository definition file\r\n\t\t\t\tdirectory.\r\n\t--cache-dir, -C &lt;dir&gt;\tUse alternative directory for all caches.\r\n\t--raw-cache-dir &lt;dir&gt;\tUse alternative raw meta-data cache directory.\r\n\t--solv-cache-dir &lt;dir&gt;\tUse alternative solv file cache directory.\r\n\t--pkg-cache-dir &lt;dir&gt;\tUse alternative package cache directory.\r\n\r\n     Repository Options:\r\n\t--no-gpg-checks\t\tIgnore GPG check failures and continue.\r\n\t--gpg-auto-import-keys\tAutomatically trust and import new repository\r\n\t\t\t\tsigning keys.\r\n\t--plus-repo, -p &lt;URI&gt;\tUse an additional repository.\r\n\t--plus-content &lt;tag&gt;\tAdditionally use disabled repositories providing a specific keyword.\r\n\t\t\t\tTry '--plus-content debug' to enable repos indicating to provide debug packages.\r\n\t--disable-repositories\tDo not read meta-data from repositories.\r\n\t--no-refresh\t\tDo not refresh the repositories.\r\n\t--no-cd\t\t\tIgnore CD\/DVD repositories.\r\n\t--no-remote\t\tIgnore remote repositories.\r\n\t--releasever\t\tSet the value of $releasever in all .repo files (default: distribution version)\r\n\r\n     Target Options:\r\n\t--root, -R &lt;dir&gt;\tOperate on a different root directory.\r\n\t--disable-system-resolvables\r\n\t\t\t\tDo not read installed packages.\r\n\r\n  Commands:\r\n\thelp, ?\t\t\tPrint help.\r\n\tshell, sh\t\tAccept multiple commands at once.\r\n\r\n     Repository Management:\r\n\trepos, lr\t\tList all defined repositories.\r\n\taddrepo, ar\t\tAdd a new repository.\r\n\tremoverepo, rr\t\tRemove specified repository.\r\n\trenamerepo, nr\t\tRename specified repository.\r\n\tmodifyrepo, mr\t\tModify specified repository.\r\n\trefresh, ref\t\tRefresh all repositories.\r\n\tclean\t\t\tClean local caches.\r\n\r\n     Service Management:\r\n\tservices, ls\t\tList all defined services.\r\n\taddservice, as\t\tAdd a new service.\r\n\tmodifyservice, ms\tModify specified service.\r\n\tremoveservice, rs\tRemove specified service.\r\n\trefresh-services, refs\tRefresh all services.\r\n\r\n     Software Management:\r\n\tinstall, in\t\tInstall packages.\r\n\tremove, rm\t\tRemove packages.\r\n\tverify, ve\t\tVerify integrity of package dependencies.\r\n\tsource-install, si\tInstall source packages and their build\r\n\t\t\t\tdependencies.\r\n\tinstall-new-recommends, inr\r\n\t\t\t\tInstall newly added packages recommended\r\n\t\t\t\tby installed packages.\r\n\r\n     Update Management:\r\n\tupdate, up\t\tUpdate installed packages with newer versions.\r\n\tlist-updates, lu\tList available updates.\r\n\tpatch\t\t\tInstall needed patches.\r\n\tlist-patches, lp\tList needed patches.\r\n\tdist-upgrade, dup\tPerform a distribution upgrade.\r\n\tpatch-check, pchk\tCheck for patches.\r\n\r\n     Querying:\r\n\tsearch, se\t\tSearch for packages matching a pattern.\r\n\tinfo, if\t\tShow full information for specified packages.\r\n\tpatch-info\t\tShow full information for specified patches.\r\n\tpattern-info\t\tShow full information for specified patterns.\r\n\tproduct-info\t\tShow full information for specified products.\r\n\tpatches, pch\t\tList all available patches.\r\n\tpackages, pa\t\tList all available packages.\r\n\tpatterns, pt\t\tList all available patterns.\r\n\tproducts, pd\t\tList all available products.\r\n\twhat-provides, wp\tList packages providing specified capability.\r\n\r\n     Package Locks:\r\n\taddlock, al\t\tAdd a package lock.\r\n\tremovelock, rl\t\tRemove a package lock.\r\n\tlocks, ll\t\tList current package locks.\r\n\tcleanlocks, cl\t\tRemove unused locks.\r\n\r\n     Other Commands:\r\n\tversioncmp, vcmp\tCompare two version strings.\r\n\ttargetos, tos\t\tPrint the target operating system ID string.\r\n\tlicenses\t\tPrint report about licenses and EULAs of\r\n\t\t\t\tinstalled packages.\r\n\tdownload\t\tDownload rpms specified on the commandline to a local directory.\r\n\tsource-download\t\tDownload source rpms for all installed packages\r\n\t\t\t\tto a local directory.\r\n\r\n     Subcommands:\r\n\tsubcommand\t\tLists available subcommands.<\/code><\/pre>\n<h4>\u5e38\u7528\u64cd\u4f5c<\/h4>\n<h5>1. \u5220\u9664\u6e90<\/h5>\n<pre class=\"pure-highlightjs\"><code class=\"\">zypper rr repo_name<\/code><\/pre>\n<h5>2. \u6dfb\u52a0\u6e90<\/h5>\n<pre class=\"pure-highlightjs\"><code class=\"\"># \u6e90\u4e3b\u673a\u6dfb\u52a0vsftpd\u670d\u52a1\r\nrpm -ivh vsftpd-***.rpm\r\nvim \/etc\/vsftpd.conf\r\n# \u6dfb\u52a0\u914d\u7f6e\r\nanonymous_enable=YES\r\nanon_root=\/mnt\r\nservice vsftpd restart\r\n# \u6302\u8f7dios\u955c\u50cf\u5230\/mnt\r\nmount suse12sp02.iso \/mnt\r\n# \u4e3b\u673a\u6dfb\u52a0repo\r\nzypper ar ftp:\/\/\/192.168.100.1 ftp_repo\r\n\u6216\r\nzypper ar -f ftp:\/\/192.168.100.1 ftp_repo\r\n#\u00a0\u6dfb\u52a0\u672c\u5730repo\r\nzypper\u00a0ar\u00a0file:\/\/\/mnt\/\u00a0local_repo<\/code><\/pre>\n<h5>3. \u663e\u793a\u6e90<\/h5>\n<pre class=\"pure-highlightjs\"><code class=\"\">zypper lr<\/code><\/pre>\n<h5>4. \u4e0b\u8f7d\u5305<\/h5>\n<pre class=\"pure-highlightjs\"><code class=\"\">zypper download pkg_name<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.liutianfeng.com\">liutianfeng.com<\/a> &raquo; <a href=\"https:\/\/www.liutianfeng.com\/?p=772\">SuSE zypper\u5e38\u89c1\u64cd\u4f5c \u6dfb\u52a0\u5220\u9664repo\u6e90<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>zypper\u5e2e\u52a9\u4fe1\u606f\uff1a # zypper &#8211;help Usage: zypper [&#8211;global-opt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=\/wp\/v2\/posts\/772"}],"collection":[{"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=772"}],"version-history":[{"count":3,"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=\/wp\/v2\/posts\/772\/revisions"}],"predecessor-version":[{"id":840,"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=\/wp\/v2\/posts\/772\/revisions\/840"}],"wp:attachment":[{"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liutianfeng.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}