The HOWTO will show how to automate the backup of your local MySQL server on a daily basis. The backup process uses a bash script and the local logrotate functionality to achieve an automated systems. The backup is processed daily via cron (see /etc/cron.daily/logrotate).
While this HOWTO is written for a local development environment it could easily by modified for remote multi-server environments.
Create a file at /usr/local/sbin/backup_mysql.sh using your favorite text editor. I use joe:
I recently downloaded and installed the latest version of Eclipse (3.4.0 aka Ganymede) and ran into some issues when trying to get Subclipse (plugin for subversion) up and running.
Initially I was getting the following error message when accessing Windows->Preferences->Team->SVN->SVN Interface dropdown:
JavaHL (JNI) Not Available
When attempting to view a repository via the "SVN Repository Exploring" perspective I got a different error message:
Unable to load default SVN client
Setting auto properties (auto-props) allows for specific files to have unique properties applied such as mime types (svn:mime-type), end of line (svn:eol-style), and my personal favorite: svn:keywords.
I use svn:keywords to automatically update the following fields that I store at the top of each code file: "LastChangedDate LastChangedRevision LastChangedBy Id". Each time I commit a file relevant data is updated on the file itself that can tell me who last committed changes and when they did. As well the version number is updated.
There are many times I have needed a secure SSL/TLS connection to access web resources but do not want to buy a SSL/TLS certificate. Creating a self-signed SSL/TLS certificate helps streamline the process of accessing the secure resource by removing the annoying security message on your browser. When you connect to a self-signed SSL/TLS connection you will be given to option to allow the certificate for all future sessions. Now when you connect to your secure resource there will be no extra steps to gain access.
To create a self-signed SSL/TLS certificate for secure HTTPS connections with Apache there are four steps:
During an upgrade of Ubuntu my printing capability was suddenly cut short. A red sign appeared on my printer icon on my task bar and any printed documents would be queued but not printed.
A quick look in /var/log/cupsd/error_log gave the following clue:
Filter "brightq-CPCA" for printer "print" not available: Permission denied
Download the Micropolis source (micropolis-activity-source.tgz) from http://www.donhopkins.com/home/micropolis/.
Install the following packages:
sudo apt-get install libx11-dev libxpm-dev x11proto-xext-dev libxext-dev
Micropolis requires yacc to compile properly. Bison is the recommended replacement package for yacc however errors were generated and Micropolis would not compile. I used the FreeBSD package freebsd5-buildutils instead:
sudo apt-get install freebsd5-buildutils
To generate random numbers with bash use the $RANDOM internal Bash function. Note that $RANDOM should not be used to generate an encryption key. $RANDOM is generated by using your current process ID (PID) and the current time/date as defined by the number of seconds elapsed since 1970. The range of returned values is 0 to 32767.
This will return a number between 1 and 100:
NUMBER=$[ ( $RANDOM % 100 ) + 1 ]
Here is a function to dynamically imitate a die:
#!/bin/bash
function roll_die() {
# capture parameter
declare -i DIE_SIDES=$1 I came across another issue on my Compaq Presario C500 laptop with regards to the audio. An issue exists with the Intel 82801G (ICH7 family) High Definition Audio (HDA) audio controller with regards to the headphones. When plugging in the headphones the sound continues to come out of the laptop speakers. There is a simple and quick fix to this issue:
Edit the /etc/modprobe.d/alsa-base f/etc/modprobe.d/alsa-base file:
sudo gedit /etc/modprobe/alsa-base
At the end of /etc/modprobe.d/alsa-base add the following:
While installing the subversion plugin Subclipse in the Eclipse IDE I came across a problem. Subclipse uses "JavaHL (JNI)" to interface with subversion by default. This default setting generates an error when accessing the "Window->Preferences->Team->SVN" preferences:
Failed to load JavaHL Library. These are the errors that were encountered: no libsvnjavahl-1 in java.library.path no svnjavahl-1 in java.library.path no svnjavahl in java.library.path java.library.path = /usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386/client::/ usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386::/usr/lib/firefox:/usr/lib/ firefox/:/usr/java/packages/lib/i386:/lib:/usr/lib
During the installation of Ubuntu 7.10 on a Compaq Presario C500 laptop I ran into an issue with the sound not working. I could not find any useful information while searching the forums. Many tips and advice spoke of editing the /etc/modprobe.d/alsa-base file to load an Intel specific module to no avail.
The installation went without any hitches and was remarkably fast. After installing the Ubuntu Linux operating system I rebooted. The first sign that something was not working correctly came just after the GRUB boot loader screen. Here is what I saw: