Search My Techie Guy

Showing posts with label open suse. Show all posts
Showing posts with label open suse. Show all posts

Thursday, February 17, 2022

How to add ISO image to your linux repositories and use it to install basic software packages

Summary:

In this post, we are going to briefly see how you can add your Linux ISO image to the repository and use this to install basic software packages. We shall use an example of installing VSFTPD package used for SFTP service. 
This example was carried out on openSUSE Leap 15.0

Problem or Goal: 

This technique is mostly used when you are working with a new installation and you don't have access to the internet which would otherwise allow you to enable and install packages from online Linux repositories (repos).

Cause: 

Working on new Linux installation with no access to the internet (online repos)

Solution: 

1. Use the command below to check which repos are currently configured for your new installation, at this point you should have no repos enabled. 

# zypper lr -E

2. Use a flash disk to transfer the ISO image file to your new installation and copy it under the /tmp directory. 

3. Use the command below to add the ISO image to the repo

# zypper ar -c -t yast2 "iso:///?iso=\ /tmp/Put_The_ISO_Image_File_Name_Here.iso" "The_Alias_Name_Here"

4. Use the command below to check whether the repo is added successfully. 

# zypper lr -E

5. Use the command below to install the software package:

# zypper -n in vsftpd

Problem Solved?

Yes, with this technique, you can install the basic software packages that come with the ISO image and when you get access to the internet, you can add online repos and install more packages.

Wednesday, February 10, 2016

Bash: snmpwalk: command not found - Linux OpenSUSE 13.2

Problem:

Server1:~ # snmpwalk
-bash: snmpwalk: command not found

Solution:

Install net-snmp using zypper install

Server1:~ # zypper install net-snmp
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 6 NEW packages are going to be installed:
  libsensors4 libsnmp30 net-snmp perl-SNMP perl-Term-ReadKey snmp-mibs 

6 new packages to install.
Overall download size: 1.7 MiB. Already cached: 0 B  After the operation, additional 6.9 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package perl-Term-ReadKey-2.32-2.1.5.x86_64                                                                                                                      (1/6),  28.8 KiB ( 62.4 KiB unpacked)
Retrieving: perl-Term-ReadKey-2.32-2.1.5.x86_64.rpm ...........................................................................................................................................[done (5.8 KiB/s)]
Retrieving package libsensors4-3.3.5-3.3.1.x86_64                                                                                                                           (2/6),  51.4 KiB (100.7 KiB unpacked)
Retrieving: libsensors4-3.3.5-3.3.1.x86_64.rpm ............................................................................................................................................................[done]
Retrieving package snmp-mibs-5.7.3-3.1.x86_64                                                                                                                               (3/6), 245.9 KiB (  1.6 MiB unpacked)
Retrieving: snmp-mibs-5.7.3-3.1.x86_64.rpm ...................................................................................................................................................[done (96.0 KiB/s)]
Retrieving package libsnmp30-5.7.3-3.1.x86_64                                                                                                                               (4/6), 853.0 KiB (  3.4 MiB unpacked)
Retrieving: libsnmp30-5.7.3-3.1.x86_64.rpm ..................................................................................................................................................[done (657.1 KiB/s)]
Retrieving package perl-SNMP-5.7.3-3.1.x86_64                                                                                                                               (5/6), 124.5 KiB (424.4 KiB unpacked)
Retrieving: perl-SNMP-5.7.3-3.1.x86_64.rpm ................................................................................................................................................................[done]
Retrieving package net-snmp-5.7.3-3.1.x86_64                                                                                                                                (6/6), 435.2 KiB (  1.3 MiB unpacked)
Retrieving: net-snmp-5.7.3-3.1.x86_64.rpm ...................................................................................................................................................[done (343.3 KiB/s)]
Checking for file conflicts: ..............................................................................................................................................................................[done]
(1/6) Installing: perl-Term-ReadKey-2.32-2.1.5 ............................................................................................................................................................[done]
(2/6) Installing: libsensors4-3.3.5-3.3.1 .................................................................................................................................................................[done]
(3/6) Installing: snmp-mibs-5.7.3-3.1 .....................................................................................................................................................................[done]
(4/6) Installing: libsnmp30-5.7.3-3.1 .....................................................................................................................................................................[done]
(5/6) Installing: perl-SNMP-5.7.3-3.1 .....................................................................................................................................................................[done]
(6/6) Installing: net-snmp-5.7.3-3.1 ......................................................................................................................................................................[done]
Additional rpm output:
Updating /etc/sysconfig/net-snmp...

Server1:~ # snmpwalk
Created directory: /var/lib/net-snmp/mib_indexes
No hostname specified.
USAGE: snmpwalk [OPTIONS] AGENT [OID]

  Version:  5.7.3.pre5
  Web:      http://www.net-snmp.org/
  Email:    net-snmp-coders@lists.sourceforge.net

Adding Static DNS - LINUX OpenSUSE 13.2 error "ping:unknown host yahoo.com"


Problem:

Ping a domain name for example yahoo.com from the CLI and it returns the message below:

Server1:~ # ping yahoo.com
ping: unknown host yahoo.com


Server1:~ # cat /etc/*release
openSUSE 13.2 (x86_64)
VERSION = 13.2
CODENAME = Harlequin
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
NAME=openSUSE
VERSION="13.2 (Harlequin)"
VERSION_ID="13.2"
PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:13.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"

ID_LIKE="suse"

Solution:

This means that my server has no DNS set to resolve host names!

1. open YAST

Server1:~ # yast



2. Use up/down arrow keys to select "Network Devices"
3. Use right arrow key to select "Network Settings" and press Enter Key
4. Hit the "Tab" key once to highlight "Overview" on the top menu

5. Now use the right arrow key on your keyboard to select "Hostname/DNS"
6. Use the TAB key to navigate through and modify the DNS config according to your DNS servers for your network.

7. Use TAB to navigate to "OK" and hit Enter
8. Quit
9. Now test again:

Server1:~ # ping yahoo.com
PING yahoo.com (206.190.36.45) 56(84) bytes of data.
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=1 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=2 ttl=45 time=345 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=3 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=4 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=5 ttl=45 time=344 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=6 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=7 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=8 ttl=45 time=345 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=9 ttl=45 time=343 ms

Cheers :-)