rubysecurity.org

Cloud Architect / DevOps Engineer / SRE / Developer | /root

Home About Books Blog Portfolio Archive

Tag Cloud


Currently Reading

Certified Kubernetes Administrator (CKA) Study Guide
Certified Kubernetes Administrator (CKA) Study Guide
38 / 155 Pages


Latest Book Reviews

Latest Posts


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 ]