You are here

Error message

  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; views_display has a deprecated constructor in require_once() (line 3279 of /home/blackh31/public_html/BLACKHILL/includes/bootstrap.inc).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; views_many_to_one_helper has a deprecated constructor in require_once() (line 127 of /home/blackh31/public_html/BLACKHILL/sites/all/modules/ctools/ctools.module).
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2396 of /home/blackh31/public_html/BLACKHILL/includes/menu.inc).

Blog

Installing node in a Docker container

The base docker image is a bare bones ubuntu server install. We’re going to use that as a base and create our own image with node installed.

In case you’d rather just watch check out the screencast: http://youtu.be/KkSbEvuRbfo

Step 1) Open a terminal and start an instance using the base image. This will launch you into a shell where we can begin to customise the image:

$ sudo docker run -i -t base /bin/bash

Step 2) Install node:

Installing Docker on Ubuntu 12.04 64-bit

# install the backported kernel
sudo apt-get update
sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring

# reboot
sudo reboot

Docker is available as a Debian package, which makes installation easy.

First add the Docker repository key to your local keychain. You can use the apt-key command to check the fingerprint matches: 36A1 D786 9245 C895 0F96 6E92 D857 6A8B A88D 21E9

sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"

Accessing Windows Host Directory from Linux Guest in Virtualbox

Make certain that the Virtualbox Additions have been installed.

  • sudo gedit /etc/init.d/rc.local
  • add the following to rc.local:
  • sudo mkdir /media/GUEST_SHARE_NAME
  • sudo mount -t vboxsf HOST_SHARE_NAME /media/GUEST_SHARE_NAME
  • reboot

Using TightVNC in an SSH Tunnel

After setting up SSH and installing TightVNC, open the tunnel.

  • ssh username@192.168.0.0 -L 8900/localhost/5900

Then access the tunnel via TightVNC.

"C:\Program Files\TightVNC\vncviewer.exe" localhost:8900

File Encryption

Create a tar ball and encrypt with a password.

  • tar cvf tar_filename.tar files
  • gzip tar_filename.tar
  • openssl enc -e -des3 -salt -in tar_ball_filename.tar.gz -out filename.bin

Provide a password when prompted.
To decrypt:

  • openssl des3 -d -salt -in filename.bin -out filename.tar.gz
  • gzip -d filename.tar.gz
  • tar -xf filename.tar

Provide the password when prompted.

Setting up an SSH Server (sshd)

Install cygwin (http://cygwin.com)

  • include openssh and openssl
  • add c:\cygwin\bin to the PATH
  • chmod +r /etc/passwd
  • chmod u+w /etc/passwd
  • chmod +r /etc/group
  • chmod u+w /etc/group
  • chmod 755 /var
  • touch /var/log/sshd.log
  • chmod 663 /var/log/sshd.log

Configure the SSH Daemon

Linux Ubuntu change datadir / database location dir in 5 minutes Move mysql database to other path

Open the terminal
Stop MySQL with the command

  • /etc/init.d/mysql stop

Move existing data directory (which is located in /var/lib/mysql) to new dir /usr/new_datadir using the command

  • mv /var/lib/mysql /usr/new_datadir

Create symlink from new dir to old one

Add a Linux NFS Drive

Plug the drive into the NFS Server and allow it to auto-mount (or manually mount it if necessary).

Install the NFS utils on the NFS Server:

  • apt-get install nfs-kernel-server portmap

Update the /etc/exports file on the NFS Server to share the drive that is mounted at /media/backup:

  • /media/backup 192.168.0.1/24(rw,sync,no_subtree_check,no_root_squash)

On the PC wanting to mount the drive /media/backup, create a local directory called /media/backup (it could be named something different):

Split MySQL Dump File into multiple files

awk '/CREATE TABLE/{f=0 ;n++; print >(file="out_" n); close("out_" n-1)} f{ print > file}; /CREATE TABLE/{f=1}' sql_file

Autologin to SSH server without Password prompt (Linux)

  • ssh-keygen -t rsa
  • ssh remote_user@remote_server mkdir -p .ssh
  • exit
  • cat .ssh/id_rsa.pub | ssh remote_user@remote_server 'cat >> .ssh/authorized_keys'

Now you should be able to "ssh remote_user@remote_server" without being prompted for a password.

Pages

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer