Monthly Archives: July 2011


Apache2/MySQL on Ubuntu Configuration

Once you’ve installed apache2 and mysql on your server, you might want to try these configuration changes to make it perform a bit better: In /etc/mysql/my.cnf key_buffer = 16K max_allowed_packet = 1M thread_stack = 64K table_cache = 4 sort_buffer = 64K net_buffer_length = 2K And in Apache2′s config, /etc/apache2/apache2.conf, find the section for MPM prefork if yo have it and: StartServers 1 MinSpareServers 3 MaxSpareServers 6 ServerLimit 24 MaxClients 24 MaxRequestsPerChild 3000 The above are just some things to try if you encounter a situation where apache is using too much memory, or the same for mysqld.


Never Again! Backing up your rails .sqlite3 dbs

Well, with mysql, it’s pretty hard to overwrite your dbs, but with sqlite, it’s real easy. I did this, luckily I only lost about a days worth of work, but nevertheless, I have instituted a new rule for sqlite3 dbs: Hourly backups. Here’s the script: #!/bin/sh D=`date +%H` cp -f /var/www/app/db/production.sqlite3 /var/www/fapp/db/production.sqlite3.bak.$D


salor point of salor

Deploy Ruby on Rails to the Desktop (Ubuntu), as a Debian Package 1

Introduction to deploying Rails Applications to the Desktop Some things you’ll learn in this series of articles: How to distribute a Rails App to an Ubuntu Desktop How to Compile a custom Ruby installation to avoid conflicting with an existing Ruby install Get automatic updates to all users for free by virtue of being a Debian Package How to organize a build environment to make and distribute all Debian packages with a single command. How to build your own custom dumb browser in QT C++ (QT Creator now includes the ability to generate an HTML5 App, it didn’t when I started building Salor…) This is not a step by step tutorial, it’s a broad discussion, though I plan to make an example video with a hello world style app at a later date. Deploying Rails applications to the desktop, specifically unbuntu, though I plan to figure out how to do it with windows very soon, turns out to be much easier than I ever thought. While deploying Rails apps can kind of suck in comparison to other types of web-applications, it’s hardly any more difficult than any other kind of executable deployment. The reasons for using Rails for a desktop application are pretty obvious, ease of development, ease of maintenance, and Ruby can pretty much do anything you need it to do. For instance, in our application we use ruby to connect to a receipt printer and print out receipts, reports, labels and barcodes and more. Before you deploy a Rails app, you might give […]