Apt-mirror. Copyright c Dr. Kent L. Miller. 2010-Jan-20



Similar documents
Apache and Virtual Hosts Exercises

RUGGEDCOM NMS for Linux v1.6

Net/FSE Installation Guide v1.0.1, 1/21/2008

What is a Package Management System?

IBM DB2 for Linux, UNIX, and Windows. Deploying IBM DB2 Express-C with PHP on Ubuntu Linux

Load Balancing/High Availability Configuration for neoninsight Server

Basic Linux & Package Management. Original slides from GTFO Security

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

The objective of this lab is to learn how to set up an environment for running distributed Hadoop applications.

Redmine Installation on Debian. v1.1

Partek Flow Installation Guide

EXPLORING LINUX KERNEL: THE EASY WAY!

OpenGeo Suite for Linux Release 3.0

Advantech AE Technical Share Document

Ubuntu Professional Training Course Overview (E-learning, Ubuntu LTS)

INF-110. GPFS Installation

Installing MooseFS 2.0 Step by Step Tutorial. Core Technology Development & Support Team

System administration basics

Table of Contents of the Debian GNU/Linux Administrator Handbook

HTTP-FUSE PS3 Linux: an internet boot framework with kboot

Rstudio Server on Amazon EC2

INUVIKA OVD INSTALLING INUVIKA OVD ON UBUNTU (TRUSTY TAHR)

Installation of PHP, MariaDB, and Apache

dotdefender v5.12 for Apache Installation Guide Applicure Web Application Firewall Applicure Technologies Ltd. 1 of 11 support@applicure.

OSM Tile Server. 1 Task Description & Background. Contents. (Version 2) <frederik.ramm@geofabrik.de>,

Installing QuickBooks Enterprise Solutions Database Manager On Different Linux Servers

Acronis Backup & Recovery 10 Server for Linux. Update 5. Installation Guide

GestióIP IPAM v3.0 IP address management software Installation Guide v0.1

NoMachine Enterprise Products, Cloud Server Installation and Configuration Guide

CSI Web Server for Linux Installation Guide 8/13

Installation & Upgrade Guide

How To Install Acronis Backup & Recovery 11.5 On A Linux Computer

Backing Up Your System With rsnapshot

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

Object Storage and Enterprise Repository Installation manual

insync Installation Guide

freeradius A High Performance, Open Source, Pluggable, Scalable (but somewhat complex) RADIUS Server Aurélien Geron, Wifirst, 7 janvier 2011

CA and SSL Certificates

Cassandra Installation over Ubuntu 1. Installing VMware player:

Zend Server 5.0 Reference Manual

HOW TO BUILD A VMWARE APPLIANCE: A CASE STUDY

EMC Avamar. Backup Clients User Guide. Version REV 02

Zend Server 5.6 Installation Guide

Partitioning. Files on the Hard Drive. Administration of Operating Systems DO2003. Partition = Binder with index. Write file = Insert document

SOLR INSTALLATION & CONFIGURATION GUIDE FOR USE IN THE NTER SYSTEM

NoMachine (free version) Installation Guide

A technical whitepaper describing steps to setup a Private Cloud using the Eucalyptus Private Cloud Software and Xen hypervisor.

AlphaServer Management Station

The Linux System. o Updating without touching the user's files and configurations.

OnCommand Performance Manager 1.1

2. Boot using the Debian Net Install cd and when prompted to continue type "linux26", this will load the 2.6 kernel

ARMSDK-VM Virtual Appliance A preconfigured Linux system

Installation Guide. Copyright (c) 2015 The OpenNMS Group, Inc. OpenNMS SNAPSHOT Last updated :19:20 EDT

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

IT Essentials II: Network Operating Systems v3.0 Scope and Sequence

Chapter 3. Hardware and software requirements

CDH 5 Quick Start Guide

QuickBooks Enterprise Solutions. Linux Database Server Manager Installation and Configuration Guide

A SHORT INTRODUCTION TO DUPLICITY WITH CLOUD OBJECT STORAGE. Version

DS License Server V6R2013x

Installing IBM Websphere Application Server 7 and 8 on OS4 Enterprise Linux

Best Practices in Hardening Apache Services under Linux

PrimeRail Installation Notes Version A June 9,

Installing MooseFS Step by Step Tutorial

How to Install and Run Tibia on Linux Using Wine without Windows Contents

Practical Applications of Virtualization. Mike Phillips IAP 2008 SIPB IAP Series

Installing a Symantec Backup Exec Agent on a SnapScale Cluster X2 Node or SnapServer DX1 or DX2. Summary

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

Quick Start Guide. Quick Start Guide. taskit GmbH. for Portux920T EU / SW Portux Mini-PC Portux Panel-PC Panel-Card MoLUX Stamp

Linux System Administration on Red Hat

Siebel Installation Guide for UNIX. Siebel Innovation Pack 2013 Version 8.1/8.2, Rev. A April 2014

The BackTrack Successor

EMC Celerra Version 5.6 Technical Primer: Control Station Password Complexity Policy Technology Concepts and Business Considerations

opensuse.org Build Service

Linux FTP Server Setup

D5.4.4 Integrated SemaGrow Stack API components

SECURE Web Gateway. HTTPS/SSL Technical FAQ. Version 1.1. Date 04/10/12

ESX 4 Patch Management Guide ESX 4.0

netkit lab web server and browser 1.2 Giuseppe Di Battista, Maurizio Patrignani, Massimo Rimondini Version Author(s)

Raspberry Pi Webserver

Operating Systems Networking for Home and Small Businesses Chapter 2

EMC DOCUMENTUM xplore 1.1 DISASTER RECOVERY USING EMC NETWORKER

Linux Overview. The Senator Patrick Leahy Center for Digital Investigation. Champlain College. Written by: Josh Lowery

CCM 4350 Week 11. Security Architecture and Engineering. Guest Lecturer: Mr Louis Slabbert School of Science and Technology.

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.3 Web Applications Deployed on Oracle WebLogic Server

Type-C Ubuntu Product & Strategy Canonical Ltd.

TransNav Management System Documentation. Management Server Guide

VMware vsphere Data Protection Advanced 5.5

Of Penguins and Wildebeest. Anthony Rodgers VA7IRL

SQL Injection. Blossom Hands-on exercises for computer forensics and security

Transcription:

Apt-mirror Copyright c Dr. Kent L. Miller 2010-Jan-20

Table of Contents Page Introduction 3 1. Debian 1.1 Packages 4 1.2 Package Life Cycle 5 1.2 Package Management 6 1.3 User Interface 7 1.4 apt-mirror 8 2. Mirror Setup 2.1 Hardware 9 2.2 Software packages 10 2.3 /etc/apt/mirror.list 11 1

Table of Contents Page 2.4 /var/spool/apt-mirror 12 2.5 /root/makefile 17 2.6 /etc/cron.d/apt-mirror 18 2.7 /var/www/* 19 2.8 /etc/init.d/apache2 20 2.9 /etc/apt/sources.list 21 3. Client Setup 3.1 Software packages 22 3.2 /etc/apt/sources.list 23 3.3 /root/makefile 24 2

Introduction Apt-mirror is part of the Advanced Package Tools (APT). Aptmirror permits your PC or laptop to serve as a Debian mirror. 1993 Ian Murdok starts Debian Linux Release while at Purdue Univ. 1997 dselect replacement project started codename Diety 1998 apt-get very well received original UI effort abandoned 3

1. Debian 1.1 Packages Packages (.deb) contain: metadata (name, description, version, dependencies, hash, etc.) software (source or binary). Packages (over 20,000) are organized into a central repository mirrored by hundreds of systems around the world. 4

1. Debian 1.2 Package Life Cycle 5

1. Debain 1.3 Package Management dpkg is the low-level tool that can: install, remove, and provide metadata for individual packages. libapt is a library of high-level tools that can: connect to a variety of local and remote repositories, seach for new packages, upgrade packages, or even an entire Debian release, automatically install and remove dependencies, topologically sort dependencies, then call dpkg in optimal sequence. 6

1. Debian 1.4 User Interface apt-get is a CLI that calls libapt (apt-cache, apt-cdrom, apt-zip, etc., also call libapt). aptitude is a high-level text-based UI (alternative to dselect). Several GUI alternatives also exist (synaptic, kpackage). 7

1. Debian 1.5 apt-mirror Connects to a variety of repositories (via aptlib). Allows user to copy: selected repositories (ftp.us.debian.org, security.debian.org) selected architectures (i386, amd64, alpha, sparc, arm, powerpc, hppa, ia64, mips, mipsel, s390) selected debian releases (lenny, etch, etc.) 8

2.1 Hardware Install HDD Use minimum 250GB. Partition HDD Recommend 40GB /var partition. Do not mirror every architecture, because most people need only i386 and amd64. Mirroring these two occupies a little over 30GB. 9

2.2 Software Packages Install Debian Recommend clean install Priority Required packages dpkg - Debian package management system Priority Important packages apt - Advanced front-end for dpkg aptitude - Terminal based package manager Install mirror Priority Optional packages apt-mirror - APT sources mirroring tool apache2 - Apache HTTP Server metapackage 10

2.3 /var/spool/apt-mirror Put repository in recommended directory # mkdir /var/spool/apt-mirror # chown apt-mirror:apt-mirror /var/spool/apt-mirror Note that apt-mirror names both a user and a group: # cat /etc/passwd grep apt-mirror apt-mirror:x:108:114::/var/spool/apt-mirror:/bin/sh # cat /etc/group grep apt-mirror apt-mirror:x:114: 11

2.4 /etc/apt/mirror.list # apt-mirror configuration file ## ## The default configuration options (uncomment and change to override) ## set base_path /var/spool/apt-mirror set mirror_path $base_path/mirror set skel_path $base_path/skel set var_path $base_path/var set defaultarch amd64 set nthreads 20 set _tilde 0 12

2.4 /etc/apt/mirror.list (cont.) ## ## Sources ## # Distribution # +--architectures [amd64 (default), and i386] deb http://ftp.us.debian.org/debian lenny main contrib non-free deb-i386 http://ftp.us.debian.org/debian lenny main contrib non-free #deb-src http://ftp.us.debian.org/debian lenny main contrib non-free # +--debian installer deb http://ftp.us.debian.org/debian lenny main/debian-installer deb-i386 http://ftp.us.debian.org/debian lenny main/debian-installer 13

2.4 /etc/apt/mirror.list (cont.) # +--security updates deb http://security.debian.org/debian-security lenny/updates main con deb-i386 http://security.debian.org/debian-security lenny/updates main con #deb-src http://security.debian.org/debian-security lenny/updates main con # +--backports deb http://www.backports.org/debian lenny-backports main contrib nondeb-i386 http://www.backports.org/debian lenny-backports main contrib non- #deb-src http://www.backports.org/debian lenny-backports main contrib non- # +--moblock deb http://moblock-deb.sourceforge.net/debian lenny main deb-i386 http://moblock-deb.sourceforge.net/debian lenny main #deb-src http://moblock-deb.sourceforge.net/debian lenny main 14

2.4 /etc/apt/mirror.list (cont.) ## ## Cleaner configuration ## set cleanscript $var_path/clean.sh # Cleaning section # +--Remove files missing in up-to-date indexes clean http://ftp.us.debian.org/ clean http://security.debian.org/ clean http://www.backports.org/ clean http://moblock-deb.sourceforge.net/ 15

2.4 /etc/apt/mirror.list (cont.) # +--Exclude directories not managed by apt or apt-mirror skip-clean http://ftp.us.debian.org/doc/ skip-clean http://ftp.us.debian.org/tools/ skip-clean http://ftp.us.debian.org/debian-cd/ skip-clean http://ftp.us.debian.org/debian-minicd/ skip-clean http://ftp.us.debian.org/debian/dists/lenny/main/installer-i38 skip-clean http://ftp.us.debian.org/debian/doc/ skip-clean http://ftp.us.debian.org/debian/tools/ skip-clean http://ftp.us.debian.org/debian/project/ skip-clean http://ftp.us.debian.org/debian-non-us/project/ 16

2.5 /root/makefile For manual operations, recommend following Makefile: apt-mirror: # Synchronize local repository from remote repositories su - apt-mirror -c apt-mirror /var/spool/apt-mirror/var/clean.sh upgrade: mount -o remount,rw /usr /etc/init.d/apache2 start aptitude update # Install newest versions of packages from sources aptitude safe-upgrade /etc/init.d/apache2 stop mount -o remount,ro /usr 17

2.6 /etc/cron.d/apt-mirror For automatic operations, recommend following Cron Job: # Regular cron jobs for the apt-mirror package # m h dom mon dow user command 0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log && /var/spool/apt-mirror/var/clean.sh > /var/spool/apt-mirror/var/cron.log 18

2.7 /var/www/* Prepare web mirror by setting soft links to local repositories # cd /var/www # ls -l lrwxrwxrwx 1 root root 54 2008-10-05 19:10 debian -> /var/spool/apt-mirror/mirror/ftp.us.debian.org/debian/ lrwxrwxrwx 1 root root 54 2008-10-05 19:10 debian-backports -> /var/spool/apt-mirror/mirror/www.backports.org/debian/ lrwxrwxrwx 1 root root 64 2008-10-05 19:10 debian-moblock -> /var/spool/apt-mirror/mirror/moblock-deb.sourceforge.net/debian/ lrwxrwxrwx 1 root root 65 2008-10-05 19:10 debian-security -> /var/spool/apt-mirror/mirror/security.debian.org/debian-security/ 19

2.8 /etc/init.d/apache2 To let others use your mirror, you will need a web server. Start web server by typing: # /etc/init.d/apache2 start Whenever services are not needed for an extended period of time, stop them for security reasons. # /etc/init.d/apache2 stop 20

2.9 /etc/apt/sources.list Initially sources.list points to the CDROM or network repository from which you installed. Test your mirror by pointing sources.list to the mirror. deb http://localhost/debian lenny main contrib non-free deb http://localhost/debian-security lenny/updates main contrib non-free deb http://localhost/debian-moblock lenny main and then type # su - apt-mirror -c apt-mirror # /var/spool/apt-mirror/var/clean.sh # /etc/init.d/apache2 start # aptitude update # /etc/init.d/apache2 stop 21

3. Client Setup 3.1 Software Packages Install Debian Recommend clean install Priority Required packages dpkg - Debian package management system Priority Important packages apt - Advanced front-end for dpkg aptitude - Terminal based package manager 22

3. Client Setup 3.2 /etc/apt/sources.list Point client to your new local mirror deb http://<mirror>/debian lenny main contrib non-free deb http://<mirror>/debian-security lenny/updates main contrib non-free deb http://<mirror>/debian-moblock lenny main 23

3. Client Setup 3.3 /root/makefile For manual operation, recommend following Makefile upgrade: mount -o remount,rw /usr # Synchronize package index files from sources aptitude update # Install newest versions of packages from sources aptitude safe-upgrade mount -o remount,ro /usr 24