Props to this site for the helpful info.
1. Configure your first static IP Address and Gateway information as normal inside of /etc/network/interfaces. If you have multiple static IP’s in the same subnet using the same gateway you should be fine to add them as sub-interfaces with no problems.
iface eth0 inet static
dns-nameservers 220.127.116.11 18.104.22.168
Continue reading "Linux – Policy-Based Routing Enables the Use of Multiple IP Default Gateways"
MySQL Activity Report is a handy database reporting tool that uses RRD (Round Robin Database) to display hourly, daily, weekly, and monthly graphs and gives helpful performance tuning recommendations for your MySQL installation. Here are the steps to install it from source on Ubuntu Server 12.04.3 while logged in as root. This assumes that you have the build-essentials, header files, etc necessary to build software already installed.
1. Change into your local source directory
2. Download the source files for rrdtool and mysqlard
3. Unzip the files
tar -zxvf rrdtool-1.4.8.tar.gz
tar -zxvf mysqlard-1.0.0.tar.gz
4. Change into the rrd directory
5. Install dependencies
apt-get install libpango1.0-dev libxml2-dev
6. Build rrdtool (will install to the /opt/rrdtool-1.4.8 directory)
Continue reading “Install MySQL Activity Report from Source”
I have a few servers at work that regularly get crashed tables so I created this script as a workaround until I have time to find the root cause of the problem. Run it as a cron job at your own interval.
Continue reading “Bash Script – Auto-Repair an Array of MySQL Database Servers”
Once again I ran into a situation where I was working on an extremely outdated server and the read command didn’t have the -a option to send contents into an array, so this is the solution I came up with.
Continue reading “Bash Script – Split a Variable into an Array with Carriage Return Line Feed as the Delimiter”
After running into permission issues trying to get PHP’s shell_exec command to chown call files as the asterisk user(which only root can do), I decided to make this script.
As a side note, you should be able to get the shell_exec command to work using sudo by adding the www-data user to the sudoer’s file without a password but that wouldn’t work in my particular environment. The server I was working on was extremely outdated and didn’t even have sudo installed.
Add this to /etc/sudoers
www-data ALL=NOPASSWD: /path/to/script
The following code runs the script as a daemon. You will need to update rc to start this script at default run levels and also make sure to chmod +x this file to make it executable.
# Move asterisk call file daemon startup script
# Author: Nathan Thomas
Continue reading "Bash Script – Move Asterisk Call Files into Spool Directory"
/etc/init.d/openmeetings startup script for Ubuntu Server 12.04.2
OpenMeetings Version 2.0-INCUBATING
A few notes:
– Make sure to change path for RED5_HOME variable
– Make sure to chmod +x the init script
– This assumes openmeetings is running under a user/group with the same name
– This assumes you are using libreoffice (not openoffice) for the whiteboard file import service
# Author: Nathan Thomas
### BEGIN INIT INFO
# Provides: red5
# Required-Start: $local_fs $remote_fs $network $syslog $named $time
# Required-Stop: $local_fs $remote_fs $network $syslog $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/stop OpenMeetings java based conferencing webapp
### END INIT INFO
DESC="Red5 flash streaming server"
# Plugin Variables
Continue reading "Startup Script for OpenMeetings Open-Source Video Conferencing Server"
The latest upgrade on Ubuntu 12.04 updates vsftpd to version 2.3.5 and they have made a change that requires the chroot directory to no longer be writable which produces this error when trying to connect. They have made an option called allow_writeable_chroot=YES in the latest build that had to be backported to use this functionality.
Continue reading “Fixing 500 OOPS: vsftpd: refusing to run with writable root inside chroot ()”
Edit the patch file
Insert these lines of code where it says “### INSERT THIS CODE HERE ###”
elif [ `cat /etc/issue | grep Ubuntu | wc -l` = 1 ]
if [ `which dpkg-query | wc -l` = 1 ]
Continue reading "BackupExec 2012 Linux Agent SP1 Patch Update – Ubuntu Fix"
Props to this site for pointing me in the right direction.
Install the BackupExec Agent as you would normally (./installralus) and the installation will complete successfully however the service will fail to start afterwards.
Change into ralus directory
Make a backup of libbesocket.so
#cp libbesocket.so libbesocket.so.orig
apt-get install binutils binutils-multiarch
Disassemble the binary to a file
#objdump -D libbesocket.so > libbesocket.asm
Continue reading “Install BackupExec 2012 Agent on Debian 3.0 Kernel”
Today I ran into some problems with a hard drive that failed in a machine and I needed to restore a Clonezilla image. Unfortunately, the destination partition happened to be smaller than the original image so I couldn’t use the wizard because it errored out claiming I needed to use the -C option. The only problem is that from within the wizard you don’t even have the option to use it. After some searching, I found a few sites that said to use partclone.restore -C -s – -o /dev/(path to partition) and that failed everytime but at least pointed me in the right direction. To make a long story short, here’s a lil’ somethin’ somethin’ that should accomplish our end goal. From the shell, do one of the following:
Continue reading “Manually Restore a Clonezilla Image When Destination Partition is Smaller than the Original”