apache: enable .htaccess support
Do the following in order to enable .htaccess support: 1. Check if the module rewrite_module is loaded: # httpd -M | grep rewrite_module (in FreeBSD) # apachectl -M | grep…
Create PDF files in Linux
CONVERT IMAGE FILES INTO A SINGLE PDF FILE Use convert (an utility that is part of the ImageMagick package) to convert a bunch of images into a single pdf file:…
Set up a master/slave replication in MySQL
Follow this step by step procedure to replicate a MySQL server (master) to another (slave): 1. CONFIGURE THE MASTER Enable binary log. To do this, add in / under section:…
Restoring and/or repairing GRUB
After reinstalling Windows in a dual boot machine, the GRUB boot manager usually stops working. To restore it, use the following procedure: 1. Boot from a Linux Live CD 2.…
Rename the label of a USB drive in Linux
To change the label of external USB drives (like flash memory cards) in Linux, follow these steps (use root user to perform these commands): 1. Install the package mtools: #…
How to flush / clear DNS cache
Here's how to flush the DNS cache (depending of the OS): In OS X For OS X and later: $ sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder For OS X…
SSH login without password
To enable access to a remote host requiring a password, follow this procedure: 1. Generate SSH keys in the local host # ssh-keygen -t rsa -b 2048 -N '' This…
SSH troubleshooting
ERROR: Permission denied (publickey). This message appears when the remote ssh server has password authentication disabled. To fix this, edit /etc/ssh/sshd_config to enable password authentication: PasswordAuthentication yes Restart the SSH…
FreeBSD: managing software
FreeBSD has in its repositories more than 25,000 applications available for installation. There are two methods of installation: Install from source (using ports) Great for maximum control, you can select…
FreeBSD: working with modules
List all loaded kernel modules: kldstat Load a module from the command line: kldload <module> NOTE: If the module is in the module search path, then just specifying the module…