Monday, July 16, 2007
Linux Local Yum Repository
Create the directories to be used:
mkdir -pv /var/www/html/centos/5/{base,updates}
Populate the base repository by copying all the rpms from the CDs/DVD.
Check if createrepo is installed:
rpm -qa | grep createrepo
If not, then:
yum -y install createrepo
Then issue the following command to create the headers:
createrepo /var/www/html/centos/5/base
To populate the updates, you may have to choose the nearest mirror to rsync. Issue to following command to sync with your chosen mirror:
rsync -avrt rsync://ftp.iij.ad.jp/centos/packages/centos/5.0/updates/i386 \ --exclude=debug/ /var/www/html/centos/5/updates
Order some pizza and buy a six pack :)
Set the local machines to get their updates from your local repo:
vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://10.2.*.*/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://10.2.*.*/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
mkdir -pv /var/www/html/centos/5/{base,updates}
Populate the base repository by copying all the rpms from the CDs/DVD.
Check if createrepo is installed:
rpm -qa | grep createrepo
If not, then:
yum -y install createrepo
Then issue the following command to create the headers:
createrepo /var/www/html/centos/5/base
To populate the updates, you may have to choose the nearest mirror to rsync. Issue to following command to sync with your chosen mirror:
rsync -avrt rsync://ftp.iij.ad.jp/centos/packages/centos/5.0/updates/i386 \ --exclude=debug/ /var/www/html/centos/5/updates
Order some pizza and buy a six pack :)
Set the local machines to get their updates from your local repo:
vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://10.2.*.*/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://10.2.*.*/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
Labels: Linux, Local Set-up, Yum
Sunday, July 15, 2007
Linux LVM -- Adding New Volume
# fdisk /dev/sdb
Create the the necessary partitions. (e.g. /dev/sdb1)
Format the new partition
# mkfs.ext3 /dev/sdb1
Label the new formatted partition
# e2label /dev/sdb1 New_name_here
Initialize the creation of a new volume
# pvcreate /dev/sdb1
Join /dev/sdb1 on a new volume
# vgcreate VolGroup01 /dev/sdb1
# vgchange -ay VolGroup01
# vgdisplay VolGroup01 | grep "Total PE"
Use the output of Total PE (e.g. 8677)
# lvcreate 8677 -n LogVol01 VolGroup01
# mkfs.ext3 /dev/VolGroup01/LogVol00
Change or add an entry in /etc/fstab
# vi /etc/fstab
Add the following:
/dev/VolGroup01/LogVol00 /home/USERS ext3 defaults 1 1
Save and quit :wq
# mount /home/USERS
That's it!
Create the the necessary partitions. (e.g. /dev/sdb1)
Format the new partition
# mkfs.ext3 /dev/sdb1
Label the new formatted partition
# e2label /dev/sdb1 New_name_here
Initialize the creation of a new volume
# pvcreate /dev/sdb1
Join /dev/sdb1 on a new volume
# vgcreate VolGroup01 /dev/sdb1
# vgchange -ay VolGroup01
# vgdisplay VolGroup01 | grep "Total PE"
Use the output of Total PE (e.g. 8677)
# lvcreate 8677 -n LogVol01 VolGroup01
# mkfs.ext3 /dev/VolGroup01/LogVol00
Change or add an entry in /etc/fstab
# vi /etc/fstab
Add the following:
/dev/VolGroup01/LogVol00 /home/USERS ext3 defaults 1 1
Save and quit :wq
# mount /home/USERS
That's it!
Wednesday, July 11, 2007
KSC Glock 26C Mini Review
The 26C is a fictional mod for Glock 26 (the full auto function). A nice gun to hold and behold. As always, Glocks have that ergonomic design for the grips.
Easy to handle even for my fairly large hands. Using green gas, I was able to puncture the bottom of a soda can in 3 shots.
At 12 feet away, below is the result (I'm a lousy shooter).
I don't usually use the full auto function as I'm using a stronger gas. This pistol is a perfect back-up for my Steyr AUG.
Labels: Airsoft, Glock 266, KSC, Steyr Aug