Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, April 12, 2016

Docker and Node.JS

My First Node.JS sever in Docker

Docker is a way to quickly deploy code in Linux that allows a repeatable process for automation at scale.    Please visit the Docker web site for more information: https://www.docker.com/what-docker

At this time I was running Hyper-V on Windows 10 64 bit with Intel i7 processor and a newly upgraded 500GB SSD from Samsung.

 The Linux VM I created was Ubuntu server 14.04 LTS

Dockerizing a Node.js web app
https://nodejs.org/en/docs/guides/nodejs-docker-webapp/

 

 

 

 

Monday, March 21, 2016

Three steps get SNMP working on CentOS and RedHat



1. Install snmp with yum or other method

2. Configure

Backup and setup readonly user in config file
>mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.org
>vi /etc/snmp/snmpd.conf

    rocommunity  public
    syslocation  “My Computer Room”

 Restart Service

 >service snmpd restart

 Set Service to autostart

>chkconfig –list snmpd
snmpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off

>chkconfig snmpd on

Open port in firewall if needed
>vi /etc/sysconfig/iptables

-A INPUT -p udp -m state –state NEW -m udp –dport 161:162 -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 161:162 -j ACCEPT

Restart Firewall
>service iptables restart

3. Test

Network Setup in Linux


In Redhat and CentOS
Network interface cards are auto-discovered, they can be seen here; /etc/udev/rules.d/ in the file 70-persistent-net.rules
View the File:
cat /etc/udev/rules.d/70-persistent-net.rules
Output:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# net device () (custom name provided by external tool)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:15:5d:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″
# net device () (custom name provided by external tool)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:15:5d:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

Note: In Linux 2.6 and above UDEV is the auto-discovery device manager and replaces the functionality of both hotplug and hwdetect. See: udev-ArchWiki and udev-Wikipedia
The network configuration files may also be auto created here: /etc/sysconfig/network-scripts/ in the file ifcfg-ethXX