Initial Ubuntu 8.04 Linux Setup 1
After grabbing and installing Ubuntu 8.04 I then had to put together and setup the baby, luckily I wrote down most of everything I did in case I’d have to do it again and to help out you guys.
What follows are my findings and what I did to fix them. The machine I used is an HP Pavillion dv2000 model dv2742 special edition. It’s got a built-in intel graphics card, 3gb memory, sata 250gb drive, wifi, bluetooth and an intel dual core 2 processor.
I installed the o/s using the 64-bit edition of Ubuntu 8.04 Hardy Heron, all what you see below are workable settings which provided the right setup; hope they help your situation if you go down this route.
Update System
First port of call, check for any new updates post-install,
sudo aptitude update
sudo aptitude upgrade
Dependencies / Software / Setup
Next, install Ruby, FlashPlayer, GCC Compiler, MySQL, JAVA, SqlLite,
sudo aptitude install mysql-server flashplugin-nonfree ruby-full libsqlite3-dev build-essential libmysqlclient15-dev sun-java6-jdk
Volume Mixer,
sudo aptitude install gnome-alsamixer
ImageMagick,
sudo aptitude install imagemagick
Ruby Gem Handler
I could get GEM from the repositories but because with each new update it breaks away from the in-built Linux installer it’s best to install it from source,
wget http://rubyforge.org/frs/download.php/34638/rubygems-1.1.0.tgz
tar xzvf rubygems-1.1.0.tgz
cd rubygems-1.1.0
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
Had problems updating the GEM system initally, so logged in as root to finish it off,
su root
sudo gem update --system
Now when you type gem –version you should see GEM ready to roll,
Gem Libraries
The slow bit, ran this as root just to make sure it worked,
gem install rails
gem install rake
gem install mongrel
gem install mongrel_cluster
gem install thin
gem install capistrano
gem install mysql
gem install termios
gem install sqlite3-ruby
gem install mini_magick
VLC + GIT
Next VLC to play videos,
sudo aptitude install vlc
Transmission for torrents, most important bit,
sudo aptitude install transmission
And GIT to handle code versioning,
sudo aptitude install git-core
Firefox + MS Fonts
Next I need Firebug for Firefox 3. Ubuntu 8.04 comes with Firefox 3 beta 5, the one available thru Tools / Add-ons won’t work with it; but thankfully it’s in the repositories
sudo aptitude install firebug
And you’ll probably need Microsoft Fonts later down the line,
sudo aptitude install msttcorefonts
Pimp GEDIT
The default Gnome Text Editor Isn’t bad but let’s add some extra’s to really kick it in gear,
sudo aptitude install gedit-plugins
And tweak it,
wget http://robzon.kapati.net/rails/rhtml.lang && sudo mv rhtml.lang /usr/share/gtksourceview-2.0/language-specs/
wget http://robzon.kapati.net/rails/rails.xml && sudo mv rails.xml /usr/share/mime/packages
sudo update-mime-database /usr/share/mime
Follow the guide here to get the TextMate look,
Now when you open rails source files they’ll actually look right, thanks Grigio.
PostGreSql + Thunderbird
Pretty easy to install the most powerful db system, and the better email handler
sudo aptitude install postgresql thunderbird
Wine for Windows
Thanks to Google for their support the Wine project is going great, to get Windows software running natively on your machine,
First add the key,
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
Then add the repository to your default repository list,
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.list
And finally install it,
sudo apt-get install wine
Effects
To enable compiz effects make sure Appearance / Visual Effects is set to ‘Extra’, then install the Advanced Effects Manager,
sudo aptitude install compizconfig-settings-manager
This will give you access to the 3d cube, skydome effect and a host of other cool addons.
My desktop dpi is set to 100dpi, fonts set to ‘Bitstream Vera Sans Roman 8pt’, with ‘Bitstream Vera Sans Bold 8pt’ for Windows Title; and ‘Liberation Mono 8pt’ for fixed width font. Using subpixel smoothing for LCD.
Sound
For my laptop (hp pavillion dv2000 / dv2742se model), i had to use a different sound mixer to make sure the quickplay volume and mute buttons talked to the sound system.
So from the top menu bar, System / Preferences / Sounds, then set the Default Mixer Tracks hander device to: Conexant CX20561 (hermosa) (oss mixer).
Cleanup
To get any temp files carried on from the install, clean with,
sudo aptitude clean
Job done, however I had a problem with Hibernate & Suspend which was lucky fixed with some advice from here
EveryBlock - whats going down in the hood?

Good site to use when planing your next vacation, flack jackets optional.
Built with Python and powered by the PostGreSql database engine it’s certainly an advanced webapp, with custom maps built specifically for the job using a number of open-source tools like MapNik & TileCache it’s no slowcoach to technology; good work!
Installing MySQL on Vista 14
Easy it aint, kept getting this…
The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail.
But here’s how to fix it,
Get MySQL
First download MySQL
Install MySQL
Now unzip the executable and install it, when it’s finished and asking you if you want to run the configuration tool, don’t; we’ll deal with this in a minute.
Install Resource Hacker
Now to fix the MySQL Instance Configuration Tool, so it will install the MySQL service in Vista, download Resource Hacker…
Unzip it and open it’s folder, then Right-Click on ResourceHacker and Run as Administrator.
Edit Resources
Now using Resource Hacker open the file…
- C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe
Navigate to 24 / 1 / 1033 and look at the config on the left. On line 6 you should see asAdministrator, change this to requireAdministrator then click Compile Script; then finally Save the file.
Run MySQL Instance Config
Finally run the MySQL Instance Configuration tool from within…
- C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe
This should now be able to create the system service and finally give you MySQL running on Windows Vista.
Rails Sessions

To make a truly intelligent web application your gonna sooner or later have to play around with Sessions, which is basically a Cookie’s big brother.
Store in DB
Now Rails initally will store all it’s session data in a text file within the /tmp/sessions directory of your rails app, which is usually ok, but if you’re gonna build a production-ready app you’re gonna want to up the ante somewhat and store them in your DB.
This is simply done by opening up your environment.rb file and un-commenting the following line…
(within /config/environment.rb)
config.action_controller.session_store = :active_record_storeThen in the command-line generate a RAKE DB migration for your Session objects (so they’re stored in your db from now on).
rake db:sessions:create
rake db:migrateBingo, you now have a table within your database hooked up and ready to store your session data perfectly.
Storing Session Objects
Now that you’ve got your DB storing your session data, why don’t we start creating some session objects.
This is done by…
session[:order] = 'ASC'Here, we’ve simply created a new session object, storing in it a text value of ‘ASC’; cool eh?
We can then check to see if our session is empty via…
if session[:order].blank?
..do stuff..So if our session object contains nothing we can initialise it correctly.
Common Gotcha
Now one of the good things with switching sessions over to your db is that it’ll secure your app a little bit better and your performance will improve.
Plus if your building your app on your dev machine, then transfer it to your live box, but can’t find a reason why your sessions don’t work there it’s usually down to file permissions for the session file; by switching sessions over to a db you remove any future problem of this.
Good eh,
Convert InnoDB > MyISAM and Back Again...
Convert Typo InnoDB > MyISAM
Simple script to convert your Typo database tables from InnoDB to MyISAM format.
use mytypo_production;
ALTER TABLE articles_tags ENGINE = MyISAM;
ALTER TABLE blacklist_patterns ENGINE = MyISAM;
ALTER TABLE blogs ENGINE = MyISAM;
ALTER TABLE categories ENGINE = MyISAM;
ALTER TABLE categorizations ENGINE = MyISAM;
ALTER TABLE contents ENGINE = MyISAM;
ALTER TABLE feedback ENGINE = MyISAM;
ALTER TABLE notifications ENGINE = MyISAM;
ALTER TABLE page_caches ENGINE = MyISAM;
ALTER TABLE pings ENGINE = MyISAM;
ALTER TABLE redirects ENGINE = MyISAM;
ALTER TABLE resources ENGINE = MyISAM;
ALTER TABLE schema_info ENGINE = MyISAM;
ALTER TABLE sessions ENGINE = MyISAM;
ALTER TABLE sidebars ENGINE = MyISAM;
ALTER TABLE sitealizer ENGINE = MyISAM;
ALTER TABLE tags ENGINE = MyISAM;
ALTER TABLE text_filters ENGINE = MyISAM;
ALTER TABLE triggers ENGINE = MyISAM;
ALTER TABLE users ENGINE = MyISAM;
Now What?
Change mytypo_production to your Typo database’s name.
Save it as convert.sql
Run it via,
mysql -u root
source convert.sql
You will get a load of check messages and hopefully no errors or warnings. If all goes ok you should now be over to MyISAM.
Convert Typo MyISAM > InnoDB
use mytypo_production;
ALTER TABLE articles_tags ENGINE = INNODB;
ALTER TABLE blacklist_patterns ENGINE = INNODB;
ALTER TABLE blogs ENGINE = INNODB;
ALTER TABLE categories ENGINE = INNODB;
ALTER TABLE categorizations ENGINE = INNODB;
ALTER TABLE contents ENGINE = INNODB;
ALTER TABLE feedback ENGINE = INNODB;
ALTER TABLE notifications ENGINE = INNODB;
ALTER TABLE page_caches ENGINE = INNODB;
ALTER TABLE pings ENGINE = INNODB;
ALTER TABLE redirects ENGINE = INNODB;
ALTER TABLE resources ENGINE = INNODB;
ALTER TABLE schema_info ENGINE = INNODB;
ALTER TABLE sessions ENGINE = INNODB;
ALTER TABLE sidebars ENGINE = INNODB;
ALTER TABLE sitealizer ENGINE = INNODB;
ALTER TABLE tags ENGINE = INNODB;
ALTER TABLE text_filters ENGINE = INNODB;
ALTER TABLE triggers ENGINE = INNODB;
ALTER TABLE users ENGINE = INNODB;
Also…
Also make sure you Tune your MySQL Install…
And optimize the Tables,




