Skip to main content

Posts

Showing posts from January, 2012

Faster transactions in PostgreSQL

First of all: BE WARNED!   These settings are not recommended for all of you (if any) in production as they might cause you data corruption or loss in case of sudden hardware failure. I would on suggest to have these settings used in a development environment, where you have to run many tests for your application which include database side create/drop transactions. My case here was that I ran so much database inclusive tests, that I got fed up with PostgreSQL's ~6s database creation time. So I just Googled it a few days how this could be done in a dev env. So here it is, you just set these two variables in your postgresql.conf file and reastart the database. fsync = off full_page_writes = off

How do I install my Nginx with Passenger

While there are pretty much use to run a project in standalone Passenger I'd rather run it with the web server of the production environment. My choice is Nginx . Not because of it's high load speed as I do not (yet) run any high visited websites or loaded applications, but I have found it's configuration simpler then Apache's. Yes, not modular, you cannot enable, disable some things in runtime, but hey I do not really need that either. So basically I download the nginx source, extract it somewhere. Install the passenger gem. Then run this command: rvmsudo passenger-install-nginx-module If it finds every package installed - note that you might need  libpcre3 and libpcre3-dev  packages too on Ubuntu - then I choose the option 2 which will let me configure nginx further. When it asks for the extra arguments for configure I use these: --prefix=/etc/nginx --user=www-data --group=www-data --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-pa...

Mount Windows share on Ubuntu with CIFS

The package that is needed to be installed is called smbfs . For permament mount at every boot add something like this to /etc/fstab : //192.168.0.65/privatefolder /media/servfolder cifs username=xxxxx,password=yyyyyy,uid=1000,gid=1000,file_mode=0777,dir_mode=0777noserverino,rw,nolinux,iocharset=utf8 0 0 As a shell script, the command would be like this: mount -t cifs //192.168.x.x/hostdir /opt/clientdir -o username=hostuser,password=hostuserpass,uid=1000,gid=1000,file_mode=0664,dir_mode=0775,noserverino,rw,iocharset=utf8