In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article Xiaobian for you to introduce in detail "how to install the local APT software package warehouse in Ubuntu", the content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to install the local APT software package warehouse in Ubuntu" can help you solve your doubts.
Apt is the package manager for Debian and its derivative distributions. APT can automatically download, configure, and install packages in binary or source code format, thus simplifying the process of managing software on Unix systems. RPM packages can now be installed.
System environment
Ubuntu 20.04 LTS
Install dpkg-dev
The dpkg-dev package needs to be installed to create package metadata for the local APT repository.
Bob@ubuntu-20-04VR dpkg-dev $sudo apt install-y install the http service
If the software repository needs to be used by other ubuntu 20.04 servers, you can install web servers to provide software repositories for other ubuntu 20.04 servers.
Bob@ubuntu-20-04virtual $sudo apt install-y apache2 creates a storage directory for the local warehouse
Create the / var/www/html/repo directory to hold the software packages:
Bob@ubuntu-20-04VOUR $sudo mkdir / var/www/html/repo
Create a mount point and mount the ubuntu 20.04CD to the / mnt/cdrom directory.
Bob@ubuntu-20-04sudo mount / dev/cdrom / mnt/cdrommount: / mnt/cdrom: WARNING: device write-protected, mounted read-only.
Find all the deb packages in / mnt/cdrom and copy them to our local APT repository directory.
Bob@ubuntu-20-04 mnt/cdrom iname $sudo find / mnt/cdrom-iname "* .deb"-exec cp {} / var/www/html/repo\; write a script to update the Package.gz file
Create a script file to scan and update the Packages.gz file because you may add new deb packages to your local APT repository from time to time. Therefore, each time you add a new deb package to the repo directory, you need to update the Packages.gz file.
Bob@ubuntu-20-04VOUBUBG $sudo vim / binbind BASHCD / var/www/html/repodpkg-scanpackages. / dev/null | gzip-9c > Packages.gz
Add executable permissions to the update-debs script file:
Bob@ubuntu-20-04VANG $sudo chmod + x / bin/update-debs
Now execute this script to create the Packages.gz file:
Bob@ubuntu-20-04 APT warehouse $sudo / bin/update-debs add the local APT warehouse address to the sources.list file
First back up the sources.list file, and then add:
Bob@ubuntu-20-04sudo cp sources.list sources.list.back $cd / etc/apt/bob@ubuntu-20-04virtual sources.list sources.list.back EtcUniverse apt $http-p
Open the sources.list file and add the following at the bottom of the file:
Bob@ubuntu-20-04Flux http://192.168.43.174/repo EtcCompact apt $sudo vim sources.list# Local APT Repositorydeb [allow-insecure=yes] ATM. /
Update the software source:
Bob@ubuntu-20-04 APT package $sudo apt update read here, this article "how to install the local APT package repository in Ubuntu" article has been introduced, want to grasp the knowledge of this article also need to practice and use in order to understand, if you want to know more related articles, 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: 242
*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.