# Install apt server
#
Step 1, install apt rpm (*install httpd for using web access on apt)
- from Redhat disc
i.e. rpm -Uvh apt-0.5.5cnc6-fr1
Step 2, setup RPM folders for os and updates
i.e. mkdir -p /var/www/html/apt/redhat
mkdir /var/www/html/apt/redhat/9
mkdir /var/www/html/apt/redhat/9/RPMS.os
mkdir /var/www/html/apt/redhat/9/RPMS.updates
copy redhat disc RPMS to RPMS.os
copy patch updates to RPMS.updates
Step 3, generate base folder for apt
i.e. genbasedir /var/www/html/apt/redhat/9 os updates
Step 4, start web server
Step 5, [Client side] EDIT /etc/apt/source.list
(ADD) rpm http://
Usage :
Update rpm package list : apt-get update
Install package : apt-get install
Upgrade all package to newest version : apt-get upgrade
=======================================================
#
# Yum install (* under FC4)
#
Step 1 : install yum rpm
- from FC4 disc
i.e. rpm -Uvh yum-2.3.2-7.rpm
Step 2 : install createrepo
- from FC4 disc
i.e. rpm -Uvh createrepo-0.4.2-2.noarch.rpm
Step 3 : setup RPM folders for base and update
i.e. mkdir -p /var/www/html/yum/fc4
mkdir /var/www/html/yum/fc4/base
mkdir /var/www/html/yum/fc4/update
cp fc4 disc RPMS to base
cp fc4 patch updates to update
Step 4 : import GPG key (both server and client)
i.e. rpm --import /usr/share/rhn/RPM-GPG-KEY
rpm --import /usr/share/rhn/BETA-RPM-GPG-KEY
rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora
rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora-test
Step 5 : generate rpms header folder
i.e. yum-arch /var/www/html/yum/fc4/base
yum-arch /var/www/html/yum/fc4/update
Step 4 : setup repositories
i.e. createrepo /var/www/html/yum/base
createrepo /var/www/html/yum/update
Step 5 : setup repositories entry (both server and client side)
clear old .repo files(rm /etc/yum.repos.d/*.repo)
ADD new file for yum server -
/etc/yum.repos.d/fc4.repo
---------------------------------------------
[fc4-base]
name=fc4 - base
baseurl=http://YUM_SERVER/yum/fc4/base
enabled=1
[fc4-update]
name=fc4 - update
baseurl=http://YUM_SERVER/yum/fc4/update
enabled=1
---------------------------------------------
Step 6 : start web server
Usage :
Install package : yum install
Update package : yum update
Upgrade all package to newest version : yum -y update
Clean downloaded packages : yum clean packages
沒有留言:
張貼留言