Friday, December 29, 2017

.::: Enable CPU Temperature Information on Linux (Rhel6/Centos6),(Rhel7/Centos7) Using lm_sensors :::.

lm_sensors (Linux monitoring sensors) is a free and open-source application that provides tools and drivers for monitoring temperatures, voltage, and fans. This document explains how to install, configure, and use lm_sensors.

A. Enable Temperature using lm_sensors

1. Download rpm lm_sensors if you using offline
For Rhel6/Centos6 Download rpm lm_sensors-3.1.1-17.el6.x86_64.rpm then copy to server
# wget  http://mirror.centos.org/centos/6/os/x86_64/Packages/lm_sensors-3.1.1-17.el6.x86_64.rpm

For Rhel7/Centos7 Download lm_sensors-libs-3.4.0-4.20160601gitf9185e5.el7.x86_64.rpm, lm_sensors-3.4.0-4.20160601gitf9185e5.el7.x86_64.rpm
# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/lm_sensors-libs-3.4.0-4.20160601gitf9185e5.el7.x86_64.rpm
# wget https://www.rpmfind.net/linux/centos/7.4.1708/os/x86_64/Packages/lm_sensors-3.4.0-4.20160601gitf9185e5.el7.x86_64.rpm

Wednesday, October 18, 2017

.::: Install Cacti 1.0.x on Centos 7/Rhel 7 Using MariaDB :::.

Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database. The frontend is completely PHP driven. Along with being able to maintain Graphs, Data Sources, and Round Robin Archives in a database, cacti handles the data gathering. There is also SNMP support for those used to creating traffic graphs with MRTG.

UPDATE:
Since new release is out, I added the procedures for upgrading cacti 1.0.1 to 1.0.x; and from 1.0.x to 1.1.x
1. Disable SELinux
[root@TeguhLab data]# cat /etc/selinux/config | grep SELINUX
# SELINUX= can take one of these three values:
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
SELINUXTYPE=targeted
[root@TeguhLab data]#

Monday, October 16, 2017


Thursday, October 12, 2017

.::: Install MariaDB 10.1 On Centos/Rhel 7 Using Yum Repository :::.

MariaDB Server is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, WordPress.com and Google.

MariaDB turns data into structured information in a wide array of applications, ranging from banking to websites. It is an enhanced, drop-in replacement for MySQL. MariaDB is used because it is fast, scalable and robust, with a rich ecosystem of storage engines, plugins and many other tools make it very versatile for a wide variety of use cases.

MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features.

1. Add MariaDB Yum Repository
Start by adding the MariaDB YUM repository file MariaDB.repo for RHEL/CentOS and Fedora systems.
# vi /etc/yum.repos.d/MariaDB.repo

Now add the following lines to your respective Linux distribution version as shown.

On CentOS 7

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

.::: Troubleshoot Error 'X-Frame-Options' to 'sameorigin'or Load denied by X-Frame-Options does not permit cross-origin framing :::.

some application. You can't change the web security setting in Application. The only way to add or remove header options would be to proxy it, e.g with haproxy. Troubleshoot Error 'X-Frame-Options' to 'sameorigin'or Load denied by X-Frame-Options does not permit cross-origin framing

1. Log Error
Error 'X-Frame-Options' to 'sameorigin'or Load denied by X-Frame-Options does not permit cross-origin framing

Thursday, October 5, 2017

.:: Generate Triger Alarm Alcatel Lucent/Nokia 7750, 7450, 7210, 7705 :::.


1. Check snmp & snmptrap community
A:TeguhRouter# show system security snmp community

==============================================================================
Communities
==============================================================================
community           access  view                version   group name
------------------------------------------------------------------------------
cli-li-readwrite    n/a     li-view             v2c       cli-li-readwrite
cli-readonly        r       iso                 v2c       cli-readonly
cli-readwrite       rw      iso                 v2c       cli-readwrite
public              r       no-security         v1 v2c    snmp-ro
public              n/a     n/a                 v2c       snmp-trap
teguht              rwa     iso                 v2c       snmp-rwa
------------------------------------------------------------------------------
No. of Communities: 9
==============================================================================
A:TeguhRouter# show log snmp-trap-group       

Tuesday, September 26, 2017

.::: Install/Upgrade Minimal to Desktop Environment on Centos/RHEL(Redhat Enterprise Linux ) :::.

1. List Installed and Available Groups
[root@TeguhLab ~]# yum grouplist
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
 * base: sumberterbuka.beritagar.id
 * extras: sumberterbuka.beritagar.id
 * updates: sumberterbuka.beritagar.id
Available environment groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation

Monday, August 21, 2017

.::: How To Enable SNMP & SNMPTrap on Alcatel Lucent/Nokia Router(7750, 7710, 7705,7750) :::.

A. Enable SNMP Router Alcatel Lucent
1. Check snmpwalk router
# snmpwalk -v2c -c teguht 10.10.10.10 sysDescr
# snmpwalk -v2c -c teguht 10.10.10.10 1.3.6.1.2.1.1

[root@TeguhLab ~]# snmpwalk -v2c -c teguht 10.10.10.10 sysDescr
Timeout: No Response from 10.10.10.10
[root@TeguhLab ~]# snmpwalk -v2c -c teguht 10.10.10.10 1.3.6.1.2.1.1
Timeout: No Response from 10.10.10.10
[root@TeguhLab ~]#

.::: How To Commission & Enable SNMP an OmniSwitch Alcatel Lucent for NMS :::.

Before you begin. See the appropriate OmniSwitch documentation for more information about the CLI command syntax and SNMP.
Note: The NMS cannot discover an OmniSwitch that is configured with the factory default settings.
Note: You must use a direct console port connection to access an OmniSwitch for the first time. All other management methods such as SNMP, Telnet, FTP, and HTTP, are disabled until you enable them.

1. Open a console window using a direct console port connection to the OmniSwitch.
2. Create a Loopback0 interface and assign an IP address to the interface by entering
the following:
ip interface Loopback0 address xxx.xxx.xxx.xxx
where
xxx.xxx.xxx.xxx is the IP address of the interface

Friday, August 18, 2017

.::: How to Check License subscription-manager RHEL(Red Hat Enterprise Linux) :::.

Red Hat Enterprise Linux Server subscription is available at no cost for development purposes. Developers need to register for the Red Hat Developer Program and agree to licensing terms forbidding production use. This free developer subscription was announced on March 31, 2016.

There are also "Academic" editions of the Desktop and Server variants. They are offered to schools and students, are less expensive, and are provided with Red Hat technical support as an optional extra. Web support based on number of customer contacts can be purchased separately.

1. Sample command
# subscription-manager orgs
# subscription-manager refresh
# subscription-manager status
# subscription-manager list
# subscription-manager list --consume

Tuesday, August 8, 2017

.::: How To Upgrade Cacti on Linux :::.

note: this cace, upgrade cacti 0.8.8.b to 0.8.8.h
1. Backup the old Cacti database
mysqldump -l --add-drop-table <db_name> -u <user> -p  > mysql.cacti
[root@TeguhLab data]# mysqldump -l --add-drop-table cacti -u root -p > mysql.cacti
Enter password:
[root@TeguhLab data]# ls
mysql.cacti  rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
[root@TeguhLab data]# ls -lh
total 156K
-rw-r--r-- 1 root root 138K Aug  3 14:45 mysql.cacti
-rw-r--r-- 1 root root  13K Mar 20  2013 rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
[root@TeguhLab data]#

Monday, August 7, 2017

.::: How To Install Cacti On Linux :::.

Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database. The frontend is completely PHP driven. Along with being able to maintain Graphs, Data Sources, and Round Robin Archives in a database, cacti handles the data gathering. There is also SNMP support for those used to creating traffic graphs with MRTG.

Note : using mysql 5.1.73 & cacti 0.8.8.b

1. Disable SE Linux
[root@TeguhLab ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled

Thursday, July 27, 2017

.::: Different Output OID ifDescr & ifAlias :::.

1. Different ifDescr, ifName & ifAlias
ifDescr OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
            "A textual string containing information about the
            interface.  This string should include the name of the
            manufacturer, the product name and the version of the
            interface hardware/software."
    ::= { ifEntry 2 }

.::: Sample output snmpwalk OID on MIB IF-MIB :::.


1. Definition IF-MIB
The MIB module to describe generic objects for network interface sub-layers. This MIB is an updated version of MIB-II's ifTable, and incorporates the extensions defined in RFC 1229.

2. OID on IF-MIB include calculate
ifTable
1.3.6.1.2.1.2                            interfaces                                           NODE
1.3.6.1.2.1.2.1                          ifNumber                                             LEAF  Integer32
1.3.6.1.2.1.2.2                          ifTable                                              NODE
1.3.6.1.2.1.2.2.1                        ifEntry                                              NODE
1.3.6.1.2.1.2.2.1.1                      ifIndex                                              LEAF  InterfaceIndex
1.3.6.1.2.1.2.2.1.2                      ifDescr                                              LEAF  DisplayString
1.3.6.1.2.1.2.2.1.3                      ifType                                               LEAF  IANAifType
1.3.6.1.2.1.2.2.1.4                      ifMtu                                                LEAF  Integer32
1.3.6.1.2.1.2.2.1.5                      ifSpeed                                              LEAF  Gauge32

Thursday, July 20, 2017

.::: How To Export Display on Linux/Unix Platform (Installer User Interface Mode Not Supported):::.



1. example running java on linux using CLI
[root@TeguhLab /]# su oracle
bash-4.1$ cd /
bash-4.1$ ./teguh.bin
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

Graphical installers are not supported by the VM. The console mode will be used instead...

Preparing CONSOLE Mode Installation...

Tuesday, July 18, 2017

.::: How to display login banner before & After login(Prelogin, Postlogin) On Unix/Linux :::.

Pre login banner is use for sending a warning message before authentication may be relevant for getting legal protection or just give out information to users. The contents of the specified file are sent to the remote user before authentication is allowed. This option is only available for protocol version 2. By default, no banner is displayed (if you are using latest version of Linux/UNIX then you do not have to worry about version issue)

A. Display SSH Warning Message to Users Before Login

1) By default sshd server turns off this feature.

.::: Enable Crontab on Linux/Unix Platform :::.

Crontab  is  the program used to install, remove or list the tables used to drive the cron(8) daemon.  Each user can have their own crontab, and though these are files in /var/spool/ , they are not intended to be edited directly. For SELinux in mls mode can be even more crontabs - for  each  range.  For  more  see selinux(8).

The  cron jobs could be allow or disallow for different users. For classical crontab there exists cron.allow and cron.deny files.  If cron.allow file exists, then you must be listed therein in order to be allowed to use this command.  If the cron.allow file does not exist but the cron.deny file  does  exist,  then you must not be listed in the cron.deny file in order to use this command.  If neither of these files exists, only the super user will be allowed to use this command.  The second option is using PAM authentication, where you set up users, which could  or  couldn’t  use  crontab  and  also  system  cron  jobs  from /etc/cron.d/.

::: How to Upgrade RHEL/Redhat Enterprise Linux 7 Using Repolocal, ISO & Online :::.


1. capture release version before upgrade
[root@teguhlab yum.repos.d]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[root@teguhlab yum.repos.d]#

2. Mounting Image Rhel 7.3/Latest Using ISO File or DVD Room/Repolocal
detail on http://teguhth.blogspot.co.id/2017/07/how-settting-install-package-os-redhat.html

3. Clean all
# yum clean all
# subscription-manager clean
All local data removed

Friday, July 14, 2017

.::: How Settting & Install Package OS Redhat Enterprise Linux(Rhel) 7 Using Repolocal, ISO File & rpm file :::.


A. Using Repolocal(DVD)
1. Make sure DVD mounting
[root@teguhlab yum.repos.d]# df -kh
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       261G  3.0G  258G   2% /
devtmpfs        9.8G     0  9.8G   0% /dev
tmpfs           9.8G   84K  9.8G   1% /dev/shm
tmpfs           9.8G  9.0M  9.8G   1% /run
tmpfs           9.8G     0  9.8G   0% /sys/fs/cgroup
/dev/sda1       187M  146M   42M  78% /boot
tmpfs           2.0G   20K  2.0G   1% /run/user/0
/dev/sr0        3.6G  3.6G     0 100% /run/media/root/RHEL-7.3 Server.x86_64
[root@teguhlab yum.repos.d]#

Saturday, July 1, 2017

.::: Troubleshoot MySQL is not running, but lock file (/var/lock/subsys/mysql[FAILED] :::.

1. Problem MySQL cannot start & tried restart
[root@TeguhLab ~]# service mysql status
MySQL is not running, but lock file (/var/lock/subsys/mysql[FAILED]
[root@TeguhLab ~]# service mysql restart
MySQL server PID file could not be found!                  [FAILED]
Starting MySQL.The server quit without updating PID file (/[FAILED]mysql/TeguhLab.pid).
[root@TeguhLab ~]#

result "MySQL is not running, but lock file (/var/lock/subsys/mysql[FAILED]"

Wednesday, June 21, 2017

.::: Sample Calculate interface bandwidth utilization % Using IfSpeed, IfHighSpeed :::.

base on calculation bandwith utilization 32 bits and 64 bits.
http://teguhth.blogspot.co.id/2017/06/how-to-calculate-bandwidth-utilization.html
here as example calculation base on value snmpwalk/snmpget

Counter32 Bits
1.3.6.1.2.1.2.2.1                          ifEntry                                              NODE
1.3.6.1.2.1.2.2.1.1                        ifIndex                                              LEAF  InterfaceIndex
1.3.6.1.2.1.2.2.1.2                        ifDescr                                              LEAF  DisplayString
1.3.6.1.2.1.2.2.1.3                        ifType                                               LEAF  IANAifType
1.3.6.1.2.1.2.2.1.4                        ifMtu                                                LEAF  Integer32
1.3.6.1.2.1.2.2.1.5                        ifSpeed                                              LEAF  Gauge32

Monday, June 19, 2017

.::: How To Calculate Bandwidth Utilization Using SNMP :::.

Problem

It is sometimes necessary to calculate bandwidth use with SNMP.
Solution

Use this solution to solve this problem.

How you calculate use depends on how data is presented for what you want to measure. Interface use is the primary measure used for network use. Use this formulas, based on whether the connection you measure is half-duplex or full-duplex. Shared LAN connections tend to be half-duplex, mainly because contention detection requires that a device listen before it transmits. WAN connections are full-duplex because the connection is point-to-point; both devices can transmit and receive at the same time because they know there is only one other device that shares the connection. Because MIB-II variables are stored as counters, you must take two poll cycles and figure the difference between the two (hence, the delta used in the equation).

Thursday, June 8, 2017

.::: Cacti Template Alcatel Memory Usage Utilization On % Persen 7750, 7705, 7450, 7210 :::.

Alcatel Memory Usage Utilization 7750, 7705, 7450, 7210

== OID Memory ==
1.3.6.1.4.1.6527.3.1.2.1.1.1 sgiCpuUsage LEAF Unsigned32
1.3.6.1.4.1.6527.3.1.2.1.1.2 sgiMemoryUsed LEAF Unsigned32
1.3.6.1.4.1.6527.3.1.2.1.1.3 sgiMemoryAvailable LEAF Unsigned32
1.3.6.1.4.1.6527.3.1.2.1.1.4 sgiMemoryPoolAllocated LEAF Unsigned32
1.3.6.1.4.1.6527.3.1.2.2.3.4.1.18          tmnxCpmCardMemorySize                                LEAF  Unsigned32

Monday, May 29, 2017

.::: Cacti Template Alcatel Temperature Slot A On 7750, 7705, 7450, 7210 :::.


== OID Memory ==
1.3.6.1.4.1.6527.3.1.2.2.1.8.1.8 tmnxHwName LEAF TNamedItemOrEmpty
1.3.6.1.4.1.6527.3.1.2.2.1.8.1.18 tmnxHwTemperature LEAF Integer32
1.3.6.1.4.1.6527.3.1.2.2.1.8.1.19  tmnxHwTempThreshold   LEAF  Integer32

Tuesday, May 23, 2017

.::: Cacti Template Alcatel Memory Usage Utilization 7750, 7705, 7450, 7210 :::.

Alcatel Memory Usage Utilization 7750, 7705, 7450, 7210

== OID Memory ==
1.3.6.1.4.1.6527.3.1.2.1.1.1 sgiCpuUsage LEAF Unsigned32
1.3.6.1.4.1.6527.3.1.2.1.1.2 sgiMemoryUsed LEAF Unsigned32
1.3.6.1.4.1.6527.3.1.2.1.1.3 sgiMemoryAvailable LEAF Unsigned32
1.3.6.1.4.1.6527.3.1.2.1.1.4 sgiMemoryPoolAllocated LEAF Unsigned32
1.3.6.1.4.1.6527.3.1.2.2.3.4.1.18          tmnxCpmCardMemorySize                                LEAF  Unsigned32

Tuesday, April 25, 2017

.::: Simple, Advanced & Full Power Level Tuning Performance MySQL or MariaDB :::.


1. copying/backup my.cnf on linux/unix or my.ini on windows
Linux
[root@SAMLab mysql]# cat /etc/my.cnf

Windows
C:\ProgramData\MySQL\MySQL Server 5.7\my.ini

C:\Users\teguh.triharto>cd C:\ProgramData\MySQL\MySQL Server 5.7

C:\ProgramData\MySQL\MySQL Server 5.7>dir
 Volume in drive C has no label.
 Volume Serial Number is 40FC-A9B1

.::: Install MySQL 57 On Linux Rhel/Centos using RPM/Offline :::.


1. Download rpm instalation from http://dev.mysql.com/downloads/mysql/ as sample

mysql-community-common-5.7.16-1.el6.x86_64.rpm
mysql-community-libs-5.7.16-1.el6.x86_64.rpm
mysql-community-devel-5.7.16-1.el6.x86_64.rpm
mysql-community-client-5.7.16-1.el6.x86_64.rpm
mysql-community-server-5.7.16-1.el6.x86_64.rpm

wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-common-5.7.16-1.el6.x86_64.rpm
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-libs-5.7.16-1.el6.x86_64.rpm
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-devel-5.7.16-1.el6.x86_64.rpm
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-client-5.7.16-1.el6.x86_64.rpm
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-server-5.7.16-1.el6.x86_64.rpm


[root@TEGUHTH mysql]# ls -lh
total 173M
-rw-r--r-- 1 root root  23M Nov  7 15:19 mysql-community-client-5.7.16-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 328K Nov 10 15:20 mysql-community-common-5.7.16-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 3.6M Nov 10 14:08 mysql-community-devel-5.7.16-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 2.1M Nov  7 15:21 mysql-community-libs-5.7.16-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 144M Nov  7 15:06 mysql-community-server-5.7.16-1.el6.x86_64.rpm
[root@TEGUHTH mysql]#

Wednesday, March 1, 2017

.::: [FIX] Error 1075 The Dependency Service Does Not Exist Or Has Been Marked For Deletion or Cannot Enable Aero Windows:::.

We have already seen many issues regarding various services, when dependency service do not coordinate, the actual service failed to start as a consequence of this. Recently, we came around the similar problem for Security Center service. If you can’t start Security Center service, checkout this fix. After applying the same fix, one of my reader asked that he now gets different error and thus can’t start the service. This is what he received now:

    Windows could not start the Security Center service on Local Computer.

    Error 1075: The dependency service does not exist or has been marked for deletio

Tuesday, January 24, 2017

.::: Change Mirror Server Instance to Single User/Server on SQL Server 2012,2014,2016 :::.


1. Open SQL using SQL Management Studio






2. Open Mirror Server Instance and query and execute
alter database teguhtrihartodb set partner off
go
restore database teguhtrihartodb with recovery
go


3. expand Database on SQL Management Studio

Popular Posts