Selasa, 03 November 2009

Perjalanan dari Windows Menuju RedHat

Sekedar sharing untuk pengguna RHEL 5.

Saya baru install rhel versi 5, dual boot dengan Windows XP, pengen porting [lagi] dari Windows ke GNU/Linux hehehe.

Tantangannya yaitu:
1. Pastinya memastikan ethernet card dikenali dan bisa digunakan. Untungnya, modul ethernetnya langsung dikenalin jadi ga perlu repot2 udah langsung tinggal configure ip address plus sudo ifup hehehe

2. Mengenalkan zte modem yang akan digunakan untuk connect ke internet kalo lagi ngga di kantor. ZTE modemnya tipe MF622 yang berfungsi ganda, yaitu sebagai storage dan sebagai modem. Kalau di Windows, pada saat pertama colokin, pasti akan dikenali sebagai removable disk terlebih dahulu baru kemudian setelah aplikasi dialernya dijalankan, fungsinya akan berubah menjadi modem. Pada GNU/Linux, yang dilakukan mirip dengan yang di Windows, yaitu membuatkan aturan baru di udev.d kalau ada modul storage ZTE tersebut langsung dideregister lalu diswitch ke USB modem. This is pretty simple for me karena udah ada yang berbaik hati bikinin rules duluan jadi tinggal copy aja hehe ... http://pfesto.blogspot.com/2008/09/zte-mf622-e61i-and-wimode-on-fedora.html.

3. Bikin repo lokal :D, thanks to rito (http://blog-rito.blogspot.com/). Awalnya bikin repo dari CD Installer RHEL5 yang dipake buat install, tapi terus terpikir, kan paketnya aku install semua pada saat awal, jadi ngga ngaruh juga :)) ... akhirnya aku bikin repo dari CD installer Fedora yang aku pinjem dari Rito juga. Cuma sayangnya, paketnya mirip2 deh ... jadi, terpaksa bikin repo dari kambing.

[root@localhost ~]# cat /etc/yum.repos.d/master
[master]
name=master
baseurl=ftp://kambing.ui.edu/centos/5.4/os/i386/
mirrorlist=file:///etc/yum.repos.d/local.mirror
enabled=1
gpgcheck=0


4. Install2 aplikasi hiburan yang biasa dipake sehari2:
- pidgin
- xine
- realplayer

Agak ribet ya pasang xine-nya. Kalau pasang libxine justru gampang, tinggal yum search hehehe. Masalahnya adalah pada saat pasang xine-ui, maklum amatir :D, bolak balik ./configure, soalnya somehow libxine-nya ngga dikenalin :sigh:
Pas pake xine-ui, libxinenya yang ga dikenalin, karena berbagai macam option configure sudah dicoba, khususnya option CPPFLAGS sama LIBFLAGS ngga ngaruh juga, akhirnya download kaffeine (inget ini soalnya mas tisna pake hehe). Sama juga kasusnya, banyak banget dependenciesnya. Udah install satu2, stuck juga di flag yang sama ... weks.
Pindah ke gxine, sama juga, malah baca2 di forum, makefilenya ada bugnya, manggil function yang ngga ada di header file.
Akhirnya balik lagi ke xine-ui dan coba - coba lagi ganti2 option configure. Hehehe akhirnya berhasil juga.
$ ./configure XINE_LIBS=/usr/local/lib/libxine.so XINE_CFLAGS=/usr/local/include/xine.h --with-readline

One down, udah bisa maenin VCD dan AVI di xine, dan maenin mp3 di real player :D.
Kalo pas install real player ngga terlalu susah kok, tinggal download rpm nya hehehe.
Begitupun pas install pidgin, ga ribet.
Hemmm pas ditulis cuma jadi 1 blok, padahal ngerjainnya 1 hari nih #^%&#^%)@^&$)(@^%*

4. Yang keempat, karena semua data udah terlanjur ada di NTFS partition, berarti aku harus install ntfs kernel module biar bisa mounting. Nah, biar bisa read write, sekalian deh, dipasang ntfs-3g. NTFS-3g butuh fuse dan dkms-fuse (dynamic kernel module) biar bisa dijalanin, karena kalo ngga, pas mounting akan error.
Selesai pasang ntfs-3g, tinggal edit /etc/fstab, bikin auto biar ngga perlu mounting bolak balik.

5. Pasang OpenOffice. Ingat, sekarang counterpart kita adalah Office 2007, jadi OpenOfficenya juga harus versi 3 biar bisa dibaca. Yang ini juga amat sangat gampang, tinggal download dari openoffice.org, selesai deh.

6. Jangan lupa, pasang VMware hehe. VMware workstations yang versi opensource free kok, bisa langsung didownload di websitenya VMware. Buat yang gila debugging, jangan lupa pasang eclipse biar kalo error bisa ditrace.

7. Import semua email dari Microsoft Outlook ke Thunderbird. Kenapa pilih Thunderbird? Soalnya di google dibilang, thunderbird adalah yang paling banyak digunakan, simply that :D, kekurangannya, ga bisa pasang calender, kalo mau pake calendar, harus pake Evolution. Blom coba sih, bisa import dari Thuderbird ke Evolution apa ngga. Yang jelas, untuk import dari MS Outlook ke Thunderbird, kita harus pasang dulu Thunderbird di Windows, import semua email dari MS Outlook ke Thunderbird di Windows, baru deh copy semua file mailboxnya ke folder yang akan digunakan oleh Thunderbird di Linux. Biasanya extensionnya .msf.

8. Pasang httpd, karena pas di awal udah install semua package, jadi tinggal dinyalain ajah hehehehe

9. Edit file sudoers.

10. Pasang wireless adapter. Nah ini yang ngga bisa :D, dari kemarin stuck nih. Buat temen2 yang udah pengalaman mohon arahannya. Yang jelas modul nya udah dikenalin.

[root@localhost ~]# lsusb
Bus 002 Device 003: ID 19d2:0001 ONDA Communication S.p.A.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 003: ID 0402:5606 ALi Corp. USB 2.0 Camera
Bus 001 Device 002: ID 0bda:8189 Realtek Semiconductor Corp. RTL8187B Wireless 802.11g 54Mbps Network Adapter
Bus 003 Device 001: ID 0000:0000
[root@localhost ~]# lsmod | grep rtl8187
rtl8187 34497 0
mac80211 137545 1 rtl8187
cfg80211 30793 2 rtl8187,mac80211
eeprom_93cx6 6337 1 rtl8187
[root@localhost ~]# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
sit0 no wireless extensions.
vmnet1 no wireless extensions.
vmnet8 no wireless extensions.
ppp0 no wireless extensions.
[root@localhost ~]# ifup wlan0
/sbin/ifup: configuration for wlan0 not found.


Sama pendingan satu lagi, suara sih keluar dari speaker internal, tapi ngga bisa keluar lewat headphone, kenapa ya :D. Kalo headphone dicolokin, speakaer ngga bunyi, tapi tetep ga ada suara yang keluar lewat headphone.

Update status per hari ini, 9 Nov 09. Ternyata, masalah ga bisa bunyi kalo pake headphone, bukan masalah driver and the likes ... instead, it is just a configuration matters. Aku coba - coba kemarin, semua options dibuka2in, dan untuk surround, aku ngga mute ... ehhhh ternyata bunyi loh di headphone :)) ... katro deh.

Jadi, skrg tinggal gimana caranya agar wlan0nya kedetect. Btw, thanks to rito, redhat ku skrg centos flavour :D. Mengikuti saran rito, redhat aku yum-update menggunakan reponya centos, walhasil sekarang centos flavour :D.

Senin, 02 November 2009

There are so many injustices surround me.
Do they not see?
Are they simply ignorant?
One thing for sure, FIGHT FOR YOUR LIFE, YOU DESERVE YOURS, AND THEY DESERVE THEIRS.

Kamis, 29 Oktober 2009

Integrating Paypal Checkout to Your Website

Semalem akhirnya aku berhasil juga mengintegrasikan paypal checkout button ke website. Sebenernya gampang - gampang susah sih, gampangnya karena modulnya sudah ada sih sebenernya, cuma tinggal setting (we are point and click engineers katanya sunil kekekeke). Susahnya, kalo dah nemu problem yang orang2 belum pernah nemuin sebelumnya. Ujung2nya u've got to debug it yourself.

Untungnya, kali ini saya punya banyak clue jadi ngga perlu pusing2 baca codingan orang :D. Ngga sih, tetep perlu juga ding, meskipun useless hehehe.

Website yang mau saya pasangin tombol paypalnya adalah website jualan (ya iyalah masa website perpustakaan, eh tapi bisa juga ya, buat donate atau bayar sewa). Website ini pake osCommerce. Dan para developer yang baik hati itu, sudah membuat modulnya. Jadi, dari web admin, saya cukup klik install. Nah, di settingan tersebut, akan ada isian username, password, signature, server dll. Biasanya, orang yang sukanya coba2 (seperti biasa) ngga akan baca tutorial dulu, tapi akan langsung isi ini itu ini itu ehhh error :)).

Saya juga sempet isi dengan nilai yang salah, cuma sayangnya ngga kedapetan error kalo salah seperti apa ya. Pokoknya, pas di klik tombol paypalnya, diem aja ngga bergerak.

Akhirnya diputuskan untuk MEMBACA TUTORIAL PAYPAL UNTUK DEVELOPER. Here we comes the big stone.

Paypal menyediakan server development yang bisa kita gunakan untuk keperluan testing, namanya server sandbox. So, buat best practice, it's much better to use sandbox first then the live one. Di server sandbox ini, kita bisa create test account yang mewakili buyer and seller, each one account. Dan pada saat testing pembelian, kita bisa gunakan account ini untuk mengetahui customer experience from end to end.

Untuk mengakses sandbox server, urlnya adalah https://developer.paypal.com.

Step - stepnya secara simple bisa dibuat seperti ini:
1. Create test account, satu yang mewakili user, dan satu lagi yang mewakili buyer.
2. Create API credentials. Kita akan mendapatkan API username, API password dan API signature. Kebetulan kemarin coba - cobanya pake yang express checkout, bukan yang payment standard. Dengan payment standard, sebenernya akan lebih aman karena bisa menggunakan certificate. Cuma sayangnya belum sempet maen2 nih sama certificate :D.
3. Setelah mendapatkan API credentials, silakan masukkan values ini ke settingan osCommerce.

Right after this point I got stuck. Kenapa? Karena even setelah saya masukkan API credentials tersebut dengan benar, checkout procesnya masih belum bisa juga. Jadi, setelah klik tombol checkout, browsernya diem aja, seakan2 ngga ada response. Jadi, saya pikir, ini saatnya firebug dan fiddler beraksi. Even dengan menggunakan 2 debugger tersebut, saya ngga dapet apa2 a.k.a mereka ngga nunjukin apa2.

Dengan firebug, it told me that nothing is in error. Trus saya coba inspect element, I got permission denied. Dengan Fiddler, saya dapet error 500, a.k.a page not found. Kemudian, saya coba pikir lagi. Paypal ini kan butuh cURL. Saya coba locate, ternyata emang cURLnya udah keinstall. Trus saya coba pake function - functionnya cURL di halaman test, ternyata ada error funtion not found. So I guess, it must be something with cURL.

It turns out that it needs an additional module to be started on php.ini. Ini dia yang harus dienable:
extension=gd.so
extension=curl.so

Right after that, it went all smooth and clear. Untuk implementasi di live server, you just need to replicate all those steps in sandbox server to the live one. Menunya memang agak berbeda sih, but it's still easy to figure out.

Minggu, 25 Oktober 2009

osCommerce Indonesia Translation

For you all who need the translation of osCommerce language module to Bahasa Indonesia, please do not hesitate to contact me.

I think of uploading it later, still trying to figure out how (please do not laugh) ... If you wish to check it before contacting me, I use the translation for a website, http://easyfind.web.id.

My contact is available publicly at my profile page or you could just googling my full name to get my profile page.

Jumat, 25 September 2009

VLAN interface line protocol status

Ever created a vlan interface and it's showing that the interface status is up-down?

Just now, I've created a vlan interface and its physical link status is immediately up. Unfortunately, the line protocol status is always down.

Come to think, it might need some ports to be assigned, so I assigned an Fa 0/1 to Vlan20. However, the luck has not yet to come.

It turned out that it needs some devices to also attached to that interface. So my conclusion is, if the link of the physical port is up-up, then the vlan protocol status will then go up. Someone else might have an explanation to this, but I don't.

This is the debug:

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
RT: interface Vlan20 added to routing tableRT: SET_LAST_RDB for 172.16.71.0/24
NEW rdb: is directly connected

RT: add 172.16.71.0/24 via 0.0.0.0, connected metric [0/0]

See .. my new static route is also added to the table :)

Jumat, 11 September 2009

Cron task in 5 minutes

Wanna run scheduled task in Linux using cron task, but you're having problem in reading the bulky tutorial?

This should work in only 5 minutes:

[root@VM-FC10 etc]# more /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

/etc/cron.hourly itu adalah direktori, jadi untuk yang mau dikerjakan setiap jam, taruhlah di direktori ini. jangan lupa, bahwa semua script yang ada disini, harus merupakan shell script.

nah, yang banyak bintang2nya itu adalah penunjuk waktunya, sebagai berikut:
menit jam tanggal bulan hari command
hari diisi dengan angka 0 sampai 7 dengan 7 berarti hari Minggu

bagaimana kalo kita ingin menjalankan task yang ngga ada di pola diatas? ya tinggal ditambah aja hahahaha ..

tambahnya di /etc/cron.d/ dan sintaksnya sama dengan crontab diatas

gampang kan? yang susah shell scriptnya :D

Jumat, 21 Agustus 2009

Lost in doing PHPSurvey?

Lost in implementing PHP survey?

That happened to me as of NOW. Yes, I'm writing this blog during my work on this script.

I've downloaded the script from Sourceforge, it's available thru http://sourceforge.net/projects/phpsurvey/, you can download it there.

First thing first, check several prerequisites:
- Apache, it's a must, and since I'm using Fedora 10 with complete package installed, it doesn't give hard time in setting it up. To check it, use this command:
/etc/init.d/httpd status
or simply press tab key after keying htt, linux will complete it for you if it's there, much like cisco routers right?
This is what shows up on my screen:
[root@vmfc10 lib]# /etc/init.d/httpd status
httpd is stopped
[root@vmfc10 lib]#
If you see the above lines, you need to start it this way:
[root@vmfc10 lib]# /etc/init.d/httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
[root@vmfc10 lib]#
You see, there is an error about the unqualified domain name. It's ignoreable unless you'd wish to bring it online to the internet. It appears because my hostname was set to 'localhost' which does not meet with the FQDN rules ... but we're not gonna talk about it here, it's too long. For now, it's ignoreable.
After starting the httpd service, now you have to make sure that the web page can be displayed. By default, apache places one test page located under its default document root directory for us to use. Simply point your browser to http://localhost/ then it will show you one test page similar to this:


Okay, now finish for the apache.

- Move on to mysql.
Unfortunately, mysql is not installed by default in Fedora distributions so I have to make a little effort, only a little though, thanks to yum.

Please remember that the service you're searching for mysql service will be mysql and mysql-server. If you're only installing mysql, you will only see some mysql related libraries and will not be able to run it as a daemon.

Just do "yum install mysql mysql-server" as a root, please note the intermediating dash.
Once it said "Completed!" then we can start moving to the configuration.

As root, run mysql by typing /etc/init.d/mysqld start. And afterward, log in to mysql service as root and assign the password for the root:

[root@vmfc10 ~]# /etc/init.d/mysqld start
Starting MySQL: [ OK ]

Please note that to start mysqld service, it took you quite a while, depending on your hardware specification.

[root@vmfc10 ~]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.83 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> set password for 'root'@'localhost' = PASSWORD('r00t');
Query OK, 0 rows affected (0.18 sec)

The sql statement which says "set password ... " is the line that is used to assign password for the root user in the mysql database.

So far, we have already 2 things set up on our Fedora machine. I don't know about you, but for me, the PHP comes in a bundle when I installed the webserver using the distribution package. So when I do this:

[root@vmfc10 ~]# whereis php.ini
php: /usr/bin/php /etc/php.ini /etc/php.d /usr/lib/php /usr/share/php /usr/share/man/man1/php.1.gz

I already got the php.ini file. Installing PHP in Linux will not be harder than when installing it in Windows. So, I believe you will get to it by yourself. The installation procedure is also quite self explanatory.


Now, we got all the prerequisites in place. Let's do the script.

First thing first, place the script on the httpd DocumentRoot. Open httpd.conf, usually it's located on /etc/httpd/conf/ -- its default installation directory, or if you can't find it, just do "locate" or "find" command.

Find the DocumentRoot directive to get the location to which we should place the PHPsurvey script. As for mine, it shows as below:

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

So, we know now that we have to place it on the /var/www/html directory. I got mine copied into survey subfolder under html.

[root@vmfc10 ~]# cd /var/www/html/
[root@vmfc10 html]# ls
phpSurvey-2.0-alpha.zip survey

According to the installation guide, we have to make sure the register_global is on. It's located ini php.ini file, so change it to ON, by default, it's turned off:

; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = On

Next, configure the database. All the necessary statement are in pg_create.sql file. However, these statements are written for PostgreSQL which differs from the MySQL, so you have to translate it to the MySQL version.

First of all, open the mysql prompt:
[root@vmfc10 html]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.83 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

The -u specifies the user, and the -p specifies that it requires password. Once you're logged in, create a database and then use it before creating any tables.

mysql> create database survey;
Query OK, 0 rows affected (0.18 sec)

mysql> use survey;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

Now, paste the sql statement in pg_create.sql file, located under install subfolder. Mostly, it fits fine, only there are several things that does not go with the MySQL.

1. The TIMESTAMP WITHOUT TIME ZONE statement. I've been looking for this statement in the MySQL documentation but I can not find any, so the only way to make it work, is by deleting the WITHOUT TIME ZONE.

2. You will see an error that said TEXT/BLOB variable used as primary key does not have length defined. As it is used as primary key, of course it has to have a specified length to determine the uniqueness. However, when you set the length for TEXT variable, you will find an error as well. So the only way to work it by refining the TEXT/BLOB into VARCHAR and specified the length.

3. You will also see that BLOB/TEXT can not have a default value of NONE. It's a known bug in MySQL, you have to change it to '' not specifying anything as the default value and MySQL can accept it.

So, we have done configuring the database.

Now, what we're gonna do is tuning the configuration. All the site related configurations are accessible from conf.inc.php under include folder.

$PS_CONFIG["system_url"] = "http://127.0.0.1/survey"; // by default it has a value of http://127.0.0.1:8080/phpSurvey. I changed it that way because my server is listening to port 80, not 8080 and the folder name under /var/www/html is "survey" not phpSurvey.

$PS_CONFIG["admin_email"] = "root@locahost"; // Displayed on the admin login page.
$PS_CONFIG["system_email"] = "root@localhost"; // Email address required in sending invitation.
// Should be a valid email address or leave it empty.
// Also remember to appropriately set hostname system variable.

$PS_CONFIG["dbtype"] = "mysql"; // initially, it was pgsql
$PS_CONFIG["dbhost"] = "127.0.0.1";
$PS_CONFIG["dbuname"] = "root";
$PS_CONFIG["dbpwd"] = "r00t";
$PS_CONFIG["dbname"] = "survey"; // you also need to change the database to the one you set up previously.

Now the guide says I need to invoke install.php to set the password. So let's do it.

Oooppsss ... something went wrong, nothing is displayed. Time for debugging. Open the error.log and here we go:

[Fri Aug 21 23:09:54 2009] [error] [client 127.0.0.1] PHP Warning: include_once
(DB.php) [function.include-once]: failed to
open stream: No such file or directory in /var/www/html/survey/include/common.in
c.php on line 3
[Fri Aug 21 23:09:54 2009] [error] [client 127.0.0.1] PHP Warning: include_once
() [function.include]: Failed opening 'DB.php' fo
r inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/s
urvey/include/common.inc.php on line 3
[Fri Aug 21 23:09:54 2009] [error] [client 127.0.0.1] PHP Fatal error: Class 'D
B' not found in /var/www/html/survey/include/common.inc.php on line 16

Ow ow ... it turned out that I got no DB.php file under my include directory.

Well, it looks like I dont have pear installed. Download it from the web, http://pear.php.net/package/DB/download, extract the file and copy it to the phpSurvey directory. In this case, it will be /var/www/html/survey/.

Try it again ... and oooppssss ... still blank page.

Open error log one more time, and here it goes:

[Fri Aug 21 23:30:39 2009] [error] [client 127.0.0.1] PHP Warning: require_once
(PEAR.php) [function.require-once]: failed t
o open stream: No such file or directory in /var/www/html/survey/DB.php on line
30
[Fri Aug 21 23:30:40 2009] [error] [client 127.0.0.1] PHP Fatal error: require_
once() [function.require]: Failed opening require
d 'PEAR.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/
survey/DB.php on line 30

line 30 on DB.php is

require_once 'PEAR.php';

Hmmm, I got to also download it. Search the net ... bingo, I've gotta install php-pear, do yum install php-pear ... wait several minutes and completed.

Try again, .... great it shows an error now, the error shows that it failed when connecting to the DB. Well, at least it shows a progress.

Let's take a look at the install.php, what is it actually in there?

I think I've gotta take a rest for now, will continue tomorrow. See ya.

----

it's saturday, it's the first day of ramadhan in 2009 and it's time to continue this ... last time we tried, the page shows a DB connection failed.

Hmmm .... at this point ... let's think of something what might be preventing this ... reviewing all the DB configurations are correct. Hmm I got it, perhaps it's the SELinux thing. Let's go check it out.

Now I gotta disable the SELinux.

Now done, try to browse the install.php again ... and oopsss I got a notification of AVC denial. Check it ... and it looks like the network connection has been denied by SELinux.


See? I've gotta set something for the SELinux, let me resolve this one moment .. as you can see above, the httpd is trying to connect to port 3306 and SELinux has denied it.



Now .. I'm allowing all network access as seen above. I shuld be able to connect and browse the install.php file by now.
Great ... it shows me something here:


Magic Quotes OFF? Let's check the guide. It doesnt help. If we're looking at the code there are lines:

$reg_globals = ini_get('register_globals');
$magic_quotes = get_magic_quotes_gpc();
echo "Register Globals : ";
if ($reg_globals == 1) {
echo "On
\n";
} else {
echo "Off
\n";
}
echo "Magic Quotes : ";
if ($magic_quotes == 1) {
echo "On
\n";
} else {
echo "Off
\n";
}

I assume the reg global shuld be off and magic quotes shuld be on. Let's change it in php.ini and restart httpd. Wonderful, it's all green now.
Fill up all the credentials ... and great ... the root password has been set up successfuly. This credential will be used for the web admin, not for the database.

The INSTALL file stops here. So what's next?

Ow ... great ... it's all done. Point your browser to http://localhost/survey and it will ask you to login. Click admin login, supply your recently created username and password ... and there you go ..



Fiuuuu it doesnt stop here ... it looks like i got some errors due to mismatch statement. All the sql statement here is actually destined for postgre, not mysql. I think I gotta stop here :D, i dont want to crawling all the pages just to find which statements needed to be changed.

As an alternative, I'm gonna yum install postgresql in my linux.

Running Transaction
Updating : postgresql-libs-8.3.7-1.fc10.i386 1/3
Installing : postgresql-8.3.7-1.fc10.i386 2/3
Installing : postgresql-server-8.3.7-1.fc10.i386 1/1
Cleanup : postgresql-libs-8.3.4-1.fc10.i386 3/3

Installed:
postgresql.i386 0:8.3.7-1.fc10
postgresql-server.i386 0:8.3.7-1.fc10

Dependency Updated:
postgresql-libs.i386 0:8.3.7-1.fc10

Complete!

Done with the yum ... now let's start it over.

[root@vmfc10 ~]# /etc/init.d/postgresql status
postmaster is stopped
[root@vmfc10 ~]# /etc/init.d/postgresql start

/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first.
[FAILED]
[root@vmfc10 ~]# service postgresql initdb
Initializing database: [ OK ]
[root@vmfc10 ~]# /etc/init.d/postgresql start
Starting postgresql service: [ OK ]

Ahhh ... one thing I forgot, I shuld install pgsql as well !!!

Installed:
php-pgsql.i386 0:5.2.9-2.fc10

Dependency Updated:
php.i386 0:5.2.9-2.fc10 php-cli.i386 0:5.2.9-2.fc10
php-common.i386 0:5.2.9-2.fc10 php-ldap.i386 0:5.2.9-2.fc10
php-mysql.i386 0:5.2.9-2.fc10 php-pdo.i386 0:5.2.9-2.fc10

Complete!

[root@vmfc10 ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
[root@vmfc10 ~]# post
postgres post-grohtml postmaster
[root@vmfc10 ~]# postgres
"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise. See the documentation for
more information on how to properly start the server.
[root@vmfc10 ~]# exit
logout

[yuv@vmfc10 ~]$

Hemmmm .... what a work !!!! cant make it work. Im gonna take a break now .. see ya later.

Back in action. It turned out that I've made terrible mistake :D which shuld be resolved in just 3 simple steps. See below:

[root@vmfc10 ~]# mkdir /usr/local/pgsql
[root@vmfc10 ~]# mkdir /usr/local/pgsql/data/
[root@vmfc10 ~]# chown postgres /usr/local/pgsql/data/
[root@vmfc10 ~]# su - postgres
-bash-3.2$ initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 24MB/153600
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

postgres -D /usr/local/pgsql/data
or
pg_ctl -D /usr/local/pgsql/data -l logfile start

-bash-3.2$ pg_ctl -D /usr/local/pgsql/data/ -l logfile start
server starting

Revert back the pg_create.sql from the original archive.
-bash-3.2$ psql
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

postgres=# \i /var/www/html/survey/install/pg_create.sql

There are a lot of errors showing up ... but let it be for now. I keep a copy of it in case I'm gonna need it sometimes later.

.....

It's been several days since I left this draft. I must say, I do not finish this. Why? Because there are a lot of sql statements I gotta go thru, and it's one tedious work to do :D. So ... I decided to move my ass to LimeSurvey and now it's running live already.

Just need to customize the webpage a lil so it does not show a real limesurvey. Sorry guys to let you down by writing this but I got a lot more work to do :)