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


December 9, 2011

Identifying your version of GNU/Linux

by Alpha01

tony@debian01:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 6.0.3 (squeeze)
Release:	6.0.3
Codename:	squeeze
Tags: [ centos ubuntu ]
December 2, 2011

Monitor your public IP

by Alpha01

My simple yet effective home public IP monitoring script.

#!/bin/bash

current_ip="YOURIPHERE"
ip=`curl -s ifconfig.me`

if [ "$current_ip" != "$ip" ] && [ $ip != "" ]
then
    echo "New IP detected: $ip" | mail -s "Public IP has been changed" [email protected]
fi
Tags: [ bash ]
December 1, 2011

Installing wget on FreeBSD

by Alpha01

[root@freebsd01 ~]# cd /usr/ports/ftp/wget
[root@freebsd01 ~]# make install clean
Tags: [ freebsd ]
November 25, 2011

Securely cloning Linux partitions to a different system

by Alpha01

Getting a bit-by-bit copy of a partition or an entire hard drive is quite simple using the tool dd. Depending on what you’re trying to accomplish, there are two ways to get a copy of your partitions/drives.

One option is to clone the partition/drive directly to an actual partition or drive of your different system.

dd if=/dev/sdb1 | ssh [email protected] of=/dev/sdb1

Another option is to clone the partition or drive to a raw file on your second system, and associate the raw file to a loopback on your secondary host. This will give you the ability to easily mount the file as it were an actual partition or drive stored on your drive.

dd if=/dev/sdb1 | ssh [email protected] of=/root/rubysecurity_sdb1
[email protected] # losetup /dev/loop2 /root/rubysecurity_sdb1
[email protected] # mount /root/rubysecurity_sdb1 /mnt
Tags: [ security ]
October 27, 2011

Installing PHP 5.3 in CentOS

by Alpha01

To view the PHP related packages available in CentOS 5.x, simply run the following command:

[root@rubyninja ~]# yum search php

You should see the PHP 5.3 rpm packages prefixed as php53. Now it’s just a matter of installing the package, and you should be all set.

[root@rubyninja ~]# yum install php53 php53-cli

Note: If you made the mistake of installing PHP 5.1 previously, You will need to remove all of the PHP 5.1 packages currently installed on your system prior to installing the PHP 5.3 packages. This can be accomplished as the following.

[root@rubyninja ~]# rpm -qa --queryformat="%{NAME}\n" | grep php
php
php-cli
php-common
php-imap
php-mssql
php-snmp
php-mhash
php-mysql
php-mbstring
[root@rubyninja ~]# yum remove php php-cli php-common php-imap php-mssql php-snmp php-mhash php-mysql php-mbstring
Tags: [ php ]