Checking for Rootkits and Malware on Linux

  1. wget http://sourceforge.net/projects/rkhunter/files/rkhunter/1.4.2/rkhunter-1.4.2.tar.gz/download
  2. tar -zxpvf  rkhunter-1.4.2.tar
  3. cd rkhunter-1.4.2
  4. ./installer.sh –layout default –install
  5. /usr/local/bin/rkhunter –update
  6. /usr/local/bin/rkhunter –propupd
  7. rkhunter –check

Pulled from:  http://sourceforge.net/projects/rkhunter/files/rkhunter/1.4.2/

Needed a bit of updating.

 

http://www.nextstep4it.com/categories/how-to/rkhunter/

zfs tutorial

This explains how to setup openzfs on an ubuntu system.  My system has an iqstor 15 drive array on it, and that is what I will be using in this example.

  1. apt-get install python-software-properties
  2. add-apt-repository ppa:zfs-native/stable
  3. apt-get update
  4. apt-get install ubuntu-zfs
  5. zpool create -f -o ashift=12 tank raidz \
    ata-ST4000DM000-1111 ata-ST40000DM000-2222 ata-ST40000DM000-3333

NAS Build:
zpool create -f -o ashift=12 tank raidz2 \

 

SLC SLOG drive
unit MiB
mkpart zfs 1 16385
mkpart zfs 16285 122104
quit
zpool add tank log mirror <part1> <part2> <part3> (SLOG)
zpool add tank cache (L2ARC)

Filesystems are called datasets:
They all share the storage pool equally

zfs get compressionratio tank
zfs create tank/databases

zfs set compression=lz4 tank/databases
zfs create tank/databases -o compression=lz4

Snapshots:
zfs snapshot tank/databases@friday (start a snapshot)

apt-get install zfs-auto-snapshot (create snapshots on time intervals)
zfs set com.zun:auto-snapshot=true tank/databases
zfs set snapdir=visible tank/databases
Why create multiple file systems/datasets?
zpool scrub tank (check for errors)
zpool scrub cancel (kill scrubbing)
zpool iostat -v 1

zpool replace -f tank <disk1> <disk2> (old drive – new drive)
zpool status (will show the status of resilving)
Z 3,5,9,17,33
Z2 4,6,10,18,34
Z3 5,7,11,19,35

 

zpool status
zpool list
zpool iostat -v 1
zfs get compressionratio tank/databases
zdb (lists what zfs internal cache looks like)
zfs get all tank/databases (show all the paramters for a filesystem)
zfs list -t snapshot (show snapshots)

zfsonlinux.org
open-zfs.org/wiki/Main_Page

zfs set quota=10G tank/home/jeff
zfs get quota takn/home/jeff
zfs list -r tank/home

zpool create -f -o ashift=12 tank1 raidz2 \
pci-0000:0c:00.0-fc-0x520092b44d01bd04-lun-0 \
pci-0000:0c:00.0-fc-0x520092b4563e6e07-lun-0 \
pci-0000:0c:00.0-fc-0x520092b43a90080d-lun-0 \
pci-0000:0c:00.0-fc-0x520092b43a8c0a07-lun-0 \
pci-0000:0c:00.0-fc-0x520092b44d01bd10-lun-0 \
pci-0000:0c:00.0-fc-0x520092b43bd7ef01-lun-0 \
pci-0000:0c:00.0-fc-0x520092b49d716800-lun-0 \
pci-0000:0c:00.0-fc-0x520092b43a8c0a05-lun-0 \
pci-0000:0c:00.0-fc-0x520092b4353f2600-lun-0 \
pci-0000:0c:00.0-fc-0x520092b43a8c0a09-lun-0 \
pci-0000:0c:00.0-fc-0x520092b44d01bd06-lun-0 \
pci-0000:0c:00.0-fc-0x520092b44d01bd07-lun-0 \
pci-0000:0c:00.0-fc-0x520092b44d01bd0a-lun-0 \
pci-0000:0c:00.0-fc-0x520092b43a8c0a03-lun-0 \
pci-0000:0c:00.0-fc-0x520092b44d01bd1b-lun-0

zfs create tank/databases -o compression=lz4

–> replace disk with larger disk
zpool set autoexpand=on tank1
** pull a disk
** check logs for the drive that was removed
zpool detach tank old_1tb_drive
** insert new disk
zpoool replace -f old_1tb_drive new_2tb_drive

 

Mount on Boot:

You need to edit the file /etc/default/zfs with your favourite editor, eg: nano, vim or something else, and change the lines

ZFS_MOUNT='no'
ZFS_UNMOUNT='no'

to

ZFS_MOUNT='yes'
ZFS_UNMOUNT='yes'

Automation tasks:

Reference here

iQstor J2880 FC Switched JBOD (SBOD) System (decom)

Tech Spec:
http://www.iqstor.com/products/j2880/technical-specification

User Manual

Creating a raid6 via lvm2:

pvcreate /dev/sd[abscdefghijklmno]
vgcreate iqstor01 /dev/sd[abscdefghijklmno]
lvcreate –type raid6 -l 80%VG -i 13 -n lvm_iqstor01 iqstor01

this created a 10tb lvm, not a 13 tb as I expected.

 

Install Webmin:

apt-get -y install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions libapt-pkg-perl

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.680_all.deb

apt-get -y install ./webmin_1.680_all.deb

cakephp 2.4.5 installation on centos 6x

  1. Grab the source:
    • wget https://github.com/cakephp/cakephp/archive/2.4.5.tar.gz
    • mv 2.4.5 cakephp-2.4.5.tgz ; tar zxvf cakephp-2.4.5.tgz ; ln -s cakephp-2.4.5 cakephp
  2. item 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. Debugging with DebugKit
    1. http://book.cakephp.org/2.0/en/development/debugging.html
  8. 8

Standard info from any cakephp install:

CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.

The Cake Software Foundation – promoting development related to CakePHP
http://cakefoundation.org/

CakePHP – the rapid development PHP framework
http://www.cakephp.org

Cookbook – user documentation for learning about CakePHP
http://book.cakephp.org

API – quick reference to CakePHP
http://api.cakephp.org

The Bakery – everything CakePHP
http://bakery.cakephp.org

The Show – live and archived podcasts about CakePHP and more
http://live.cakephp.org

CakePHP TV – screen casts from events and video tutorials
http://tv.cakephp.org

CakePHP Google Group – community mailing list and forum
http://groups.google.com/group/cake-php

#cakephp on irc.freenode.net – chat with CakePHP developers
irc://irc.freenode.net/cakephp