Archive | linux RSS feed for this section

20 April 2009 0 Comments

Trixbox blue screen after probing video card

I was experiencing an error during an installation of Trixbox 2.6.2.2 whereby it would lock up with a blue screen after the keyboard language selection / probing video card steps. Initially I thought it was a faulty CD, but after burning 3 copies with 2 computers, I would get the same problem every time.
This thread [...]

Tags:
24 February 2009 7 Comments

Creating a Virtual Host with Webmin

These instructions apply to Webmin version 1.450

Create a folder where you wish to store your sites files. 

You can do this in the Others > File Manager section. 
We typically use something like: /sites/domainname.com/http/

Setup the vhost.

Click on Servers > Apache Web Server in the left hand menu.
Click the “create virtual host” tab.
You can leave most settings as [...]

27 December 2008 5 Comments

A script to reset the MySQL root password

It’s a pain if you ever forget your MySQL root password. Fortunately it’s a fairly straightforward process to reset it, here’s how:

pkill -9 mysqld;
echo "UPDATE mysql.user SET Password=PASSWORD(‘MyNewPass’) WHERE User=’root’;
FLUSH PRIVILEGES;" > /tmp/reset-pass.sql
mysqld_safe –init-file=/tmp/reset-pass.sql &
sleep 10
pkill -9 mysqld;

A bash script to reset the mysql root password
To make the process easier, I’ve wrapped these commands up [...]

10 December 2008 0 Comments

Spam score an e-mail from the command line

To test the spam score for an e-mail without sending it, install a copy of Spam Assassin then run:

[root@mail ~]# spamc -c < testemail.txt
-1.0/5.0

Where testemail.txt is the raw message source.

3 October 2008 0 Comments

Running mysqldump via ssh (direct host to host copy)

In order to run a mysqldump from one host to another over SSH you can run:

mysqldump dbname | ssh root@remotehost.com “mysql -D dbname”
This will pipe the output of mysqldump directly to the ssh connection which is running MySQL at the other end and receiving the mysqldump from standard input.

10 September 2008 0 Comments

Generating a Certificate Signing Request

When applying for a secure certificate you will need to generate a certificate signing request (CSR). If you are renewing an existing certificate you might want to keep your existing private key, if it’s a new certificate then you will probably need to create a new private key.
If you have previously registered a secure [...]

3 September 2008 3 Comments

When sudo echo ‘test’ > /root/test gives permission denied

If you get a permission denied error when trying to redirect the output of a sudo command then the reason for this is normally because the superuser permissions only apply to the first part of the statement, e.g. the echo command. They do not carry through to the bash redirection.

paul@backups:~$ sudo echo ‘test’ >> [...]

5 July 2008 0 Comments

rtorrent: Error in option file

My bit torrent client of choice is rtorrent, which runs from the command line. I have been using it without problems for months, but today it stopped working and gave an error instead:
rtorrent: Error in option file: ~/.rtorrent.rc:4: Not a value
It seems that the rtorrent developers have made some changes to the way it handles [...]

29 June 2008 0 Comments

Killing Processes

Previously if I had wanted to kill a bulk list of mysql processes I would have done something like:
ps auxww | grep ^mysql | awk ‘{print $2}’ | xarg kill -9
Today I discovered two really handy commands that make listing and killing processes a lot easier, pkill and pgrep.
You can achieve the same result as [...]

1 May 2008 18 Comments

Setting up asterisk-gui on Ubuntu

Tonight I had a go at installing Digium’s asterisk-gui. I followed some instructions from Asterisk Guru, but then had to apply a fix at the end because the static-http folder was in the wrong place.
Installation Instructions
Download the asterisk-gui source code from SVN:

mkdir -p ~/downloads/asterisk-gui
cd ~/downloads/asterisk-gui
svn checkout http://svn.digium.com/svn/asterisk-gui/trunk .

Compile the source code:

./configure
./make
./make install

Backup your asterisk config:

cp [...]