Tuesday, January 2, 2018
.::: How Settting & Install Package OS Centos 7 Using Repolocal, ISO File :::.
1. Make sure Iso file copying on Disk
[root@TeguhLab7 data]# ls
CentOS-7-x86_64-DVD-1708.iso lm_sensors-3.4.0-4.20160601gitf9185e5.el7.x86_64.rpm net-snmp-perl-5.7.2-28.el7.x86_64.rpm repolocal
compat-libstdc++-33-3.2.3-72.el7.i686.rpm lm_sensors-libs-3.4.0-4.20160601gitf9185e5.el7.x86_64.rpm psensor-1.1.3 snmpd
compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm lm sensor.txt psensor-1.1.3.tar.gz
[root@TeguhLab7 data]#
for repolocal
[root@Centos7 yum.repos.d]# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 27G 7.7G 19G 29% /
devtmpfs 2.9G 0 2.9G 0% /dev
tmpfs 2.9G 156K 2.9G 1% /dev/shm
tmpfs 2.9G 8.9M 2.9G 1% /run
tmpfs 2.9G 0 2.9G 0% /sys/fs/cgroup
/dev/sda1 497M 124M 373M 25% /boot
/dev/loop0 4.3G 4.3G 0 100% /mnt
/dev/sr0 4.1G 4.1G 0 100% /run/media/root/CentOS 7 x86_64
[root@Centos7 yum.repos.d]#
2. mounting to /mnt
[root@TeguhLab7 data]# mount -o loop CentOS-7-x86_64-DVD-1708.iso /mnt/
3. checking mounting mnt
[root@TeguhLab7 data]# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 27G 12G 15G 44% /
devtmpfs 4.8G 0 4.8G 0% /dev
tmpfs 4.9G 8.0K 4.9G 1% /dev/shm
tmpfs 4.9G 8.9M 4.8G 1% /run
tmpfs 4.9G 0 4.9G 0% /sys/fs/cgroup
/dev/sda1 497M 124M 373M 25% /boot
tmpfs 985M 32K 984M 1% /run/user/0
/dev/sr0 4.1G 4.1G 0 100% /cdrom
/dev/loop0 4.3G 4.3G 0 100% /mnt
[root@TeguhLab7 data]#
4. Backup Centos repo
[root@Centos7 data]# cd /etc/yum.repos.d/
[root@Centos7 yum.repos.d]# ls
CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Sources.repo CentOS-Vault.repo epel.repo epel-testing.repo
[root@Centos7 yum.repos.d]# mkdir tmp
[root@Centos7 yum.repos.d]# mv Cen* tmp/
[root@Centos7 yum.repos.d]# ls
tmp
[root@Centos7 yum.repos.d]# cd tmp/
[root@Centos7 tmp]# ls
CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Sources.repo CentOS-Vault.repo epel.repo epel-testing.repo
[root@Centos7 tmp]# cp CentOS-Base.repo /etc/yum.repos.d/
[root@Centos7 tmp]# cd ../
[root@Centos7 yum.repos.d]# ls
CentOS-Base.repo tmp
[root@Centos7 yum.repos.d]#
5. Setting Repolocal using iso and save
for iso file additional baseurl=file:///mnt
for DVD repolocal add baseurl=file:///run/media/root/"CentOS 7 x86_64"/
sample
[root@teguhlab yum.repos.d]# cat /etc/yum.repos.d/dvd.repo
[centos-dvd]
name=CentOS-$releasever - Base
baseurl=file:///mnt
#baseurl=file:///run/media/root/"CentOS 7 x86_64"/
enabled=1
gpgcheck=0
[root@teguhlab yum.repos.d]#
or
[root@TeguhLab7 data]# more /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
#baseurl=file:///run/media/root/"CentOS 7 x86_64"/
baseurl=file:///mnt
gpgcheck=0
enabled=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[root@TeguhLab7 data]#
6. Testing install package using DVD or Iso file
# yum install nmap
# yum install net-snmp net-snmp-libs net-snmp-utils net-snmp-perl net-snmp-python
# rpm -q net-snmp net-snmp-libs net-snmp-utils net-snmp-perl net-snmp-python
[root@TeguhLab7 yum.repos.d]# yum -y install nmap
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/3): base/group_gz | 156 kB 00:00:00
(2/3): base/primary_db | 3.1 MB 00:00:00
(3/3): extras/7/x86_64/primary_db | 145 kB 00:00:00
Loading mirror speeds from cached hostfile
* extras: centos.biz.net.id
* updates: centos.biz.net.id
Resolving Dependencies
--> Running transaction check
---> Package nmap.x86_64 2:6.40-7.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
nmap x86_64 2:6.40-7.el7 base 4.0 M
Transaction Summary
=============================================================================================================================
Install 1 Package
Total download size: 4.0 M
Installed size: 16 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 2:nmap-6.40-7.el7.x86_64 1/1
Verifying : 2:nmap-6.40-7.el7.x86_64 1/1
Installed:
nmap.x86_64 2:6.40-7.el7
Complete!
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Sertifikasi profesional, kadang hanya disebut dengan sertifikasi atau kualifikasi saja, adalah suatu penetapan yang diberikan oleh ...
-
SQL atau Structured Query Language) adalah sebuah bahasa yang digunakan untuk mengakses data dalam basis data relasional. Bahasa ini sec...
-
bagaimana cara mengubah hostid di Solaris The Hostid is a globally unique ID for a Sun Solaris Machine. Sometimes, you need to change t...
-
DNSPerf and ResPerf are free tools developed by Nominum that make it simple to gather accurate latency and throughput metrics for Domain ...
-
1. Check Host ID Solaris The Hostid is a globally unique ID for a Sun Solaris Machine. Sometimes, you need to change this hostid for ...
No comments:
Post a Comment