Categories
Coding Unix

Installing Node.js4 in Centos7 with Yum

A quick summary that may help people who are installing AngularJS v2 and need to make sure they have the latest stuff.

First off, CentOS does not use a recent version of Node,js or NPM due to, well, lots of reasons! In fact the version the repo has for Nodejs is ZERO and it is already up to 4, 5 and 6. So that’s pretty damn old. When I’m in the software store and the guy asks “hey, do you want version 6 of that software?”, I rarely find myself saying, “Nah, please hit me with version zero.” What software store do I speak of? Well, this one of course!

All your software needs conveniently located at the shopping mall

Anyway, here is what you do to get the version 4 for nodejs etc:

curl –silent –location https://rpm.nodesource.com/setup_4.x | bash –

yum install -y nodejs

Categories
Unix

Increasing Network Connections in Centos7

I had a client who was losing network connectivity intermittently recently and it turns out they needed to increase the high limit for network connections. Centos7 has some variable name changes from previous versions so here are some helpful tips on how to increase the limits.

In older Centos you might have seen these error messages:

ip_conntrack version 2.4 (8192 buckets, 65536 max) – 304 bytes per conntrack

In newer verions, something like:

localhost kernel: nf_conntrack: table full, dropping packet

The below is for Centos versions that have renamed the ip_conntrack to nf_conntrack.

To get a list of network parameters:

sysctl -a | grep netfilter

This shows current value for the key parameter:

/sbin/sysctl net.netfilter.nf_conntrack_max

This shows your system current load:

/sbin/sysctl net.netfilter.nf_conntrack_count

So now to update the value in the kernel to triple the limit, of course make sure your RAM has room with what you choose:

/sbin/sysctl -w net.netfilter.nf_conntrack_max=196608

To make it permanent after reboot, please add these values to the /etc/sysctl.conf

net.ipv4.netfilter.ip_conntrack_max=196608

Hope this helps!

Categories
Unix

Installing MDB Tools in CentOS 7

MDB tools sure do come in handy when you have to handle someone’s old nasty microsoft access files!

On older Centos, I could just yum add mdbtools, but on Centos 7 I found the following was required.

First, you need to make sure you add these packages (you may need others in addition but these were the ones I had to add):

yum -y install glib2-devel
yum -y install autoconf
yum -y install automake
yum -y install txt2man
yum -y install gnome-doc-utils
yum -y install libtool
yum -y install unixODBC unixODBC-devel
yum -y install flex flex-devel bison bison-devel

Why did I split all that into 8 lines when I guess we could have just stuck them all in one? Why did I put flex and bison in one line, but not others? Who knows! Just roll with it.

Then you need to grab the source and compile:

mkdir tmp1; cd tmp1
git clone https://github.com/brianb/mdbtools.git mdbtools
cd mdbtools
autoreconf -i -f
./configure –with-unixodbc=/usr
make
make install