Mobil Mewah

Salah satu sumber Inspirasi.

Tuesday, 17 December 2013

Repair WIndows 7 MBR boot record

I have Windows 7 installation, and try to dual boot with FreeBSD 9. Then problem occurs and fail to create the BSD. and then the Windows 7 cannot boot either. The windows partition is still not touched, but cannot boot to windows. So the question was how to repair the Windows 7 Master Boot Record (MBR) ? After search on google, there are solution to repair it using the windows 7 instalation disk. Here are the step done and documented : 1. Boot...

Wednesday, 4 December 2013

Linux in usb pen drive

Linux is a very powerfull Operating System, and USB pen drive now days are very cheap and affordable with bigger size every year. What you can do with the old USB pen drive which you have since the day 1 you use USB pen drive, let say the 1 GB USB pen drive you have. To small for storing your image and music files right ? But don't keep your USB pen drive in the store room. You can use your old USB to boot a Linux Operating System. Yes you can...

Django error when doing insert

What is the cause of error like this in django + postgresql application : DatabaseError: current transaction is aborted, commands ignored until end of transaction block What happen was I import a production database to my development database. Then there are some south migration that not running locally. I found in forum, the problem maybe with the migration or syncdb. But all already checked, same error still happen when insert to table. Then...

Tuesday, 3 December 2013

Postgresql backup and restore

When doing some development, we need a fast backup and restore for database data in postgresql server. The package provide an easy way to do the backup and restore in 1 command. You only need the username and password + the database name to be working on. Here are the backup command signature : Backup : $pg_dump -U {user-name} {source_db} -f {dumpfile.sql} Restore: $psql -U {user-name} -d {destination_db} -f {dumpfile.sql} So this command is straighforward. I dump a 1000 records in 5 seconds. Also note that the privilege and db owner is follow in the dump file. You must prepare the exact username and database, with no table in it. This...

Monday, 2 December 2013

Postgresql DB Initialization in FreeBSD

Here are some command that used for administrating postgresql database. The OS being use was FreeBSD9.1 with postgresql 8.3  TO enable postgresql service add this in /etc/rc.conf : postgresql_enable=”Yes” postgresql_data=”/usr/local/pgsql/data” postgresql_flags=”-w –s –m fast” postgresql_initdb_flags=”—encoding=utf-8 –lc-collate=C” postgresql_class=”default” To install init db : #/usr/local/etc/rc.d/postgresql initdb We don’t have root user and a user in freebsd, so create one. #su pgsql #createuser dba [set as superuser] Then change password : #psql postgres dba postgres=# ALTER USER dba WITH PASSWORD...

cacti time problem

Yesterday, I have a migration for may cacti NMS server from one Virtual Machine to other Virtual Machine. The problem is that the time error when the VM migrated. This make the graph cannot be updated by the cacti pooler. The time is shifted forward 3 years. If only 24 hours shift, we can just wait for the 24 hours time difference. But 3 years, its unsusable. So the solution is only delete all rrd data and crso bad, create from scratch. This is so bad, as I don't have any backup. Last 1 year performance history data was gone. This is bad with cacti, if only had a protection to stop the rra being updated by the pooler when time is shifting...

Sunday, 1 December 2013

Upgrading Django 1.3 to 1.6 road blocks

So I try to upgrade my project to use Django 1.6 . What I found is some setting that change, and to specific to note in the django Documentation. So I make notes on what have change and need to adjust in my django app configuration. manage.py The manage.py files. Now start from Django 1.4 there was a major change. One of the aim was to overcome the double import file in python. The recommended manage.py are : #!/usr/bin/env python import os import...

Django Version 1.6 release

Recently Django released Django 1.6 release in 6 November 2013. While I am still using Django 1.3 in my production server. Looks so many improvement and site layout arrangement in newer version and make the temptation to try it out. I have the options to upgrade to the newer version. But what makes me stop is there are to many change in the process. Maybe better to use the newer version with new project because the layout is changes to much. In my deployment and development, I use the Reuse application methodology. So i hope the change is only in the project layout, but the app layout is still the same. What I encounter in Django 1.3 lack...

Page 1 of 2512345Next
Twitter Delicious Facebook Digg Stumbleupon Favorites More