sql ledger instalation

Upload: john-irsyam

Post on 01-Jun-2018

254 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 SQL Ledger Instalation

    1/35

    Installing SQL-Ledger on Windows

    Requirements

    Windows2000,WindowsXP,WindowsServer2000orWindowsServer2003WinZipKnowledgeofsimpleDOScommands,i.e.CD,DIR,MKDIR,COPY,REN

    Steps

    InstallingApacheHTTPServer2.0.55InstallingActivePerl5.6.1InstallingDBD-PgandDBIInstallingPostgreSQL8.0.4(Part1)InstallingPostgreSQL8.0.4(Part2)InstallingSQL-Ledger2.6.1

    UpdatingHTTPD.CONFSettingAdministratorPasswordandCreatingFirstDataset

    Installing Apache HTTP Server 2.0.55

    1)ToinstallApacheHTTPserver,downloadthelatestbundlefortheWin32systemathttp://httpd.apache.org/Asofthiswriting,theinstallfilethatwasusedtocreatethisdocumentationwas:apache_2.0.55-win32-x86-no_ssl.msi Next,executethemsiinstallfile.

    Note:Ifyoushouldseeasecuritywarningdialogbox,pleaseclickontheRunbuttontoproceed

    2)Next,youwillseetheApacheHTTPServer2.0InstallationWizard.PleaseclickontheNextbuttontocontinue.

    Figure 1.1 Apache HTTP Server 2.0 Installation Wizard

  • 8/9/2019 SQL Ledger Instalation

    2/35

    3)Inthefollowingdialogbox,pleaseclickonthe"I accept the terms ... "radiobuttonandthenclickontheNextbutton.

    Figure 1.2 License Agreement Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    3/35

    4)ThenextdialogboxcontainstheREADMEinformationforthisbuildoftheApacheHTTPserver.PleaseclickontheNextbuttontoproceed.

    Figure 1.3 README Information Dialog Box

    5)IntheServerInformationdialogbox,pleaseenterinthefollowinginformation(nointernalDNSsetup):

    Network Domain:localhostServer Name:localhostAdmin Email:anyemailaddress

    Also,selecttheradiobutton"for All Users, on Port 80, as a Service",andthenclickontheNextbutton.

    Figure 1.4 Server Information Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    4/35

    6)Thefollowingdialogboxwillpromptyouforasetuptype.YoumayselecteitherTypicalorCustom.Then,clickontheNextbutton.

    Figure 1.5 Setup Type Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    5/35

    7)InthepreviousdialogboxtheCustomsetuptypewasselected.Thiscausesthesetupprogramtopromptyouforitemsyouwishtoinstall.Bydefault,everythingisselectedtobeinstalled.PleaseclickontheNextbutton.

    Figure 1.6 Custom Setup Install Items Dialog Box

    8)Finally,youarepromptedtostarttheinstallationoftheApacheHTTPserver.PleaseclickontheInstallbutton.

    Figure 1.7 Installation Prompt Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    6/35

    9)WhenyouseetheInstallationWizardCompleteddialogbox,pleaseclickontheFinishbutton.

    Figure 1.8 Installation Wizard Completed Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    7/35

    10)Next,lookdownintothelowerrighthandcornerofyourcomputerscreen.IntheSystemTrayyouwillnoticeanewiconhasbeeninstalled.Itshouldresemblearedfeatherwithagreenarrowonit.Thegreenarrowindicatesthattheinstallationwassuccessful.

    Figure 1.9 New Icon in the System Tray

    11)Ifyouplaceyourmousecursoroverthenewicon,thenrightclickonitandselecttheOpen ApacheMonitor,youcaneasilyStart/Stop/RestarttheApacheHTTPserverviathisapplet.

    Figure 1.10 Right Click Mouse Action

    Figure 1.11 Apache Service Monitor

    12)TotesttheApacheHTTPServerinstallation,pleaseopenInternetwebbrowserandgototheaddressof:http://127.0.0.1orhttp://localhostYoushouldseeamessageaboutthesoftwarebeingsuccessfullyinstalled.

    Figure 1.12 Test Apache HTTP Service via Internet Web Browser

  • 8/9/2019 SQL Ledger Instalation

    8/35

    Installing ActivePerl 5.6.1

    1)ToinstallActivePerl,downloadthelatestbundlefortheWin32systemathttp://www.activestate.com/Products/ActivePerl/Asofthiswriting,theinstallfilethatwasusedtocreatethisdocumentationwas:ActivePerl-5.6.1.638-MSWin32-x86.msi Next,executethemsiinstallfile.

    Note:Version5.6.1wasselectedduetoissueswiththedriverandversion5.8.xOnce,theDBD-PgandDBIdriversareinstalledyoumayupgradetoversion5.8.x

    Note:Ifyoushouldseeasecuritywarningdialogbox,pleaseclickontheRunbuttontoproceed

    2)IntheActivePerlWelcomedialogbox,pleaseclickontheNextbuttontocontinue.

    Figure 1.2 ActivePerl Welcome Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    9/35

    3)Inthefollowingdialogbox,pleaseclickonthe"I accept the terms ... "radiobuttonandthenclickontheNextbutton.

    Figure 1.3 License Agreement Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    10/35

    4)IntheCustomSetupdialogbox,youwillnoticethatallitemshavebeenselectedforinstallation.PleaseclicktheNextbuttontocontinue.

    Figure 1.4 ActivePerl Custom Setup Dialog Box

    5)ThenextdialogboxalertsyoutonewPPM3feature.Youmayselectthisoptionifdesired.PleaseclickontheNextbuttontocontinue.

    Figure 1.5 New Features Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    11/35

    6)Optionalsetupitemswillbedisplayedinthenextdialogbox.PleaseleavethedefaultvaluesandclickontheNextbutton.

    Figure 1.6 Optional Setup Actions Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    12/35

    7)Finally,theinstallationwillbeginonceyouclickontheinstallbutton.PleaseclickontheInstallbuttontoproceed.

    Figure 1.7 Ready to Install Dialog Box

    8)WhenyouseetheInstallationWizardCompleteddialogbox,pleaseclickontheFinishbutton.

    Figure 1.8 Installation Wizard Completed Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    13/35

    Installing DBD-Pg and DBI

    1)ToinstallDBD-PgandDBI,pleasedownloadtheprecompiledmoduleathttp://www.edmund-mergl.de/export/Asofthiswriting,theinstallfilethatwasusedtocreatethisdocumentationwas:DBD-Pg.zip TheDBD-PgandtheDBIpackagesprovidethedatabaseinterfacemechanismbetweensql-ledgerandPostgres.

    Note:MCSPANwillnotworkwithWindows.Therefore,theprecompiledmodulewillallowyoutoinstallthesefunctions.

    Note:TheprecompiledDBD-PgwillnotinstallwithActivePerl5.8Once,theDBD-PgandDBIdriversareinstalledyoumayupgradetoversion5.8.xfromversion5.6.x

    2)UnziptheDBD-Pg.zipfiletoanytemporarydirectoryonyourserver/PC.

    3)UsingaCommandprompt,gototherootofthetemporaryDBD-Pgdirectoryyourcreated.

    4)Atthecommandprompt,type:ppm install --location=. DBD-PgandthenpresstheEnterkey.

    Figure 1.1 PPM Install Command Example

  • 8/9/2019 SQL Ledger Instalation

    14/35

    5)AfterinstallingtheDBD-Pgpackage,pleasetypeatthecommandprompt:ppmandthenpresstheEnterkey.

    Figure 1.2 PPM Command Example

    6)AtthePPMprompt,pleasetypeinstall DBIandthenpresstheEnterkey.

    Figure 1.3 PPM Command Example

    7)WhenpromptedtoinstalltheDBIpackage,pleasetypealetteryatthepromptandthenpresstheEnterkey.

    Figure 1.4 PPM Command Example

  • 8/9/2019 SQL Ledger Instalation

    15/35

    8)ToexitthePPMcommandprompt,typeexitandthenpresstheEnterkey.

    Figure 1.5 PPM Command Example

    9)Youmaydeletethetemporarydirectoryyouhadcreated.

    Installing PostgreSQL 8.0.4 Part 1)

    1)ToinstallPostgreSQLserver,downloadthelatestbundlefortheWin32systemat

    http://wwwmaster.postgresql.org/download/mirrors-ftp/Asofthiswriting,theinstallfilethatwasusedtocreatethisdocumentationwas:postgresql-8.0.4.zip Next,executethepostgresql-8.0.msiinstallfile(newinstallations).

    Note:Ifyoushouldseeasecuritywarningdialogbox,pleaseclickontheRunbuttontoproceed

    2)Next,youwillseethePostgreSQLInstallationWizarddialogbox.PleasechoosethelanguageyouwouldliketoseefortheinstallationinstructionsandthenclickontheStartbuttontocontinue.

  • 8/9/2019 SQL Ledger Instalation

    16/35

    Figure 1.1 PostgreSQL Installation Wizard Dialog Box

    3)YouwillnextseetheWelcometothePostgreSQLInstallationWizard.PleaseclickontheNextbuttontocontinue.

    Figure 1.2 Welcome to the PostgreSQL Installation Wizard Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    17/35

    4)Thefollowingdialogboxwillcontainsomeinstallationnotes.PleaseclickontheNextbuttontoproceed.

    Figure 1.3 Installation Notes Dialog Box

    5)Thefollowingdialogboxdepictswhatoptionsaregoingtobeinstalled.Insteadofthedefaultoptions,youcanclickonthenamePostgreSQLandselect"Entire Feature will be installed on local hard drive ."Then,clickontheNextbuttontocontinue.

    Figure 1.4 Installation Options

  • 8/9/2019 SQL Ledger Instalation

    18/35

    Figure 1.5 Installation Options Install Everything)

    Figure 1.6 Installation Options Everything has Been Selected )

  • 8/9/2019 SQL Ledger Instalation

    19/35

    6)Next,gotoyourversionofWindow'susermanagementappletandcreateanewuser.ThefollowingexamplewascreatedonWindowsXPProfessional.GototheComputerManagementMMCandselectUsers.Then,gotoAction/New User.

    Figure 1.7 Computer Management MMC

    User Name:postgresPassword: postgresUncheck:"Usermustchangepasswordatnextlogon"

  • 8/9/2019 SQL Ledger Instalation

    20/35

    Figure 1.8 New User

    7)Then,clickontheCreatebutton.

    Note:Thisaccountcannotbesetupwithadministratorprivileges.Postgreswillnotrunasanadmin.

    8)Next,typeintheuseraccountnameofpostgresandthepasswordintotheServiceConfigurationdialogbox.Then,clickontheNext button.

    Figure 1.9 Service Configuration Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    21/35

    9)Theinitializedatabaseclusterdialogboxwillappearnext.PleaseenterintheSuperusernameofpostgresandthepasswordforthisaccount.Then,clickontheNext buttontocontinue.

    Figure 1.10 Initialize Database Cluster

  • 8/9/2019 SQL Ledger Instalation

    22/35

    10)Thefollowingdialogboxwillallowyoutoselect/deselectifyouwantPL/pgsqlinstalled.PleaseleavethedefaultsettingofselectedandthenclickontheNextbutton.

    Figure 1.11 Enable Procedural Languages Dialog Box

    11)Next,youwillbepromptedforwhichadditionalmodulesyouwouldlikeinstalled.PleasejustclickontheNextbutton.

    Figure 1.12 Enable Contrib Modules

  • 8/9/2019 SQL Ledger Instalation

    23/35

    12)TheEnablePostGISdialogboxwillappearnext.PleasejustclickontheNextbutton.

    Figure 1.13 Enable PostGIS Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    24/35

    13)Finally,theReadytoinstalldialogboxisdisplayed.PleaseclickontheNextbuttontostarttheinstallationprocess.

    Figure 1.14 Ready to Install Dialog Box

    14)Whentheinstallationiscomplete,pleaseclickontheFinishbutton.

    Figure 1.15 Installation Complete Dialog Box

  • 8/9/2019 SQL Ledger Instalation

    25/35

    Installing PostgreSQL 8.0.4 Part 2)

    1)GotoStart/Runandtypethecommand:runas /user:postgres cmd.exeandthenpresstheEnterkey.Thiswillopenupacommandpromptrunningastheuserpostgres.

    Figure 1.1 Run Command

    2)Whenpromptedforapassword,pleasetypeinthepasswordpostgresandthenpresstheEnterkey.

    Figure 1.2 Password Prompt for Postgres Account

  • 8/9/2019 SQL Ledger Instalation

    26/35

    Figure 1.3 Running as Postgres in new Command Window

    3)Ifyouhavechosenalldefaultlocationsfortheprogramsinstalledthusfar,pleasechangethedirectoryfromC:\Windows\system32toC:\Program Files\PostgreSQL\8.0\bin

    4)Atthepromptyouwilltypethefollowingcommandtocreateanewuser:createuser -d -a sql-ledgerandthenpresstheEnterkey.Youwillthenbepromptedforthepostgresaccount'spassword.PleasetypeinpostgresandthenpresstheEnterkey.

    Figure 1.4 Create New PostgreSQL User

    5)Next,openthepg_hba.conffilefoundintheC:\Program Files\PostgreSQL\8.0\datadirectorywithNotepad.exe.Scrolltothebottomofthefileandupdatethelinethatreads

  • 8/9/2019 SQL Ledger Instalation

    27/35

    host all all 127.0.0.1/32 md5

    to:

    host all all 127.0.0.1/32 trust

    6)SaveyourchangesandexitoutofNotepad.exe.

    Installing SQL-Ledger 2.6.1

    1)ToinstallSQL-Ledger,downloadthelatestproductionreleaseat:http://www.sql-ledger.org/cgi-bin/nav.pl?page=source/index.html&title=DownloadAsofthiswriting,theinstallfilethatwasusedtocreatethisdocumentationwas:sql-ledger-2.6.1.tar.gz

    Note:WhendownloadingthefileWindowswillcreatethefileassql-ledger-2.6.1.tar.tar.Pleaserenamethisfileto:sql-ledger-2.6.1.tar.gzbeforeyouunzipit.

    2)UnzipthisfileintoyourApacheHTTPserver'sdirectory,i.eC:\Program Files\ApacheGroup\Apache2.Thisisdoneforsimplicityandtomakebackingupyourdataeasier.

    Whenyouopenthefilesql-ledger-2.6.1.tar.gzyouwillbepromptedtodecompressthefiletoatemporaryfolder.PleaseclickontheYesbuttontoproceed.

    Figure 1.1 Winzip Option to Decompress File

    3)Next,clickontheExtractbuttoninyourWinzipapplication.

    Figure 1.2 Winzip Application

  • 8/9/2019 SQL Ledger Instalation

    28/35

    4)Then,navigateyourwaytotheApacheserver'sprogramdirectory,i.e.C:\Program Files\ApacheGroup\Apache2ortypethedestinationintotheExtract tofield.ThenclickontheExtractbutton.

    Figure 1.3 Extract to Directory

    5)Next,downloadtheSHEBANGperlscript.ThisscriptwillupdatethenecessaryfilestousethecorrectpathnameforyourPerlinstallation.Todownloadthefile:

    -openupthewebpagehttp://www.sql-ledger.org/source/windows/shebang-gotoFile/Save As.

  • 8/9/2019 SQL Ledger Instalation

    29/35

    -navigateyourwayintotheSQL-Ledgerrootdirectory.ThisdirectorywillbefoundatC:\ProgramFiles\Apache Group\Apache2\sql-ledger

    -ensurethattheSave astypeisequaltoText File- clickontheSavebutton

    Note:quotationsaroundthefilenamewhensavingthefiledonotwork....thereforeyoumustrenamethefilebeforeusing.

    Figure 1.4 Save Web Page Option

    6)Next,openupanewCommandPromptandnavigateyourwayintotheC:\Program Files\ApacheGroup\Apache2\sql-ledgerdirectory.

    7)Attheprompt,typethefollowingcommand:type admin.pl |more

    Thiscommandwillthendisplaythecontentsoftheadmin.plfiletoyourconsole.YouwillnoticethatintheveryfirstlineofscriptthatthePerlinstallationdirectoryisnotsettoavalidWindowsdirectory.

    Figure 1.5 Type Command to Display Perl Installation Directory

  • 8/9/2019 SQL Ledger Instalation

    30/35

    8)Next,presstheCTRLkeyandtheCkeysimultaneously(together)toexitthetypecommand.

    9)Atthecommandprompt,pleasetype:ren shebang.txt shebang andthenpresstheEnterkey.

    Figure 1.6 Rename Shebang.txt to Shebang

    10)Atthecommandprompt,pleasetype:perl shebangandthenpresstheEnterkey.

    Figure 1.7 Executing the Shebang Script

    11)Attheprompt,typeonceagainthefollowingcommand:type admin.pl |more

    YouwillnownoticethatintheveryfirstlineofscriptthatthePerlinstallationdirectoryissettoavalid

  • 8/9/2019 SQL Ledger Instalation

    31/35

    Windowsdirectory.

    Figure 1.8 Updated Perl Scripts to Valid Perl Installation Directory

    Updating HTTPD.CONF

    1)Openupthehttpd.conffileinNotepad.exe.GotoStart/Runandtypenotepad C:\ProgramFiles\Apache Group\Apache2\conf\httpd.confintheOpenfield.Then,presstheOKbutton.

    Figure 1.1 Starting Notepad.exe

    2)Next,scrollallthewaydowntotheendofthehttpd.conffileandpasteinthefollowingdirective:

    Text 1.1 Additional Apache httpd .conf Directive

    Alias /sql-ledger "C:/Program Files/Apache Group/Apache2/sql-ledger/"

    AllowOverride All AddHandler cgi-script .pl Options +ExecCGI Order Allow,Deny Allow from All

  • 8/9/2019 SQL Ledger Instalation

    32/35

    Order Deny,Allow Deny from All

    3)Nowsaveyourupdatestohttpd.confandexitNotepad.exe.GotoFile/SaveandthentoFile/Exit.

    4)RestarttheApacheHTTPserverasoutlinedinstep11ofInstalling Apache HTTP Server 2.0.55.

    Setting Administrator Password and Creating First Dataset

    1)Gotohttp://localhost/sql-ledger/admin.plandthenclickontheLoginbutton.

    Figure 1.1 Administrator Login

    2)Next,clickontheChange Admin Passwordbutton.Bydefaultthepasswordisblank.

    Figure 1.2 Change Admin Password Button

  • 8/9/2019 SQL Ledger Instalation

    33/35

    3)Onceyouhavetypedinyournewpassword,pleaseclickontheChange Passwordbutton.

    Figure 1.3 Change Password Web Page

    4)Next,youwillbepromptedforthepassword.PleaseenterinyournewpasswordandthenclickontheContinuebutton.

    Figure 1.4 Change Password Confirmation Web Page

    5)Next,clickonthePgDatabaseAdministrationbutton.

    Figure 1.5 Pg Database Administration Button

    6)SinceweareusingPostgreSQLonWindows,pleasetypeinthenamelocalhostintheHostnamefieldandportnumber5432inthePortfield.

    Note:Ifyoucreatedthesql-ledgeraccountearlierwithapassword,pleaseenteritinthePasswordfieldbeforeclickingonCreateDataset.

    Figure 1.6 Create Dataset Web Page

  • 8/9/2019 SQL Ledger Instalation

    34/35

    Note:Ifyoufailtosupplythehostnameyouwillreceivetheerrormessage:connectDBStart() --socket() failed: errno=2 No such file or directory

    Figure 1.7 Error Message

    7)Typeinthenameofyourdesireddataset.Pleaseenterthenameinalllowercasecharacters.Then,clickontheContinuebutton.

    Figure 1.8 Create Dataset

  • 8/9/2019 SQL Ledger Instalation

    35/35

    8)Ifyourdatasetcreationwassuccessful,youwillseeacongratulationsmessage.Then,clickontheContinuebutton.

    Figure 1.9 Success