Posts Categorized: Uncategorized

autofs mounting WIndows Shares on CentOS 5

Create a directory for the mountpoint: mkdir /mnt/mywinserver Temporarily mount: mount -t cifs // /mnt/mywinserver -o username=jonny,password=letmein For a more permanent mount  edit /etc/auto.master file add a line like: /mnt/mywinserver /etc/auto.mywinservermount Edit /etc/auto.mywinservermount and add the following: LogFiles -fstype=cifs,user=jonny,password=letmein :// Protect the /etc/auto.mywinservermount file: chmod 600 /etc/auto.mywinservermount Access the mount to check it is working:… Read more »

Ubuntu ATI Graphics Driver

I had a few difficulties with playing video on Ubuntu with false/inverted colours so the reds were blue, and also so jitters in the video play.I followed the instructions here: and for the time being the videos are playing correctly.

cPanel and mod_security

cPanel allows for adding some apache and PHP modules using the web interface (and a script they call easyapache). This can be found under Software > Apache UpdateAfter installing mod_security the main configuration file is found at: /etc/httpd/conf/modsec2.conf which includes a blank file /etc/httpd/conf/modsec2.user.conf I downloaded the mod_security ruleset from wget and copied these… Read more »

Using Several Servers with phpMyAdmin

To use the same phpMyAdmin installation to service several MySQL servers edit the file and add the following lines – don't forget the $i++ line: $i++;$cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['host'] = '';$cfg['Servers'][$i]['connect_type'] = 'tcp';$cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['extension'] = 'mysql';

Test SMTP with Telnet

Useful for finding problems with new installations. telnet 25. Key in “EHLO” and press enter. Key in “MAIL FROM:” and press enter. Key in “RCPT TO:” and press enter. Key in “DATA” and press enter. Optionally add envelope headers (and leave a blank line between these header values and the message… Read more »

Slow SSH Logins

On a new CentOS 5.1 install there was a dleay while logging in via SSH. Using the -v option i.e. # ssh -v jonny@servername gave more verbose output with the following messages: debug1: Authentications that can continue: publickey,gssapi-with-mic,passworddebug1: Next authentication method: gssapi-with-micdebug1: Unspecified GSS failure.  Minor code may provide more informationNo credentials cache founddebug1: Unspecified… Read more »

MySQL Logging Notes

Enabling some extra logging options on MySQL is useful for temporary close analysis of what is actually going on with your server and applications. Logging Slow Queries To switch on the logging of queries which take a long time (default 10 seconds) enter the following line into my.cnf: [mysqld] log-slow-queries This will give details on… Read more »

SSH Tunneling with a MySQL Example

SSH tunnelling can be used to secure communications of non-secure protocols between two computers. For the purposes of this example I have a server running MySQL which I will call . The default port for MySQL is 3306 but by default it does not listen to external requests, only to localhost requests. This is… Read more »

Apache Proxy Pass on Ubuntu

The Apache module mod_proxy can be used to 'reverse proxy' requests through an Apache server to another server. This is most useful when proxying requests to a server behind a firewall which is not directly accessible from the internet. In this example there are 2 servers and There is an application running at… Read more »