In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to use the APK package manager in Alpine linux", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use the APK package manager in Alpine linux" this article.
Alpine provides a very useful apk package management tool, using the apk-help command to view the complete package management commands.
Advantages and disadvantages of Alpine Linux
Alpine Linux's Docker image is lightweight (only 5m in size) and has a complete package management tool (APK).
The official Docker image may replace Ubuntu with Alpine Linux.
Inferior position
Alpine Linux uses musl, which may be a little different from the glibc implementation used by other Linux distributions.
DNS services implemented by musl do not use the search and domain configurations in the resolv.conf file, so you need to be careful when discovering services through DNS.
Package Manager apk package Management Command
Alpine uses apk for package management. Use the apk-help command to view the complete package management commands. Here are some common commands:
1. Update: update the local mirror source index from the remote mirror source
The update command downloads APKINDEX.tar.gz from each list of image sources and stores it in the local cache, usually under / var/cache/apk/ (where Alpine is located), / var/lib/apk/, / etc/apk/cache/.
$apk update
2. Add: install PACKAGES and automatically resolve dependencies
The add command installs the package from the repository and automatically manages dependencies.
$apk add openssh openntp vim$ apk add-- no-cache mysql-client$ apk add docker-- update-cache-- repository http://mirrors.ustc.edu.cn/alpine/v3.4/main/-- allow-untrusted
Install the specified version of the package
$apk add asterisk=1.6.0.21-r0 $apk add 'asterisk$ apk add' asterisk > 1.6.1'
3. Del: uninstall and delete PACKAGES
$apk del openssh openntp vim
4. Upgrade: upgrade currently installed software packages upgrade command to upgrade all installed software packages (generally including the kernel), of course, you can also specify to upgrade only part of the software packages (specified by-u or-upgrade selection).
$apk update # update the latest local mirror source $apk upgrade # upgrade software $apk add-- upgrade busybox # specify the upgrade part of the package
5. Search: search for software packages
The search command searches for available software packages, the-v parameter outputs the description content, the payout wildcard, and the-d or-description parameter specifies the query through the package description.
$apk search # find all available packages $apk search-v # find all available packages and their descriptions $apk search-v 'acf*' # find packages by package name $apk search-v-d 'docker' # find specific packages through description files
6. The info command is used to display information about the software package.
$apk info # lists all installed packages $apk info-a zlib # displays complete package information $apk info-- who-owns / sbin/lbu # shows the package configuration software source to which the specified file belongs
Take Zhongke Dayuan as an example: add the corresponding source address to the / etc/apk/repositories file, one address per line.
The above $vi / etc/apk/repositories# / media/cdrom/apks http://mirrors.ustc.edu.cn/alpine/v3.5/mainhttp://mirrors.ustc.edu.cn/alpine/v3.5/community is all the contents of the article "how to use the APK package Manager in Alpine linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.