This page is a repository for my notes. Use at your own risk!

Downgrading PHP in Ubuntu 10.04

June 22nd, 2010
Comments Off
  1. Install Apache, Mysql, PostgreSQL as normal.
  2. Add Karmic repositories in the apt sources file.
  3. Load Synaptic and refresh the list.
  4. Find the php common package and from the package menu, click Force Version.
  5. Choose the Karmic package and press OK.
  6. Install the package.
  7. Lock the package.

Repeat these steps for the other PHP modules and related files.  I had to do them one at a time, closing Synaptic in between installation due to “broken package” errors.

NOTE: Running apt-get upgrade will ignore your locked packages, make sure you “pin” them in apt as well, or symlink the /etc/apt/preferences to /var/lib/synaptic/preferences (see related post)

admin Linux Tutorials

Make apt respect your pinned or locked versions

June 22nd, 2010
Comments Off

In ubuntu 10.04, I noticed if I locked a package using Synaptic,  running apt-get upgrade would ignore the lock and attempt to upgrade locked packages.  I solved this, by creating a symlink in “/etc/apt”.

I ran “sudo ln -s /var/lib/synaptic/preferences preferences” in /etc/apt

admin Linux Tutorials

Automatically repeating a command in Linux

October 19th, 2009

Sometimes it’s nice to watch a folder or service without repetitively running the command and hitting enter over and over.  Use  the command Watch to automate this task.  Below is an example to watch ps aux while grepping for “ssh”

watch -n 1 “ps aux | grep ssh”

admin Linux Tutorials

High Pitch Whine running Ubuntu on a MacBook Pro

September 23rd, 2009
Comments Off

After installing Ubuntu 9.10 Alpha 6 on my Macbook Pro, I found that whenever the machine was idle, it would produce a high pitched whine that sounded like it could be caused from by the fan or speaker.  I tried several “fixes” online which included changing the power saving settings in grub, but nothing worked until I found a post which recommended changing alsa’s power save settings which worked great.

Solution:

  1. Open /etc/modprobe.d/alsa-base.conf
  2. Find the line: options snd-hda-intel power_save=10
  3. Change the value from 10 to 0
  4. Reboot

NOTE: For Ubuntu 10.04 (Lucid) add the following instead of step 2:
options snd-hda-intel power_save=10 power_save_controller=N

admin Linux Tutorials ,

Removing .svn Folders Recursively

July 7th, 2009
Comments Off

While porting projects to Git, I needed a way to remove all of the .svn folders in each project.  I don’t need the archived svn data in this case so it is safe to simply remove all folders labeled: ‘.svn’.

Use Find to locate the svn folders
find . -name ‘.svn’

Append the argument rm -R to remove them
find . -name ‘.svn’ | xargs rm -R

admin Linux Tutorials