Category: Linux
How To Turn Off Your Monitor Via Command Line in Ubuntu
As previously written on this blog, I have set up a display in our lobby at work to display the day’s current events and meetings using Ubuntu and a tiny PC. Since this is a display which is on all day, the screensaver and monitor blanking (and other Energy Star features) are all turned off. [...]
Convert Windows or DOS Encoded Files to Unix/Linux. (ANSI to UTF-8)
Windows files and Unix files (Redhat, Ubuntu, etc) are encoded in different ways. Namely, the end of line that is a part of most files created in Windows is not compatible with Unix. You can usually see this because there is a ‘weird character’ at the end of each line. ‘cat’ does not show it, [...]
Installing VirtualBox on a PAE Kernel System
I recently got stuck while trying to install Headless Virtualbox on a Centos 5.2 server per the directions at Howtoforge here. The RPM failed with the error that it couldn’t find the kernel source. I thought I had already installed kernel-devel, and confirmed that I did. The instructions were to define the KERN_DIR variable like [...]
HOWTO: Installing ZFS and setting up a Raid-Z array on Ubuntu
Readers should note that this applies to Ubuntu 8.10 Intrepid Ibex only! ZFS is a relatively new filesystem created by Sun. It is released under the CDDL License which is incompatible with Linux’s GPL License, meaning that it can not be installed natively in the kernel. Therefore, for not it is relegated to addon packages [...]
Problem installing PECL PHP extensions while /tmp is secured
I recently tried to install a PHP PECL extension on a server I manage, when I received this error: [root@xxxx PDO-1.0.3]# pecl install pdo downloading PDO-1.0.3.tgz … Starting to download PDO-1.0.3.tgz (52,613 bytes) ………….done: 52,613 bytes 12 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension [...]
Simple Redirect Subdomain to a Directory
If you are running Apache for your web server, and mod_rewrite is installed (this is a pretty typicaly module on all installations) this is actually pretty easy. RewriteEngine on RewriteCond %{HTTP_HOST} ^subdomain\.yourdomain\.com RewriteRule ^(.*)$ http://www\.yourdomain\.com/subdomain/$1 [L] Add this code to your apache configuration file – the easiest location is in the .htaccess file in your [...]
Set Operations Using Bash Commands
Found a great post over at good coders code, great reuse. This one deals with performing operations on sets using only unix (bash) command line operations on files of text. * Set Membership. Test if an element belongs to a set. * Set Equality. Test if two sets contain the same elements. * Set Cardinality. [...]
Some Rights Reserved 2012