Showing posts with label Centos. Show all posts
Showing posts with label Centos. Show all posts

Wednesday, 24 October 2012

Change Interface Speeds

See here for further info.

To change the interface speed reported by snmpd you can add the following to your snmpd.conf file:


override ifSpeed.X uinteger 1000000000

Where x is the snmpd id. Alternative use the following:

interface br0 6 2000000000
interface bond0 6 2000000000
interface bond1 6 2000000000
interface vnet0 6 100000000

I tried different ways of using a RegEx to specify the name but it didn't work. Also note that after you restart the snmpd deamon

  • The overrride command changes the mib instantly
  • The interface command takes  a 20sec to change the mib


Friday, 18 November 2011

Installing Postgresql in CentOS

Install
yum install postgresql84
yum install postgresql84-server
yum install postgresql-odbc.x86_64
yum install postgresql-jdbc.x86_64

#If you want to use modules as part of the tablefunc.sql
yum install postgresql84-contrib.x86_64


Initialize
service postgresql initdb

Start
/etc/init.d/postgresql start

Settings
vi /var/lib/pgsql/data/postgresql.conf
 Add --> listen_addresses = '*'
 to make it listen to inbound connections
vi /var/lib/pgsql/data/pg_hba.conf
 Add  --> host    all         all         10.0.0.0/8            ident
 to make allow for local subnet


Create a DB
su - postgres

createdb qainfo

Install tablefunc
cd /usr/share/pgsql/contrib
in a specific database
psql -d qainfo <tablefunc.sql
over all
psql <tablefunc.sql


Create a DB user
su - postgres
psql
create user <<USERNAME>>;
GRANT ALL PRIVILEGES ON DATABASE <<DBNAME>> to <<USERNAME>>;

Where USERNAME should match a Unix/Linux user.

Use DB
#As <<USERNAME>>
psql qainfo
create table test ( name varchar(40));
insert into test values ('abc');
insert into test values ('123');
insert into test values ('you');
insert into test values ('me');
select * from test;