Centos YUM Server

I’m finally publishing my own Yum Server for Centos 6 and 7, which contains some missing packages and other custom built ones that I use quite often. yum.jc21.com
Continue reading

I’ll admit, a lot of these are noob teachings but sometimes you just forget… Date Manipulations # Use strings to perform date manipulations FUTURE_DATE=date --date="+10 days" # Fri May 24 16:13:53 EST 2013 FUTURE_DATE=date --date="+10 days ­1 month" # Wed Apr 24 16:14:48 EST 2013 # Similar to php’s date() function, you can change the output of the bash date TIME=date +%T # 16:16:08 DATE=date +%Y-%m-%d # 2013-05-14 YEAR=date +%Y # 2013 # Use both of these tips together FUTURE_DATE=date --date="+10 days -1 month" +%Y-%m-%d\ %T # 2013­04­24 16:18 Using colours in your console output # Predefined Colours black=’\E[30m’ red=’\E[1;31m’ green=’\E[1;32m’ yellow=’\E[1;33m’ blue=’\E[1;34m’ magenta=’\E[1;35m’ cyan=’\E[1;36m’ white=’\E[1;37m’ # Color­echo.
Continue reading

Find out which device you want to format. In the following example we will assume it’s /dev/sdb This example will create a ext4 partition spanning the entire size of the device, making sure it’s aligned to the sectors and while we’re at it, we’ll remove the reserved space allocation so we can use the entire space. parted –script /dev/sdb mklabel gpt parted –align=min –script /dev/sdb mkpart primary 0% 100% parted –script /dev/sdb print mkfs.
Continue reading

Backups using LFTP

This guide explains how to perform backups from server_1 to server_2 using FTP. Here we are assuming that that server_2 has an FTP server running and server_1 is performing the backup. Make sure you have lftp installed. Create an FTP user on server_2 and give them a chroot’d home directory. Create a script file that lftp will use as a set of instructions: /root/cron/lftp.script 1
Continue reading

Author's picture

Jamie Curnow

Web Tech Ninja • Project Manager • Amateur Photographer • Social Scientist • Taurus