Search Results

Linux hardware clock

You can use hwclock to synchronise the system clock with the hardware clock: hwclock –show read hardware clock and print result –set set the rtc to the time given with –date –hctosys set the system time from the hardware clock –systohc set the hardware clock to the current system time

Using mod_proxy to avoid DNS propagation during site migration

There are a number of ways to migrate a site to a new server, whilst avoiding downtime or data concurrency issues. For a highly dynamic site, generally I would edit the old and new site connection strings to both use the same database during switchover.  mod_proxy is a useful method perhaps if a new version […]

qmail adds number to recipient header

qmail sometimes adds a number to the recipient header when delivering mail locally, so for example, may become  This isn’t such a problem when mail is just being used locally, but if your using a POP connector to download mail to an Exchange server for example it will cause issues with it getting […]

Auto restart IIS when service unavailable

A bit crude but it works.  Make a schedule task for this batch file: del testsql1.asp C:\wget\wget.exe –timeout=30 –tries=1 find /C “SQLServer Test Code 1″ testscript.asp IF ERRORLEVEL 1 IISRESET /RESTART /TIMEOUT:120 /REBOOTONERROR

Installing Ruby on Rails on Plesk

To Install Ruby on Rails on a Plesk Server: yum groupinstall “Plesk 8.1 Ruby” yum install psa-miva (If Miva required) yum groupinstall “Plesk 8.1 FastCGI” (if FastCGI required) To Configure Ruby on Rails on a Plesk Server: 1. Create a domain in Plesk with Physical hosting. 2. Ensure that bin/bash access is enabled. 3. Ensure […]

Plesk 9 Backup Utility Broken

After an upgrade to Plesk 9 you cannot schedule backups and get the following error: Unable to update scheduled backup information: MySQL query failed: Unknown column ‘backup_time’ in ‘field list’ Just run the following and it will reinstall them and correct the database: yum erase psa-backup-manager psa-migration-manager yum install psa-backup-manager psa-migration-manager service psa restart

MySQL Log slow queries

edit /etc/my.cnf: log-slow-queries=/var/log/mysql-slow.log set-variable=long_query_time=6 restart mysqld

General Exim Commands and Info

exim -bp ⇒ show queue entries (like mailq for sendmail) exim -bpc ⇒ no of emails currently mail queue have exim -M email-id ⇒ Force delivery of one message exim -qf ⇒ Force another queue run exim -qff ⇒ Force another queue run and attempt to flush the frozen messages exim -Mvl messageID ⇒ View […]

RDP keep console session

To get the console session by remote desktop on a server remotely to guarantee you get the same session every time: mstsc /v: /console Some RDP managers also have a console flag built in.

Recursively change file permissions

If you chmod -R it will recursively chmod everything whether it be a file or directory. A more sensible way is: # Change directories find . -type d -exec chmod 755 {} \; # Change files find . -type f -exec chmod 644 {} \; Obviously chowning is similar: find . -type f -exec chown […]