Archive

Archive for November, 2008

How to View a Specific Page or Section of Manpage

November 30th, 2008 Masao No comments

For example, the “kill” manpage shows:

SEE ALSO
bash(1), tcsh(1), kill(2), sigvec(2), signal(7)

This is how to view section 7 of the “signal” manpage:

man 7 signal

Categories: Bash, Linux Tags:

How to keep SSH sessions alive

November 30th, 2008 Masao No comments

Edit your ssh_config file like this:

/etc/ssh/ssh_config

ServerAliveInterval 30

This will cause your SSH client to send a keep alive ping every 30 seconds to the server.

Categories: Linux, SSH Tags:

Extract parts of string into array using Perl regular expression

November 25th, 2008 Masao No comments

How to go directly from string to an array using Perl Regex extraction:

my ($first, $second, $third) = ( $string =~ /not(.*?)this(.*?)stuff(.*?)/ );
Categories: Perl Tags:

Disable auto commenting in VIM using the .vimrc file

November 25th, 2008 Masao 1 comment

Combined some tips together to figure this one out.

Put this into your .vimrc file:

au FileType * setl fo=cql

I’m using VIM version 7.1.12

Categories: Linux, VIM Tags:

Minimal PhpMyAdmin new server config

November 24th, 2008 Masao No comments

Besides the boilerplate at the top, here’s the least you need to add another database server to the dropdown list in PhpMyAdmin:

$i++;
$cfg['Servers'][$i]['auth_type'] = ‘cookie’;
$cfg['Servers'][$i]['host'] = ‘my.host.com’;

Categories: Linux, PhpMyAdmin Tags:

Munin MySQL plugin not working or blank graphs

November 23rd, 2008 Masao No comments

Add a user “nobody” only accessible via “localhost” with no password and only “usage” privileges.

If you look at the MySQL log, you will see the munin client accessing MySQL via the “nobody” user.

To test the munin client, connect to your client via telnet:

$ telnet localhost 4949

Categories: Linux, Munin, MySQL Tags:

How to fix sshfs “Connection reset by peer”

November 16th, 2008 Masao No comments

Clear out the /etc/hosts.deny file on the destination server

Also, make sure these lines are uncommented in your sshd_config file on the destination server:

/etc/ssh/sshd_config:
Subsystem       sftp    /usr/libexec/openssh/sftp-server
DenyGroups nossh

Restart sshd.

Categories: Linux, SSHFS Tags: