anything, everything, nothing...

ycChew

May 29, 2009

Setup local mirror for Debian softwares repository

Filed under: Installation — ycchew @ 11:44 AM |

To save network bandwidth, we want to setup a local Debian software repository so that all local Debian hosts can update software via local network. The following steps show our approach using apt-mirror.

Install apt-mirror

apt-get install apt-mirror

Edit apt-mirror configuration file

vi /etc/apt/mirror.list

set nthreads 20
set _tilde 0
deb http://ftp.jp.debian.org/debian lenny main contrib non-free
deb-src http://ftp.jp.debian.org/debian lenny main contrib non-free
# indicate which can be clean to free local disk space
clean http://ftp.jp.debian.org/debian

Perform the mirroring

apt-mirror /etc/apt/mirror.list

After apt-mirror download all packages from remote server, we can run the clean up script to free some disk space

/bin/bash /var/spool/apt-mirror/var/clean.sh

We want to make apt-mirror automatically update new changes from remote server

vi /etc/cron.d/apt-mirror

#
# Regular cron jobs for the apt-mirror package
#
0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log

To make our local mirror accessable via HTTP

ln -s /var/spool/apt-mirror/mirror/ftp.jp.debian.org/debian /var/www/debian

Now, change local workstation software souce to use local mirror

vi /etc/apt/sources.list

# use our own local repository for lenny
deb http://192.168.1.1/debian/ lenny main contrib non-free
deb-src http://192.168.1.1/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib

If you encounter fetch package error while apt-get update on client, make sure there is no proxy setting in /etc/apt/apt.conf

On some clients, we recieved the following error,

W: GPG error: http://192.168.1.1 lenny Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems

You can either solve this problem by adding the missing key into your keyring,

gpg --keyserver hkp://subkeys.pgp.net --recv-key 9AA38DCD55BE302B

gpg --export --armor F120156012B83718 | sudo apt-key add -

Or ignor the warning and force apt-get to upgrade,

apt-get -y --force-yes upgrade

• • •
 

May 13, 2009

Getting started on GII's Blog

Filed under: Guide — ycchew @ 10:54 AM |

For Blog Admin,

Upgrade Blog software when needed.

Backup Blog database regularly. Restore when needed.

Create new Member account and Blog when needed. Remember to get special note from previous Admin.

Disable Member accounts for staff and student already left.

Manage spam and tighthen security for Blog.

Update system file and general message for Blog.

 

For new user,

1. Register a blog account with Blog Admin. Admin need at least your full name and your desire username to create a new blog.

2. Login to GII blog and star sharing information.

3. Some helps on getting started on blogging.

• • •