Skip to content

Instantly share code, notes, and snippets.

@fishdust
fishdust / zfsonlinux_centos7.md
Last active January 10, 2017 20:57
Installing ZFS on Centos 7

Here are the only commands used to install ZFS on Centos 7

First install from CentOS-7-x86_64-Minimal-1611.iso

yum -y install epel-release
yum -y update
reboot

after reboot

@fishdust
fishdust / CentOS 7 AFP Netatalk
Last active August 23, 2018 01:39 — forked from darcyliu/centos7_timechine.sh
Install Time Machine service on CentOS 7
# Install AFP server on CentOS 7
# http://netatalk.sourceforge.net/wiki/index.php/Netatalk_3.1.7_SRPM_for_Fedora_and_CentOS
# http://confoundedtech.blogspot.com/2011/07/draft-draft-ubuntu-as-apple-time.html
yum install -y rpm-build gcc make wget
# install netatalk
yum install -y avahi-devel cracklib-devel dbus-devel dbus-glib-devel libacl-devel libattr-devel libdb-devel libevent-devel libgcrypt-devel krb5-devel mysql-devel openldap-devel openssl-devel pam-devel quota-devel systemtap-sdt-devel tcp_wrappers-devel libtdb-devel tracker-devel
yum install -y bison docbook-style-xsl flex dconf
echo "set completion-ignore-case on" >> /etc/inputrc
@fishdust
fishdust / gcsfuse-setup.sh
Last active August 29, 2015 14:25
Mounting GCP bucket with gcsfuse
# Install necessary components
yum -y install fuse go git
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
#modify .bash_profile to include the following:
PATH=$PATH:$HOME/bin:$HOME/go/bin:$HOME/google-cloud-sdk/bin
mkdir /mnt/gcp-online
gcsfuse gcp-online /mnt/gcp-online/
@fishdust
fishdust / gist:d09db08a3897335a94c7
Created January 15, 2015 21:27
TrippLite Keyspan USA-19HS on OS X 10.10
screen /dev/tty.USA19H145P1.1 9600
@fishdust
fishdust / salt-curl-ftp
Last active August 29, 2015 14:13
Using salt to upload remote data to a FTP server via Curl
salt 'salt-client.domain.com' cmd.run "curl -v -T /path/to/file.foo ftp://ftpuser:ftppass@domain.com/destination/path/"
@fishdust
fishdust / tina_cart
Last active August 29, 2015 14:12
Reading data from an Atempo TimeNavigator formatted cartridge
# to read the data only:
tina_cart -type "IBM Ultrium 5" -device /dev/rmt/nst0 -list -skip 1 -all
# to extract the data off the tape
tina_cart -type "IBM Ultrium 5" -extract -all -format tar -device /dev/rmt/nst0 -skip 1
@fishdust
fishdust / zfs-healthcheck cron
Created December 12, 2014 06:27
zfs health check cron entry
SHELL=/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin
#
#minute (0-59)
#| hour (0-23)
#| | day of the month (1-31)
#| | | month of the year (1-12 or Jan-Dec)
#| | | | day of the week (0-6 with 0=Sun or Sun-Sat)
#| | | | | commands
#| | | | | |
#! /usr/local/bin/bash
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS
# pools. For now, in FreeBSD 9, we will make our own checks and run this script
@fishdust
fishdust / history
Last active August 29, 2015 14:10
Makes bash history useful by time stamping, ignoring repeated commands, and allowing more history events
HISTFILESIZE=2000000
HISTSIZE=100000
HISTTIMEFORMAT='%F %T '
HISTIGNORE="&:[ ]*"
# add to .bash_profile or .bashrc
# history will look like this:
#
# 4729 2014-11-30 12:11:50 cat .bash_profile
# 4730 2014-11-30 12:18:54 uptime