User Tools

Site Tools


linux:local_repo_debian

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:local_repo_debian [2016/11/25 12:24]
admin
linux:local_repo_debian [2016/11/25 13:15] (current)
admin
Line 11: Line 11:
 apt-get install build-essential apt-get install build-essential
 </​code>​ </​code>​
- 
  
 ===== Install Apache ===== ===== Install Apache =====
Line 22: Line 21:
 </​code>​ </​code>​
  
-To test if Apache is working, open up your web browser and navigate to: http://localhost+To test if Apache is working, open up your web browser and navigate to: http://192.168.1.150
  
 You should see the following output: You should see the following output:
 +
 +{{ :​linux:​apache2-debian-default-page-it-works-google-chrome_0011.jpg?​nolink |}}
  
 ===== Create A directory to store all packages ===== ===== Create A directory to store all packages =====
Line 60: Line 61:
 To verify the files, navigate to http://​192.168.1.150/​packages/​amd64/​ from your browser. You will see all packages of your Debian DVD’s. Here 192.168.1.150 is my Debian 8 server’s IP address. To verify the files, navigate to http://​192.168.1.150/​packages/​amd64/​ from your browser. You will see all packages of your Debian DVD’s. Here 192.168.1.150 is my Debian 8 server’s IP address.
  
-Index of -packages-amd64 - Google Chrome_002+{{ :​linux:​index-of-packages-amd64-google-chrome_002.jpg?​nolink |}}
  
 ===== Create Catalog file ===== ===== Create Catalog file =====
Line 79: Line 80:
 <code bash> <code bash>
 pkg-scanpackages:​ warning: Packages in archive but missing from override file: pkg-scanpackages:​ warning: Packages in archive but missing from override file:
-dpkg-scanpackages:​ warning: accountsservice acl acpi acpi-support-base acpid adduser adwaita-icon-theme apache2-bin apg apt apt-listchanges apt-offline apt-utils aptitude aptitude-common aptitude-doc-en aspell aspell-en at at-spi2-core avahi-daemon+dpkg-scanpackages:​ warning: accountsservice acl acpi acpi-support-base acpid  
 +adduser adwaita-icon-theme apache2-bin apg apt apt-listchanges apt-offline ​ 
 +apt-utils aptitude aptitude-common aptitude-doc-en aspell aspell-en at  
 +at-spi2-core avahi-daemon
  
 [...] [...]
  
-xserver-xorg-video-neomagic xserver-xorg-video-nouveau xserver-xorg-video-openchrome xserver-xorg-video-r128 xserver-xorg-video-radeon xserver-xorg-video-savage xserver-xorg-video-siliconmotion xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-trident xserver-xorg-video-vesa xserver-xorg-video-vmware xterm xwayland xz-utils yelp yelp-xsl zenity zenity-common zlib1g+xserver-xorg-video-neomagic xserver-xorg-video-nouveau xserver-xorg-video-openchrome ​ 
 +xserver-xorg-video-r128 xserver-xorg-video-radeon xserver-xorg-video-savage ​ 
 +xserver-xorg-video-siliconmotion xserver-xorg-video-sisusb xserver-xorg-video-tdfx ​ 
 +xserver-xorg-video-trident xserver-xorg-video-vesa xserver-xorg-video-vmware xterm  
 +xwayland xz-utils yelp yelp-xsl zenity zenity-common zlib1g
  
-dpkg-scanpackages:​ info: Wrote 1151 entries to output Packages file.+**dpkg-scanpackages:​ info: Wrote 1151 entries to output Packages file.**
 </​code>​ </​code>​
 Please note that whenever you add a new deb file in this repository, you should run the above command to create catalog file. Please note that whenever you add a new deb file in this repository, you should run the above command to create catalog file.
Line 106: Line 114:
 cat /​etc/​apt/​sources.list cat /​etc/​apt/​sources.list
 </​code>​ </​code>​
 +
 +==== Sample output: ====
 +
 +<code bash>
 +
 +
 +# deb cdrom:​[Debian GNU/Linux 8.0.0 _Jessie_ - Official amd64 CD Binary-1 20150425-12:​54]/​ jessie main
 +
 +#deb cdrom:​[Debian GNU/Linux 8.0.0 _Jessie_ - Official amd64 CD Binary-1 20150425-12:​54]/​ jessie main
 +
 +#deb http://​mirror.cse.iitk.ac.in/​debian/​ jessie main
 +#deb-src http://​mirror.cse.iitk.ac.in/​debian/​ jessie main
 +
 +#deb http://​security.debian.org/​ jessie/​updates main
 +#deb-src http://​security.debian.org/​ jessie/​updates main
 +
 +# jessie-updates,​ previously known as '​volatile'​
 +#deb http://​mirror.cse.iitk.ac.in/​debian/​ jessie-updates main
 +#deb-src http://​mirror.cse.iitk.ac.in/​debian/​ jessie-updates main
 +
 +#deb http://​security.debian.org/​ jessie/​updates main contrib non-free
 +#deb-src http://​security.debian.org/​ jessie/​updates main contrib non-free
 +#deb http://​http.us.debian.org/​debian jessie main contrib non-free
 +
 +deb file:/​var/​www/​html/​packages/​amd64/​ /
 +</​code>​
 +Please note that I have disabled all external repository list in the above file except the local repository. Now update source list with following command:
 +
 +<code bash>
 +apt-get update
 +</​code>​
 +
 +===== Testing Repository =====
 +
 +I am going to install vsftpd package from my local repository.
 +<code bash>
 +apt-get install vsftpd
 +</​code>​
 +Sample output:
 +
 +<code bash>
 +Reading package lists... Done
 +Building dependency tree       
 +Reading state information... Done
 +The following NEW packages will be installed:
 +  vsftpd
 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
 +Need to get 0 B/165 kB of archives.
 +After this operation, 374 kB of additional disk space will be used.
 +WARNING: The following packages cannot be authenticated!
 +  vsftpd
 +Install these packages without verification [y/N]? y
 +Preconfiguring packages ...
 +Selecting previously unselected package vsftpd.
 +(Reading database ... 40161 files and directories currently installed.)
 +Unpacking vsftpd (from .../​amd64/​./​vsftpd_3.0.2-18_amd64.deb) ...
 +Processing triggers for man-db ...
 +Setting up vsftpd (3.0.2-18) ... 
 +Starting FTP server: vsftpd.
 +</​code>​
 +As you seen in the above output, i will able to install vsftpd package from my local repository.
 +
 +===== Configure Clients =====
 +
 +After creating the catalog file, go to your client systems. Open /​etc/​apt/​sources.list file.
 +<code bash>
 +sudo nano /​etc/​apt/​sources.list
 +</​code>​
 +Add the server repository location as shown below. Comment out all sources list except the local repository.
 +<code bash>
 +deb http://​192.168.1.150/​packages/​amd64/​ /
 +</​code>​
 +For 32 bit systems:
 +<code bash>
 +deb http://​192.168.1.150/​packages/​i386/​ /
 +</​code>​
 +Note: Put a space between deb and http://​192.168.1.150/​packages/​amd64/​ and /.
 +
 +That’s it. Now run,
 +
 +<code bash>
 +sudo apt-get update
 +sudo apt-get install <​package-name>​
 +</​code>​
 +You will be able to install, update and upgrade packages from your local Debian server repository without Internet Connection.
 +
 +That’s all for now. Cheers!
  
linux/local_repo_debian.1480073063.txt.gz · Last modified: 2016/11/25 12:24 by admin