Hi guys. So I've been using apt-mirror to create a local repository I seem to be half way to getting it to work. I've read a lot of tutorials on how this is done but I'm still not sure what I'm doing wrong. I thought I got most of the local repository working but Ubuntu doesn't seem to want to use it. Also my antivirus alerted to some of the files in the repository. Weird I’ll send a few screen shots of what I’m doing. I seem to be able to create the local repo but I can’t seem to get ubuntu to pull resources from it. This was done in a virtual machine. Here is the directory structure https://drive.google.com/file/d/0B5P...ew?usp=sharing Mirror List https://drive.google.com/open?id=0B5...kRLOHBJNjU5Vlk Sources https://drive.google.com/open?id=0B5...kthdXRkLXlqWDg Terminal error https://drive.google.com/open?id=0B5...TEwSEhNSmRjWVU
Your repository is not configured properly. I'd check that you have your paths set up correctly. The terminal error is the result of not being able to retrieve the Packages index file inside of the repository. You need to generate this if you are hosting your own personal packages, or do a complete mirroring instead of a partial, if they are official packages. An easy way you can generate your own indexes is by installing the dpkg-dev package and using dpkg-scanpackages. However, all packages have to be signed with a valid signing key that you have on your keychain. Without it, you will get a security warning every single time. Also, just a comment, it looks in the screenshot as if you are using a Windows drive for storage. If that is the case, I recommend against it vigorously. Windows and NTFS do not respect UNIX file conventions. It can and will mangle files. For example, UNIX systems (like Linux) are case sensitive, Windows is not. If you must use a Windows machine, I recommend a drive image or a native EXT4 partition for storing the files from the mirror.
Last edited by T.J.; September 16th, 2016 at 07:09 PM.
T.J.
I've learned that the hard way yes. So what I'm trying to do is a complete mirror of the repositories. I'm not sure if EXT 4 will work with a virtual machine but it's worth a try. As for the configure. Isn't scan packages for downloaded .debs? Also I'd like the repo to be protable so I can take to any ubuntu based system and use it. Would apache2 be better for this?
Creating your mirror isn't a big deal. Maintaining and updating the mirror can become cumbersome without a bit of planning. I'm not sure how portability helps you, unless you are working with offline machines. The problem of installing and updating to offline machines has been solved several times: aptoncd and apt-zip are both excellent, safe, secure solutions.
I simply prefer it for control. I also have an offline machine. What methods would be good to maintain the entire repo and keep it portable? apache2?
Look at the apt-mirror package for mirroring all or part of the Ubuntu repositories across a network to your online server. (You said you did this part already) Look at the apt-zip package for installing and updating offline systems from whatever mirror you prefer. Neither requires Apache.
Last edited by ian-weisser; September 17th, 2016 at 12:44 PM.
So how do I make the system use the local repo?
Change a system's /etc/apt/sources.list to point to the new mirror. (You did this part already) Did you generate an index file like T.J. pointed out in post #2?
I type dpkg-scanpackages /mnt/hgfs/repo/mirror/archive.ubuntu.com/ubuntu so far it just seems to hang there. I don't know I can't seem to get this to work I don't know why it isn't working.
Originally Posted by T.J. Your repository is not configured properly. I'd check that you have your paths set up correctly. The terminal error is the result of not being able to retrieve the Packages index file inside of the repository. You need to generate this if you are hosting your own personal packages, or do a complete mirroring instead of a partial, if they are official packages. An easy way you can generate your own indexes is by installing the dpkg-dev package and using dpkg-scanpackages. However, all packages have to be signed with a valid signing key that you have on your keychain. Without it, you will get a security warning every single time. Also, just a comment, it looks in the screenshot as if you are using a Windows drive for storage. If that is the case, I recommend against it vigorously. Windows and NTFS do not respect UNIX file conventions. It can and will mangle files. For example, UNIX systems (like Linux) are case sensitive, Windows is not. If you must use a Windows machine, I recommend a drive image or a native EXT4 partition for storing the files from the mirror. The scanpackges didn't work for me I'm not sure why I typed dpkg-scanpackages /mnt/hgfs/repo/mirror/archive.ubuntu.com/ubuntu I'm not sure what to do here. Half the tutorials I find say to create a symbolic links with apache2 but that's just not working either
View Tag Cloud
Ubuntu Forums Code of Conduct