rubysecurity.org

Anecdotes from a Linux Systems Administrator. /root

Home About Books Blog Portfolio Archive

Tag Cloud


Currently Reading

MCA Microsoft Certified Associate Azure Administrator Study Guide: Exam AZ-104
MCA Microsoft Certified Associate Azure Administrator Study Guide: Exam AZ-104
308 / 435 Pages


Latest Book Reviews

Latest Posts


April 9, 2012

Enabling locate database in Mac OS X Snow Leopard

by Alpha01

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Tags: [ macos ]
April 7, 2012

Building mysql2 gem in Ubuntu issue

by Alpha01

Error

Installing mysql2 (0.3.11) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /home/tony/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb 
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
	--with-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/home/tony/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
	--with-mysql-config
	--without-mysql-config
	--with-mysql-dir
	--without-mysql-dir
	--with-mysql-include
	--without-mysql-include=${mysql-dir}/include
	--with-mysql-lib
	--without-mysql-lib=${mysql-dir}/lib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-mlib
	--without-mlib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-zlib
	--without-zlib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-socketlib
	--without-socketlib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-nsllib
	--without-nsllib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-mygcclib
	--without-mygcclib
	--with-mysqlclientlib
	--without-mysqlclientlib

Fix

sudo apt-get install libmysqld-pic
Tags: [ ruby mysql ubuntu ]
February 24, 2012

Basic ARP Manipulation

by Alpha01

Add a temporary ARP entry to a hosts ARP cace

arp -s 192.168.1.145 00:02:03:F6:7C:4B temp

Permanent static entry (not temporary: NO “temp”)

arp -s 192.168.1.145 00:02:03:F6:7C:4B
Tags: [ networking security ]
February 19, 2012

DHCP configurations in Red Hat/CentOS and Debian/Ubuntu

by Alpha01

Example for eth0

Red Hat/CentOS: /etc/sysconfig/network-scripts/ifcfg-eth0

BOOTPROTO=dchp

Ubuntu/Debian: /etc/networks/interfaces

iface eth0 inet dhcp
Tags: [ centos ubuntu networking ]
February 1, 2012

Static IP configurations in Red Hat/CentOS and Debian/Ubuntu

by Alpha01

Static IP configurations

Ubuntu/Debian: /etc/networks/interfaces

iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254

RedHat/Centos: /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.140
BROADCAST=192.168.1.255
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
Tags: [ ubuntu centos ]