0% found this document useful (0 votes)
17 views4 pages

ORACLE LINUX 7X - Configuration

This document provides a step-by-step guide for installing and configuring the SNMP server on Oracle Linux 7.x. It includes instructions for checking if SNMP is installed, starting the SNMP service, configuring the SNMP daemon, and ensuring the necessary firewall ports are open. Finally, it advises restarting the SNMP service and testing it with Solarwinds.

Uploaded by

thuongtm0803
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

ORACLE LINUX 7X - Configuration

This document provides a step-by-step guide for installing and configuring the SNMP server on Oracle Linux 7.x. It includes instructions for checking if SNMP is installed, starting the SNMP service, configuring the SNMP daemon, and ensuring the necessary firewall ports are open. Finally, it advises restarting the SNMP service and testing it with Solarwinds.

Uploaded by

thuongtm0803
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

ORACLE LINUX 7X

Step # 1 : Make sure snmp server installed

Run rpm commands query option to find out snmp server installed or not:

# rpm -qa | grep snmp

[root@CentOS7 ~]# rpm -qa | grep snmp

net-snmp-libs-5.7.2-37.el7.x86_64

net-snmp-agent-libs-5.7.2-37.el7.x86_64

net-snmp-utils-5.7.2-37.el7.x86_64

net-snmp-5.7.2-37.el7.x86_64

If snmp is installed then please refer step # 2; otherwise snmp server and utils were not present and
your need to

install them using following steps (login as a root user):

(a) Visit rpmfind.net to get snmp server and utilities rpms. If you are fedora user then use yum command
as follows to

install it:

[root@jiradevdb u01]# rpm -ivh net-snmp-agent-libs-5.7.2-37.el7.x86_64.rpm

[root@jiradevdb u01]# rpm -ivh net-snmp-5.7.2-37.el7.x86_64.rpm

[root@jiradevdb u01]# rpm -ivh net-snmp-libs-5.7.2-37.el7.x86_64.rpm

[root@jiradevdb u01]# rpm -ivh net-snmp-utils-5.7.2-37.el7.x86_64.rpm

(b) If you are RHEL subscriber then use up2date command as follows to install:

#up2date -v -i net-snmp-utils net-snmp

Step # 2 : Determine if snmp server is running or not

Run 'ps' command to see if snmp server is running or not:

# ps -aux | grep snmp

Output:

[root@jiradevdb u01]# ps -aux | grep snmp

root 10588 0.0 0.4 389488 34224 pts/1 T 10:06 0:00 /usr/bin/python /bin/yum -y install net-
snmp net-snmp-utils

root 15962 0.0 0.2 227864 15952 ? Ss 14:13 0:03 /usr/sbin/snmpd -LS0-6d -f
root 20982 0.0 0.4 389488 34268 pts/1 T 10:42 0:00 /usr/bin/python /bin/yum localinstall rpm
net-snmp-5.7.2-49.el7_9.2.src.rpm

root 28379 0.0 0.5 473412 39728 pts/1 T 11:08 0:00 /usr/bin/python /bin/yum localinstall net-
snmp-utils-5.7.2-37.el7.x86_64.rpm

root 53172 0.0 0.0 112724 2320 pts/1 S+ 16:17 0:00 grep --color=auto snmp

Alternatively, you can try any of the following two commands as well:

# lsof -i :199

Output:

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

snmpd 5512 root 4u IPv4 34432 TCP *:smux (LISTEN)

OR try out netstat command:

# netstat -natv | grep ':199'

Output:

[root@jiradevdb u01]# netstat -natv | grep ':199'

tcp 0 0 127.0.0.1:199 0.0.0.0:* LISTEN OR try out get snmpd status:

# service snmpd status

Output:

[root@jiradevdb u01]# service snmpd status

Redirecting to /bin/systemctl status snmpd.service

● snmpd.service - Simple Network Management Protocol (SNMP) Daemon.

Loaded: loaded (/usr/lib/systemd/system/snmpd.service; enabled; vendor preset: disabled)

Active: active (running) since Fri 2023-05-26 14:13:18 +07; 2h 8min ago

Main PID: 15962 (snmpd)

CGroup: /system.slice/snmpd.service

└─15962 /usr/sbin/snmpd -LS0-6d -f

May 26 14:13:18 jiradevdb.lienvietpostbank.com.vn systemd[1]: Starting Simple Network Management


Protocol (SNMP) Daemon....

May 26 14:13:18 jiradevdb.lienvietpostbank.com.vn snmpd[15962]: NET-SNMP version 5.7.2


May 26 14:13:18 jiradevdb.lienvietpostbank.com.vn systemd[1]: Started Simple Network Management
Protocol (SNMP) Daemon..

otherwise start service using following command:

# service snmpd start

Make sure snmpd service starts automatically, when linux comes us (add snmpd service):

# chkconfig snmpd on

[root@jiradevdb u01]# chkconfig snmpd on

Note: Forwarding request to 'systemctl enable snmpd.service'.

####

Step # 3 : Configuration: vi /etc/snmp/snmpd.conf

3.1. Khai báo community-string và ánh xạ nó vào một secutiryName nào đó.

3.2. Khai báo version snmp tương ứng với securityName đó, ánh xạ vào một groupName.

3.3. Tạo các view, cho phép bao gồm (include) hoặc không gồm (exclude) một nhánh con nào đó trong
mib.

3.4. Tạo một truy cập bằng cách gán một view cho một groupName.

Not cùng not , ko not thi cùng ko not

# First, map the community name "public" into a "security name"

# sec.name source community

com2sec ConfigUser default lvbsnmpkey

####

# Second, map the security name into a group name:

# groupName securityModel securityName

group ConfigGroup v1 ConfigUser

group ConfigGroup v2c ConfigUser


####

# Third, create a view for us to let the group have rights to:

# Make at least snmpwalk -v 1 localhost -c public system fast again.

# name incl/excl subtree mask(optional)

view systemview included .1.3.6

# view systemview included .1.3.6.1.2.1

# view systemview included .1.3.6.1.2.1.25.1

####

# Finally, grant the group read-only access to the systemview view.

# group context sec.model sec.level prefix read write notif

access ConfigGroup "" any noauth exact systemview none none

# -----------------------------------------------------------------------------

3.5. Open port in firewall:

# firewall-cmd --zone=public --add-port=161/tcp --permanent

success

# firewall-cmd --zone=public --add-port=161/udp --permanent

Success

# firewall-cmd --reload

Success

Step # 4 : Restart snmpd service and test snmp from Solarwinds:

# service snmpd restart

You might also like