Archive for the ‘Operating System’ Category

Effectively repair MySQL Tables

on Wednesday 27th January, 2010 Gabe speculated thusly…

$ cd /var/lib/mysql

find -type f -name '*.MYI' -exec myisamchk --silent --force --fast --update-state --key_buffer_size=64M --sort_buffer_size=64M --read_buffer_size=1M --write_buffer_size=1M {} \;

Posted in Development, HowTo, Information, Linux, MySQL, Operating System, Programming

No Comments »

Access denied for user ‘debian-sys-maint’@'localhost’ (using password: YES)

on Tuesday 26th January, 2010 Gabe speculated thusly…

Find your debian-sys-maint password in /etc/mysql/debian.cnf.

GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY ' ' WITH GRANT OPTION;

Replace with your debian-sys-maint password.

Posted in Debian, Development, MySQL, Operating System, Ubuntu

No Comments »

Clicking on a GVFS link opens in Firefox

on Thursday 22nd October, 2009 Gabe speculated thusly…

For some reason servers that I connected to using FTP with gnome-vfs would open in Firefox. Odd really.

I fiddled about and eventually developed a filesystem level fix. Just go to the folder:
~/.gconf/desktop/gnome/url-handlers
And delete the ftp folder!

Posted in Debian, Information, Linux, Operating System, Ubuntu

No Comments »

VirtualBox 3 Transparent Background on Ubuntu Jaunty

on Tuesday 30th June, 2009 Gabe speculated thusly…

I upgraded to VirtualBox 3 and then my windows guest went wrong.

First of all, you have make sure the latest version of compiz installed.

Go to CompizConfigs Settings Manager and look for “Windows Rules” under Windows Management category. Enable “Windows Rules” and go to “No ARGB visuals” use Window Class, click Grab and then click in virtualbox window.

Posted in Information, Linux, Operating System, Ubuntu

3 Comments »

Using APG to generate secure, pronuncable passwords.

on Friday 12th June, 2009 Gabe speculated thusly…

The following command will generate several passwords with the following properties:

  • Length of 10 characters
  • Contain a mixture of upper and lowercase characters
  • Contain at least 1 number
  • Completely random most likely not in the dictionary (expect by random luck)
  • Pronounceable

This makes these passwords easier to remember but very difficult to brute force. They are ideal as passwords for logging in to machines, servers, routers, etc.


$ apg -m 10 -x 10 -a 0 -M NCL -t

Posted in Information, Linux, Server

No Comments »

Using SSHFS with Bazaar (Bzr) or Git

on Thursday 4th June, 2009 Gabe speculated thusly…

I use SSHFS to mount remote drives locally. The remote computers don’t have Bzr installed, and it’s difficult to get them up to date enough to install the latest Bzr. Therefore, I execute Bzr on my local computer on the mounted filesystem. Using default mount options for SSHFS leads to errors in both Git and Bzr, this is because (I believe) SSHFS doesn’t directly support file renaming. It is possible to avoid these problems by using the -oworkaround=rename switch with the mount command.

As an example my mount command looks similar to this:
sshfs -oworkaround=rename user@computer1:/var/www /media/computer1

Posted in Bazaar, Git, Information, Linux, Operating System, Programming, Revision Control, Server

No Comments »

Apache Virtual Hosts on OS X Leopard

on Sunday 31st May, 2009 Gabe speculated thusly…

If you develop multiple sites and you need virtual hosting functionality, scroll down to the end of the /private/etc/apache2/httpd.conf file and uncomment the following:

# Include /private/etc/apache2/extra/httpd-vhosts.conf

Next, you’ll need to setup whatever virtual hosts you have in the virtual hosts file /private/etc/apache2/extra/httpd-vhosts.conf

You need to make an entry in the httpd-vhosts.conf file like so:

<virtualhost *:80>
   ServerName beta-site-1.com
   ServerAlias www.beta-site-1.com
   ServerAdmin webmaster@beta-site-1.com
   ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
   CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common

   DocumentRoot "/Library/WebServer/beta-site-1"
   ScriptAlias /cgi-bin/ "/Library/WebServer/beta-site-1/cgi-bin"
   
     Options FollowSymLinks MultiViews Includes
     AllowOverride All
     Order allow,deny
     Allow from all
   
</virtualhost>

The examples provided by Apple in the vhosts file are slightly incorrect and if you use the CustomLog lines as is you will get errors the following errors if you run: apachectl -t -D DUMP_VHOSTS:
Syntax error on line 40 of /private/etc/apache2/extra/httpd-vhosts.conf:
CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" clause (see docs)

This is because
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log common

Should actually read:
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common

Posted in Development, Frameworks, HowTo, Information, Leopard, Linux, OS X, Operating System, PHP, Server, Ubuntu

2 Comments »

Get PHP MySQL working on Leopard OS X

on Sunday 31st May, 2009 Gabe speculated thusly…

Installing MySQL on OS X has become infinately easier since you can now download an Apple DMG from the MySQL website which takes care of the fine detail.

However, one thing that changed with Leopard is the socket for Mysql. It moved to /private/tmp, so you may need to configure your php.ini file to point it to the new location.

To do so, open the file /private/etc/php.ini, (if no such file exists, then make a copy of /private/etc/php.ini.default and rename it to php.ini) and edit that.

You have two lines to modify:

mysql.default_socket =

becomes:

mysql.default_socket = /private/tmp/mysql.sock

and mysqli.default_socket =

becomes:

mysqli.default_socket = /private/tmp/mysql.sock

Posted in Information, Leopard, MySQL, OS X, Operating System

No Comments »

Add items to environment path on OS X Leopard

on Sunday 31st May, 2009 Gabe speculated thusly…

Go to terminal and type:
vim ~/.profile

Assuming you want to add the path /usr/local/bin make .profile look like this:
PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

Separating each item with a colon.

Posted in Information, Leopard, OS X, Operating System

No Comments »

Getting Java plugin to work in FireFox 3 on Ubuntu 9.04 Jaunty Jackalope

on Wednesday 27th May, 2009 Gabe speculated thusly…

Ensure that you have the package sun-java6-jre installed and then run the following command from a terminal:
sudo ln -s /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox-3.0.10/plugins/

You will need to restart FireFox after this and Java should be working for FireFox now.

Posted in Information, Linux, Operating System, Ubuntu

No Comments »