Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

Friday, 4 October 2013

Simple unbound upstart script

  1. put below in /var/tmp/unbound.conf
  2. pkill unbound
  3. lsof -nP -i :53
  4. pgrep unbound
  5. cp -v /var/tmp/unbound.conf /etc/init/
  6. start unbound
  7. status unbound
  8. status unbound
  9. start unbound
start on runlevel [3]
expect fork
exec unbound

Monday, 13 May 2013

Put stuff on your Nexus 4


  1. apt-get install gmtp
  2. Make sure your "Storage" is in MTP mode
P.S. Or, if you have access to a Mac: "Android File Transfer"

Thursday, 25 April 2013

Quick CLI screenshots on Linux or Openbox / Fluxbox


  1. sudo apt-get -y install imagemagick eog
  2. import myscreenshot.jpg
    1. select portion of screen with the crosshairs
  3. eog myscreenshot.jpg

Tuesday, 8 January 2013

Quick start howto for divish on Debian

  1. Prep
    1. Here, there is one backup server and two client servers that need to be backed up
    2. Make sure root user on backup server can ssh to mybox01.mydomain.net and mybox02.mydomain.net without password
      1. Later, much later, see online for better, more secure ways
    3. install dirvish and rsync on server, rsync on clients
      1. apt-get install dirvish
      2. apt-get install rsync
  2. Clients
    1. The below are just example directories, use your own, the ones you want backed up
    2. mkdir -p /data/backups/
    3. mkdir -p /data/backups/etc
    4. mkdir -p /data/backups/var/log
    5. rsync -av /etc/ /data/backups/etc/
    6. rsync -av /opt/ /data/backups/opt/
    7. Make a cron job to do the rsyncs above nightly
  3. Server
    1. mkdir -p /backup/dirvish/mybox01/dirvish
    2. mkdir -p /backup/dirvish/mybox02/dirvish
    3. vi /backup/dirvish/mybox01/dirvish/default.conf
      1. get contents below
    4. vi /backup/dirvish/mybox02/dirvish/default.conf
      1. get contents below
    5. dirvish --vault mybox01 --init
    6. dirvish --vault mybox02 --init
  4. Verify
    1. Backed up files should now be under /backups/dirvish on backup server
      1. tree /backup/ -d -L 3
      2. find /backup/dirvish -ls | less
  5. Tell dirvish to do nightly pull
    1. vi  /etc/dirvish/master.conf.mybackup
      1. get contents below
  6. Tomorrow, verify the pull worked, and next week too
  7. Exclusion and expire options
    1. Research options one can add to master.conf.mybackup
Server files

/etc/dirvish/master.conf

bank:
    /backup/dirvish

Exclude:
    lost+found/


/etc/dirvish/master.conf.mybackup

Runall:
    mybox01
    mybox02

/backup/dirvish/mybox01/dirvish/default.conf

client: mybox01.mydomain.net
tree: /data/backups

xdev: true
index: gzip


/backup/dirvish/mybox02/dirvish/default.conf

client: mybox02.mydomain.net
tree: /data/backups

xdev: true
index: gzip



Friday, 4 January 2013

Install lex on Debian

sudo apt-get install byacc flex

Monday, 17 September 2012

Anti-window, anti-desktop Linux desktop

  1. Install base debian with NO additional packages
  2. apt-get install xorg openbox obmenu slim terminator firefox wicd-gtk
  3. reboot
  4. Log in to openbox via slim
  5. Right-click on blank desktop and open default terminal
  6. Run obmenu
  7. Edit ~/.config/openbox/menu.xml to add things you like
  8. Set up network including wireless using early post on this blog
    1. It is not easy
    2. but nice to know once you learn

Monday, 3 September 2012

Cleaning up configuration files of removed Debian packages

If you want to rid yourself of those annoying packages showing up with a "rc" in the first field of "dpkg -l", do this as root, with prejudice:
dpkg -l | egrep '^rc ' | awk '{print $2}' | xargs dpkg -P
Let the good times roll!

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...