Tag Cloud
Currently Reading
Latest Book Reviews
- Rancher Deep Dive Posted on March 31, 2023
- Leveraging Kustomize for Kubernetes Manifests Posted on March 24, 2023
- Automating Workflows with GitHub Actions Posted on October 13, 2022
- Deep-Dive Terraform on Azure Posted on August 30, 2022
- Effective DevOps Posted on January 5, 2022 All Book Reviews
Latest Posts
- Identifying your version of GNU/Linux Posted on December 9, 2011
- Monitor your public IP Posted on December 2, 2011
- Installing wget on FreeBSD Posted on December 1, 2011
- Securely cloning Linux partitions to a different system Posted on November 25, 2011
- Installing PHP 5.3 in CentOS Posted on October 27, 2011
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
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
bash
]
December 1, 2011
Installing wget on FreeBSD
by Alpha01
[root@freebsd01 ~]# cd /usr/ports/ftp/wget
[root@freebsd01 ~]# make install clean
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
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
php
]