Home
Stage Eindwerk - DSpace at Howest
Contents
1. ae 56 MOTE ts tile E E Ste Se ELO 57 DE EET 58 QUES a A A ei Ae oet te entes tts i e tete 59 Relations in the classes tede terr tere te rt NH id 62 E RII MIU e 63 IntrOQUEtlOTn ea omit tient A A etu distet etus etate t ect t ct 63 Kor 63 Creating a template co ec tddi 67 IOO GUCION Aterian eme t int tetto A eti a ittm tube etuer 67 ule E 67 Practical Mila tele lea e PR E Fe PR EHE EE ELS A ie een dere 71 INERODUCHON teret tee a epe ten ti IO e pti tis Ar ebd ata 71 OA EO 72 Default security AA 73 IAEFOOUELION ERE 73 Worm an eneen 73 Keg 73 Changing language ORO ERG E eb i EIS HUE 74 Protilez ene S arde deret istae steep reti APR diete ie a Re Pee RIT Ae HER ehe 74 erdum EE 75 Blank invoca RUD ee E a s 75 UT EEE M pM ML A 75 ALCOI euet do accade traiter diet teet aa 76 Create Company cioe reete teo eee e redeo o naa ee Rude ne evan A Y aeu gov a renda ea aea dt de ae Pao 77 View templates Ite rH a 77 MISCUIT ER 77 AMI PA tue eee ee A A A adeste nudes tete fervus ee Ried 77 ERO DUCTION iat oerte Oi re e e b t E Er eser aes 77 BETTE E TRI MN Eonia A DIDI 78 AAD PEE 78 Edits eenden eat aet e a de e dte de n an RO PEN EIE 78 Bil ERE 78 Gli nt managetmient eot teense t Rc d dtt ab n
2. Name column Type of column Description References to Required order_id integer Primary Key for what order by X order are we giving Foreign Key discount discount id integer Primary Key what discount by X discount are we giving to Foreign Key this order discount Name column Type of column Description References to Required discount id integer Primary Key for discount X value double What amount of discount X will we give translate field id integer What field is this in the translate field X translation table by Foreign Key is percentage char 1 Is the value given a X percentage or is it an amount default J on total char 1 Is the discount on the X total price or only on the previous item default N low limit double Is there a low deck from what price the discount starts default 0 item Name column Type of column Description References to Required item_id integer Primary Key for item X description varchar 255 What item is this the The X description is not description translated used in the foreign database price no vat double What is the price of this X item VAT excluded vat percentage double How much VAT is on this X item 12 order Name column Type of column Description References to Required order_id integer Primary Key for order X date datetime On what date is this X invoice been made
3. Remarks 42 Delete company Purpose To delete a company from the system Short description The administrator deletes a company Actors Administrator Frequency Low Scalability Low Criticality High Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The company should be removed and all invoices attached to it Primary way e User chooses admin panel from the menu e User chooses company management e User chooses delete e User chooses a company Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 43 Add language Purpose To add a language to the system Short description The administrator adds a language Actors Administrator Frequency Low Scalability Low Criticality High Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The language should be added with the translations Primary way e User chooses admin panel from the menu e User chooses language management e User chooses add e User chooses languages to compare with e User fills in the fields e User hits save Use cases related to primary way e Login Alternatives
4. This only needs to be done on one server the one we will be creating the configuration files on and will then be copied to the second one after configuration is complete We need to edit 3 files to setup a working heartbeat configuration We will begin with making an authkeys file which is used to verify nodes are actually part of the cluster Therefore the file must always be unreadable to everyone but administrators If someone gains access to this file he can setup a server to break into the cluster We will start with the authorization file Open etc ha d authkeys You will see the following near the end ofthe file auth 1 l crc 2 shal HI 3 md5 Hello Simply uncomment the lines containing auth amp shar and change the shai key HI to a randomly chosen string Change the auth value to the chosen security You can also opt to use the mds authentication method or but not recommended the crc method which does not add security only packet corruption checking auth 2 l ere 2 shal No one should ever get his hands on this file or string 3 md5 Hello Next make sure the authkeys file is unreadable for other users chmod 600 etc ha d authkeys Page 26 of 53 Linux High Availability Cluster Manual Next open etc ha d ha cf and make sure following directives are configured as shown use_l
5. Name column Type of column Description References to Required company_id integer Primary Key of company X name varchar 70 The name of the X company address varchar 255 The address information X of the company email varchar 50 The primary email X address of the company website varchar 50 The website of the company telephone varchar 50 Telephone information of the company fax varchar 50 Fax information of the company bank varchar 100 Bank information for the company var1 varchar 255 Various information field for the company var2 varchar 255 Various information field for the company var3 varchar 255 Various information field for the company logo varchar 100 Location of the logo image last_done_order Column name Type of column Description References to Required plugin varchar 50 Primary Key of The name of X last done order the plugin site for the order php plugin file id integer The id of the order Primary Key of X identification in the an order in a foreign database foreign database datetime datetime When was this invoice X made 14 client Column name Type of column Description References to Required client_id integer Primary Key of client X firstname varchar 50 First name of the client X lastname varchar 50 Last name of the client X address varchar 255 Address information for X the client telephone varchar 20 Telepho
6. 31 Create a new company Purpose To create a new company in the database Short description The user wants to create a new company in the database Actors Administrator Viewer Frequency Low Scalability Low Criticality Average Indirect demands Preconditions The user must be logged in Post conditions The company should be stored in the local database Primary way e User chooses create a new company from the menu e User fills in the necessary fields e User hits save Use cases related to primary way e Login Alternatives this alternative can only be done as an administrator e User chooses admin panel e User chooses company management e User chooses add e User edits fields e User hits save Use cases related to alternatives Exceptions If the company already exists data may be updated Use cases related to exceptions none Remarks 32 View templates Purpose To view the available templates and to preview them Short description The user gets a list of available templates in the system and can get a preview with random data The preview can be viewed in all the languages Furthermore this preview can be printed Actors Administrator Viewer Frequency Average Scalability Low Criticality Low Indirect demands there must be templates available to view Preconditi
7. Find the line defining the server root and alter the directory to the correct version You exit this editor with CTRL x Hit y and enter to confirm the changes Now exit your shell Right click your desktop and choose System gt Daemons gt Monkey Web Server gt monkey restart You can test the result of this by opening the browser most right icon in the taskbar and enter http 127 0 0 1 as URL If you get this nice intro page your webserver is working To test our PHP parser we re going to create a little script We re going to say Hello to ourselves through a PHP script served by Monkey Right click your desktop and choose XShell gt Transparent Type in the following command to create our file sudo nano opt monkey 0 9 2 htdocs hello php Give the file this contents lt php echo Hello P gt No we re going to actually test this script In the task bar fire up the browser most right icon And surf to http 127 0 0 1 hello php The result should be a perfectly blank screen with only the text Hello so now tags should be visible Now that everything is running fine it is almost time to proceed to the monitoring part Reboot your system and backup all changes Monitoring links Next we will extend our browser a bit with links to our monitoring software on the cluster To do this first we have to fire up our browser off course To do this click the Red Blue
8. Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 44 Edit language Purpose To edit a language in the system Short description The administrator edits a language Actors Administrator Frequency Low Scalability Low Criticality High Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The language and the translations should be edited Primary way e User chooses admin panel from the menu e User chooses language management e User chooses edit e User chooses languages to compare with e User fills in the fields e User hits save Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 45 Delete language Purpose To delete a language in the system Short description The administrator edits a language Actors Administrator Frequency Low Scalability Low Criticality High Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The language and the translations should be deleted Primary way e User chooses admin panel from the menu e User chooses language management e User chooses delete e User choose
9. Dit e mail adres is ongeldig You must enter your password Je moet je wachtwoord opgeven succeeded geslaagd failed mislukt wrong password verkeerd wachtwoord this user does not exist deze gebruiker bestaat niet detailed information gedetailleerde informatie support for checking last entries ondersteuning voor controle op laatste toevoegingen server server database databank choose an invoice to create for kies een factuur die u wenst te maken voor if the checking option is enabled only not created available invoices are listed 3 4 4 5 5 6 6 7 7 8 8 9 als de controle ondersteuning aan staat worden enkel anders worden ze allemaal getoond order bestelling items artikelen discounts kortingen ordered on besteld op by door PEU 21 insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert inser
10. Go to the network settings 2 Enter Enter the correct IP address of the X slot Web SNMP Card 192 168 182 20 Enter The service is now detecting the X slot Web SNMP Card information Page 49 of 53 Linux High Availability Cluster Manual Type the number of the load segment to which your server is connected You can determine this on the backside of the server The left two connectors are in the 1 segment the two connectors on the right hand side are in the 2 segment Load Segment 1 Load Segment 2 The backside of the UPS 1 or 2 depending on your load segment Enter Make sure all parameters are correct Change the shutdown type to Time on battery Go to the shutdown type setting 1 Enter Change it to time on Battery By default it waits five minutes to shutdown This should be enough 1 Enter When everything is correct save the information and exit 5 Enter y Enter o Enter The service will be started automatically When you want to access the configuration you can start the configuration utility usr Powerware NetWatch netwatch i Page 50 of 53 Linux High Availability Cluster Manual In order to avoid problems with the replication and the handover system you need to change the shutdown script of the NetWatch client on both servers On HAC CIN1 Edit the NetWatch client shu
11. 1 61 0 GB Klvm Undo changes to partitions Finish partitioning and write changes to disk Go Back Continue Figure 4 9 Partitioner after configuring RAID replication Now a new option labelled Configure the Logical Volume Manager should appear above the device list select it and continue When asked whether you want to keep the current partition layout and configure LVM select yes and continue Next select Create volume group and continue When asked for a name we filled in vgoo and when you have to select the devices for the volume group select dev mdi this is the RAID partition and continue A new option labelled Create logical volume should have now appeared in the LVM configuration menu select it and continue When asked on which VG you want to create the logical volume select the earlier created volume vgoo in our example When prompted for a name enter swap and use a size of at least twice preferably more the size of the systems RAM In our example we used 2GB Repeat above paragraph for the volumes labelled srv home and Toot with respective sizes of in our example 15GB 15GB and all remaining place 26GB When you have allocated all partitions you may want to use the Display configuration details to verify the configuration as shown in Figure 4 10 Page 17 of 53 Linux High Availability Cluster Manual O debian RANA Partition di
12. give an extra thanks to miss Siska Wielfaert as she kept in touch with me during my practical training and made sure got my Erasmus scholarship I d also like to thank miss Kristien Roels my practical training councilor She always checked if my progress papers were in order and up to date Dennis Vermaut Helsinki 21 05 2008 Samenvatting In dit eindwerk wordt ten eerste de installatie van een Linux High Availability Cluster uit de doeken gedaan Dit houdt eerst de installatie zelf in en vervolgens alle software voor de cluster configureren Ook het configureren van de Exim4 mail server software voor het gebruik van een externe mail server is hier in omvat Een tweede deel gaat over monitoring van servers clusters vanuit Linux aan de hand van Ganglia Dit specifiek van op een USB stick In detail beslaat dit dus het plaatsen van een Linux Operating System op een USB stick en vervolgens de research hoe het monitoring pakket op het systeem te krijgen Een derde luik draait om de Global Invoicing web applicatie Deze applicatie maakt het mogelijk facturen op te stellen bewerken archiveren en uniform te printen De facturen kunnen van om het even welke databank bron of rechtstreekse input komen De applicatie is meerdertalig in een manier die op iedere PHP MySQL website toegepast kan worden Ook kan het systeem overweg met meerdere templates om de gemaakte facturen af te beelden Een laatste onderwerp omvat de revisie en uitbreiding van PR
13. Installato duci parete as 31 4x55 ECONO AAA AA A Cae uis 31 4 3 6 MISION E 32 ASG A TACO A UCTIOI a E 32 A262 A do eters 33 de Configuration ren AR 33 436 4 Starting the MySQL Clust ef tia 35 43 05 REM etmek 36 4 Nentyins Installation e 37 DAL AO UA eer teer hoec ve sev eO MI 37 4 4 2 Heartbeat a aa cl 37 55 MORBILOFIBE E E ONO 38 5 1 LACE o oo buts dot Malta ied sabe OR t rite hate beca De ed Vor ase oae uud 38 Bed Heartbeats do 38 Boc ON Sp vue P EE d an E em 38 S 3 e IDEO GOTT OEE 38 532 asta dial 38 o A ba dte AA one 40 Bd BO a d 44 Ai Introduction AA ee 44 5 4 2 Installation anne opio haie a sas eC 44 Page 3 of 53 Linux High Availability Cluster Manual SA El dl dui e e Ke 44 A NS 45 552 Introduction incitavit ere aec 45 5 5 2 Installation and configuration as oou dee ete net tr tpe tiles o it b ta aede 45 Maintenant e tee ceetiscteet etes ttc eie eee ots tv ee dnte etie coe eet eet ise eet ases edes epo aede ee esos eo e aguda 47 565 IBtrFOdUetlOh erectam dte tae 47 5 7 Updating upgrading the system ccccssssecccccsssescecssssescecssssessscsecssssscsecstssscsecenseees 47 O A O 47 6 Installation of a Powerware 5115 UPS for a High Availability Cluster nennen 48 6 1 tro dC un Re Ratna 48 6 2 Installation of the software sese enne trennen tnnt tnnt 48 6 3 Configure the shutdown script ens oneonvensoneensensenceneonenseenennenseenensenvensenvensene 51 6 4 Automatically starting th
14. Polytechnic Stadia has only been in existence for a rather short period Until 1996 there were 8 institutes that were managed by the city of Helsinki Each institute had its own responsibilities but some of these responsibilities were the same than those of another institute To end this it was decided to merge all the institutes into one On 1 January 1999 the merging was completed Polytechnic Stadia was a fact Since that time a few more institutes were added to the large Polytechnic EVTEK and Polytechnic Stadia Helsinki will be merging into a new higher education institute called Helsinki Metropolia University of Applied Sciences which will begin operations on 1 August 2008 One of the supervisors of this merge is Kari Bjorn Helsinki Metropolia University of Applied Sciences Kari Bjorn is the head of the faculty of technology and he was also my mentor during the work placement He gave me the assignments and provided me with everything needed My office was the labs at the fifth floor of the faculty of technology 14 Assignments Introduction During my stay in Helsinki was given more than one assignment to take care off All these tasks are described in this section A short overview of the tasks given to me e Finish setting up second Linux HA cluster and correct the manual e Linux Ganglia monitoring on a pen drive e Global invoicing web application e Web shop revision and extension The tasks a
15. Windows Internet Explorer SAMA Ez De 3 d e Ganglia Cluster Report Ganglia Cluster Report for Wed 20 Feb 2008 13 56 00 0200 Metric load_one Last hour Sorted descending Physical View sourceforge net Grid gt HAC gt Choose a Node zl Choose a Node Overview of HAC CPUs Total HAC C2N1 ciscolab stadia fi uia HAC C2N2 ciscolab stadia fi HAC Load last hour HAC CPU last hour Hosts down E t 2 P a Y L 3 5 5 Avg Load 15 5 1m aje 3 gt 2 j 10 21 31 4 5 ad Hi X aline 0 04 gt 13 00 13 20 13 40 poe el Bed REESE MUser CPU Nice CPU W System CPU WAIT CPU 2008 02 20 13 55 Ol min Load W Nodes W CPUs W Running Processes O Idle CPU HAC Memory last hour a HAC Network last hour 8 Cluster Load Percentages El 75 100 25 00 Y 106 ds EAS Do 25 75 00 t A Li amp X wk a 9 04 ln EIS zow E 13 00 13 20 13 40 Bl Memory Used Wi Memory Shared El Memory Cached o E Memory Buffered B Memory Swapped 13 00 13 20 13 40 Bi Total In Core Memory mIn Mout Show Hosts yes no C HAC load_one last hour sorted descending Cotumns 4 Y 192 168 182 11 HAC C2N1 ciscolab stadia fi 192 168 182 12 a 8 wl 8 x i 8 A 100m M lew l BI t im wale Lil RE E TTT TTT vent Roo gt 4 Figure 5 1 General view Ganglia http 192 168 182 15 ganglia graph php g load_report amp z large amp c HAC amp m amp r hour amp s descending amp h
16. chosendomainname cgi bin awstats pl config chosendomainname This should look something like this E Statistics for localhost 2008 03 Mozilla Firefox Je Bestand Bewerken Beeld Geschiedenis Bladwijzers Extra Help e at Li http 192 168 182 15 cgi bin awstats pl config localhost gt gt I C 4 fca AX Form Post Hijacking ll zelf een Japanse tuin Reiko chan s Japane WW List of Rurouni Kenshi DataRescue IDA Pag www serpentarium b Paintball 2Link be gt gt 2 5 Laden Ly Statistics for localhost 2008 03 C T Al Statistieken van Laatste Update Zoek trefwoorden localhost Gerapporteerde periode Mrt x 2008 ox Awstats Web Site Samenvatting Wanneer Samenvatting Maandelijkse historie Gerapporteerde Dagen van maan parade Maand Mrt 2008 Weekdagen Eerste bezoek NA ren Laatste bezoek NA end Nen o AA Landen D Volledige lijst Bekeken o o o o o Hosts verkeer 0 bezoeken bezoeker 0 pagina s bezoek 0 hits bezoek 0 KB bezoek D Volledige lijst Niet bekeken D Laatste bezoek verkeer D niet vertaald IP Adres a Robots Spiders bezoekers Niet bekeken verkeer is verkeer dat gegenereerd werd door robots worms of antwoorden met een speciale HTTP status code D volledige lijst D Laatste bezoek o o o Navigatie Maandelijkse historie Duur bezoeken Bestandstypen Toegang Jan Feb Mrt Apr Mei Jun Jul Aug Sep Okt Nov Dec D volledige lijst 2008 2008 2008 2008
17. ues ues LUES LUES ues ues ues Lues ues ues lues ues ues LUES Lues Lues Lues Lues ues ues ues ues Lues Lues Lues LUES ues ues ues ues Lues ues ues Lues ues ues ues ues ues otherwise Lues Lues ues ues ues ues lues Lues ues LUES LUES val LUES N N N N N N N N H N N N H a 4 oO O0 MO 1 OY OY O1 RE BWW o 239r 2 36 2 31 2 38 3 welcome welkom Log out uitloggen profile preorzel choose an action kies een actie create a new invoice maak een nieuwe factuur archive archief admin panel administratiepaneel create a new company maak een nieuw bedrijf view templates bekijk de templates view plugins bekijk de plugins new password nieuw wachtwoord repeat the new password herhaal het nieuw wachtwoord first name voornaam last name familienaam e mail address e mail adres save bewaar You have to enter your password to make changes to your Je moet je wachtwoord ingeven om je profiel aan te You have to confirm your new password correctly Je moet je nieuw wachtwoord correct bevestigen This username is already in use Deze gebruikersnaam wordt al gebruikt This e mail address is not valid
18. 1 74 2 74 115 2 75 716 2 76 QUII 2 77 78 2 78 19 2 19 80 2 80 81 2 81 82 2 82 83 2 83 84 2 84 95 2 85 86 2 86 1875 2 87 Igor there are no invoices available er zijn geen facturen beschikbaar there are no plug ins available er zijn geen plug ins beschikbaar there are no templates available er zijn geen templates beschikbaar invoice factuur invoice date facturatiedatum date datum invoice number factuurnummer client number klantnummer company info bedrijfsgegevens el Teme Ambo klantgegegevens phone EgL tyr EST VES e mail e mail bank information bankgegevens description beschrijving VAT BTW equantity hoeveelheid unit price no VAT eenheidsprijs excl BIW unit price with VAT eenheidsprijs incl BIW total price with VAT totaal bedrag incl BIW choose the language for the invoice kies de taal voor de factuur print friendly version printervriendelijke versie discount example korting voorbeeld on total price op totaal bedrag on op choose a system kies een systeem name naam address adres website website telephone telefoon FEaxt s VES variabl
19. For overall statistics choose localhost This setup should have altered your etc apache2 httpd conf Open it with vi etc apache2 httpd conf Extend it so it looks like this Alias awstats icon usr share awstats icon lt Directory usr share awstats icon gt Options None AllowOverride None Order allow deny Allow from all lt Directory gt Now we have to restart Apache etc init d apachez restart Page 45 of 53 Linux High Availability Cluster Manual Edit the configuration file you just created to have LogFormat 1 Subsitute chosendomainname with your chosen name vi etc awstats awstasts chosendomainname conf We make AWStats read Apache logs chmod o r var log apache2 access log We start the monitoring by issuing the following command don t forget to substitute again usr lib cgi bin awstats pl config awstats chosendomainname conf If you have issues starting up check etc awstats awstats conf for SiteDomain and LogFile if they are correct Next we set up a cron job for AWStats crontab e Add the following line to the file 3 33 www data x usr lib cgi bin awstats pl a f etc awstats awstats conf a r var log apachez access log amp amp usr lib cgi bin awstats pl config full domain name update gt dev null Save this and your all set You can get the information by browsing to http
20. Lues ues ues ues ues ues ues lues ues ues ues ues ues ues lues ues ues LUES LUES LUES LUES Lues LUES ues ues lues ues ues ues ues ues ues Lues Lues Lues ues ues ues lues ues ues LUES ues ues ues Lues LUES ues ues lues ues ues ues ues ues LUES ues ues ues ues ues lues Lues ues Lues ues 2 2 2 2 2 2 2 2 2 2 2 2 88 88 89 89 90 90 91 91 92 92 193 193 94 94 95 95 96 96 97 97 98 98 99 clean up database ruim databank op back up database back up databank add toevoegen edit aanpassen delete verwijderen you are not an administrator u bent geen administrator switch user to or from administrator verwissel gebruiker van of naar administrator administrator administrator new account for the Global Invoicing application nieuwe account voor het Globale Facturatie systeem there are no companies er zijn geen bedrijven current logo huidig logo remove current logo 2 99 verwijder huidig logo 100 no 100 nee 101 are you sure 101 bent u zeker 102 continue 102 ga verder 103 compare to what languages 103 vergelijk met welke talen 104 langua
21. Mar Figuur 5 3 PHPSysInfo Page 44 0f 53 411 46 MB 13 85 GB 13 03 GB 923 55 MB 50 63 GB 165 63 MB 1004 35 MB 50 03 MB 2 20 GB Jan Milants Jonas Pypen Dennis Vermaut 2 07 2007 20 02 2008 Linux High Availability Cluster Manual AWStats is a free powerful and featureful tool that generates advanced web streaming ftp or mail server statistics graphically This log analyzer works as a CGI or from command line and shows you all possible information your log contains in few graphical web pages It uses a partial information file to be able to process large log files often and quickly It can analyze log files from all major server tools like Apache log files NCSA combined XLF ELF log format or common CLF log format WebStar IIS W3C log format and a lot of other web proxy wap streaming servers mail servers and some ftp servers We start the process by installing the package itself We do this by issuing following command aptitude install awstats Next we have to set up the package for each domain we want to monitor cd usr share doc awstats examples mkdir wwwroot cd wwwroot mkdir cgi bin cd gunzip awstats model conf gz mv awstats model conf wwwroot cgi bin perl awstats_configure pl Confirm with y and fill in all required questions and know what your website root is This should be etc apache2 httpd conf Remember what domain name you chose
22. To stop heartbeat etc init d heartbeat stop This is a tool which makes use of the rsync algorithm to synchronize files and directories in a cluster It uses asynchronous synchronization so is not particularly suited for systems where the contents changes continuously however the use of a database to store information about the file systems does limit the time needed to synchronize the servers significantly Execute following command on both nodes aptitude install csync2 For the secured connections between the csync2 nodes we will need a local SSL certificate To generate one execute following commands on both nodes openssl genrsa out etc csync2 ssl key pem 1024 openssl req batch new key etc csync2 ssl key pem out etc csynca ssl cert csr openssl x509 req days 600 in etc csync2 ssl cert csr signkey etc csync2 ssl key pem out etc csync2 ssl cert pem First we have to generate a key that will be used by the resource group for authentication and copy it to all other servers in the cluster in our case just one To do this enter following commands csync2 k etc csync2 key linuxCluster scp etc csync2 key linuxCluster root HAC C1N2 etc Page 29 of 53 Linux High Availability Cluster Manual Now we have to define which resources are parts of the group In our case we will synchronize the home directories and the apache configuration between node 1 and 2
23. and trainees or whatsoever without having the risk that important changes are made to the system 25 Use case diagram Introduction A use case diagram is a type of behavioral diagram defined by the Unified Modeling Language UML created from an Use case analysis see next topic Its purpose is to present a graphical overview of the functionality provided by a system in terms of actors their goals represented as use cases and any dependencies between those use cases Diagram Back up database Edit company gt uses uses uses Z extends extends Administrator Everybody View plug ins VS 26 Use cases Introduction An use case is a description of a system s behavior as it responds to a request that originates from outside of that system Also these use cases can point out more requirements than what you had in mind at first or limitations you have to take not off Due to these use cases was able to implement the limitations to the user and language management without having to experience the problem first The first use cases will be the main use case which all others extend Log in Purpose To authenticate and check authorization for the user Short description The application cannot be used without being logged in The log in checks whether you can use the system and in what level Actors Everybody Frequency Average Scalability Low Crit
24. into into into into into item insert artikel insert insert insert insert insert insert insert insert insert insert insert into into into into into into into into into into into into seconds trans trans trans trans trans transl transl transl transl trans trans trans trans transl transl transl transl trans trans trans transl trans transl transl trans trans trans trans trans lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation Vai Vai val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val ues ues ues Lues LUES ues ues
25. invoices to it will be deleted as well It may be necessary that is why it is available anyway Add Adding a client to the system is a plain form that has to be filled out After entering all the information you simply hit the save button and the data will be stored The system will automatically check if the client already exists or not 78 Edit In this panel you can edit the saved information for a client If you do this the client data for the invoices linked to this client will also change If you create a new client with the add option this won t happen As long as one field differs a new client will be created So think carefully what you wish before you edit If you wish to edit a client you first have to select the client you wish to edit from the list of available clients After that you get a plain form again with the current data already entered You edit what you want to change and hit the save button Delete You can also delete a client but as mentioned before this isn t advisable To delete a client simply click on the client from the presented list You will be asked to confirm this choice Company management In this panel you can add edit or delete companies However you shouldn t delete companies as the linked invoices will also be deleted The function is provided anyway just in case Add To add a company fill out the fields and choose a picture if you want to add a logo The company will be stored in t
26. 2008 2008 2008 2008 2008 2008 2008 2008 D Binnenkomst paginas D Uitgang d c MEHEHENI ma H D Versies D Onbekend Jan 2008 o o a o Browsers Feb 2008 o o o o o E td Mrt 2008 o o a o o verwijzing Apr 2008 a o o o o Herkomst Mei 2008 o o a o o D Verwijzende zoekmachines Tn 2008 a i a ps ES EL Verwijzende sites Juk H ES 3 a Es D Zoek Trefzinnen Aug 2008 o a o a o D Zoek Trefwoorden Sep 2008 o A o 0 UOTA Okt 2008 o o o o o HTTP foutmelding codes Mos 2008 n n a n a 1 _ Niet oevanden nanina EME gt Klaar xo Adblock iin TST AAA AA AAN Figure 5 4 AWStats Page 46 of 53 Linux High Availability Cluster Manual Maintenance Introduction This setup has been designed to be easily maintainable even for people with little experience with Linux and clusters in general Because we have used the Debian Package Management system there should never be a need to manually install and compile new versions of individual packages or keep track of their dependencies If a server goes offline and is restarted later the system is designed to automatically synchronize the directories and switch resources back to the original node Since the MySQL databases that use the NDB engine run on the cluster the newly started server will immediately replicate all changes that have been made to the databases 5 7 Updating upgrading the system To keep the system updated execute following commands when logged
27. E insert into translate field name values no invoices insert into translate field name values no plugins insert into translate field name values no templates insert into translate field name values invoice insert into translate field name values invoice date insert into translate field name values date insert into translate field name values invoice number insert into translate field name values client number insert into translate field name values company info insert into translate field name values client info insert into translate field name values telephone short insert into translate field name values fax short insert into translate field name values email insert into translate field name values bank info insert into translate field name values cre send insert into translate field name values vat insert into translate field name values quantity insert into translate field name values unit no vat insert into translate field name values unit vat insert into translate field name values total vat insert into translate field name values choose invoice lang insert into translate field name values print friendly insert into translate field name values example discount insert into translate field name values on total insert into translate field name values on insert
28. EUER UR E TRANCE vo NERA RR ieee 6 nugeTo Vracfojette E 6 Gathering requirements cnt rex ert eee eE ve aea ata 7 o aei EE 7 MOSCOW cS 7 Mr 7 ec 7 Gon EUM 7 WOR tania en noden meneren eneen vaders edere a E 7 Database nnen annette nenten ve 8 IN OOUELON eem 8 MUltilatigddge z cocos neden onee 8 RUI Schere tee ne eene Reenen telden 10 DE Li Wo fe do al iatait 11 ANGUS A OPIDO LL ULL 11 Ma ES 11 Chur ON 11 order detall etie tete ae EE E et eR vanes ute a vers uc Eaa aE t ses une naer E OaE aE 11 order ASCO MN A Rte it tete bod ERU I d i odi odds vs 12 A SCOUT e 12 jc e CO o HER 12 oge EE 13 USBS ssa 13 COMPANY midid O ve M 14 last done Order atit tte eite aaa Enc REI UE EROR VUE Te RAINER MEE 14 MI H 15 Remarks about the database scheme cooooccnoccconocanoncnonannnnonnnnnnnnnnnononnnnnnonnnnnn nennen nennen enne 15 COC PEPPER 16 SEU os 16 Pr 18 Thieoretic l sages A senium iet Om ndn 25 INTO UN soiree te AAA EX HE RE ER HERE REVERSE EORR Nego et 25 TYPEOLUSSNS Ernestine IE 25 AdmitiisttatO s o tee rr t e de tee as Pn e ere erret te TO ve 25 MAI Aa 25 Use case diagraltm ettet tee
29. Integer Plugin clone destruct 54 MySQL This class does all the MySQL related work MySQL db Resource dbResult Resource dbNrResults Integer dbAffected Integer dbInsertedld Integer dbServer String dbUser String dbPass String dbDatabase String e o oo OO Oo OO O construct foreign setup Bool Connect dbserver String dbuser String dbpass String setDatabase dbname String doQuery query String Resource NumRows Integer NumAffected Integer Insertedid Integer GetObject Resource SelectNext Array Error String Close destruct 55 Language This class deals with getting the languages changing them and storing the information in cookies Also getting the interface values is the task for this class e O 00 0 Language dbobject MySQL queryobj QueryList CurrentLanguageld Integer globalArray Array construct getCurrentLanguage Integer getGlobals Array Globals getGlobal name String String getGlobalSilent name String String setCurrentLanguage lang id Integer setDatabaseObject dbobject MySQL getLanguageSelect String getLanguageSelect2 String destruct 56 Invoice This class gets all the invoices and their information from the local database Invoice company Array client Array items Array order Array discounts Array language_id Integer globals Array langobj Langu
30. KB 10 00 MB devshm 10 124 99 MB 0 00 KB 124 99 MB tmpfs Irm ENS 14 107 82 MB 17 17 MB 124 99 MB ext3 dev sda2 EN 22 69 31 MB 21 12 MB 95 53 MB iso9660 dev hdc ENS 100 0 00 KB 679 23 MB 679 23 MB Totals 2 46 GB 6 17 GB 9 03 GB Installation and Configuration of Damn Small Linux This part will show you what to do to install DSL successfully on your USB stick We have tried several ways to install a fully working environment on a USB stick but the one we will explain is the fastest and easiest and assures you it will work Its only downside is that you need to burn a bootable cd dvd first Requirements Before we can start we have some requirements we must meet Checklist e Computer running Linux this may be a Live CD e USB stick 256MB of size or more formatted e DSL CDISO e empty rewritable cd dvd e Floppy Disk 1 55MB formatted in case USB boot isn t supported by the BIOS The Linux distribution and the floppy boot image are available from the DSL website http damnsmalllinux org You can download all the software to your local computer Creating a stick Preparing the live cd First we format our stick as FAT32 This isn t really needed but that way you are sure you can throw everything away that s on it In Linux you use this command it mkfs vfat dev sda1 Don t forget to substitute your sda1 to your drive If the command fails you might need to install dosfstools and or mtools In
31. NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci ALTER TABLE language ADD Foreign Key translate field id REFERENCES translate field translate field id ON DELETE CASCADE Table structure for translation DROP TABLE IF EXISTS translation CREATE TABLE translation language id int 11 NOT NULL translate field id int 11 NOT NULL value varchar 255 NOT NULL PRIMARY KEY language id translate field id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci ALTER TABLE translation ADD Foreign Key translate field id REFERENCES translate field translate field id ON DELETE CASCADE ALTER TABLE translation ADD Foreign Key language id REFERENCES language language id ON DELETE CASCADE Table structure for item DROP TABLE IF EXISTS item CREATE TABLE item item id int 11 NOT name varchar 50 NOT NULL description varchar 255 NOT NULL price no vat double NOT LL vat percentage double NOT NULL PRIMARY KEY item id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci 16 Table structure for discount DROP TABLE IF EXISTS discount CREATE TABLE discount discount_id int 11 NOT NULL auto_increment value double NOT NULL translate field id int 11 NOT NULL is percentage char 1 NOT NULL DEFAULT Y on total char 1 NOT NULL DEFAULT N low limit double DEFAULT 0 item id int PRIMARY KEY di
32. Scalability Average Criticality Average Indirect demands Preconditions The user must be logged in Post conditions The user must be logged out Primary way e Uses chooses log out from the menu Use cases related to primary way e Login Alternatives The user closes his browser If the save log in information option wasn t checked the user is logged out Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 50 Change language Purpose To change the language of the system for the user Short description The user can change the language of the interface Actors Administrator Viewer Frequency High Scalability Average Criticality Average Indirect demands Preconditions The user must be logged in Post conditions The interface should be in the chosen language Primary way e User chooses a language from the selection Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 51 Class diagram This diagram will show how the PHP classes are related to each other and how they are used in general Legend o Private e Public Protected Plugin This class deals with getting all invoice information from foreign databases read only without writing any
33. The full manual and theoretical background for this invoicing application is provided as the third attachment to this thesis Multilanguage As mentioned before the system has to support multiple languages but in a way that adding or changing a language doesn t need any knowledge of programming Off course switching languages also has to be quite fast and it would also be nice if it is possible to transfer this system to other systems All this combined makes the choice for storing the languages and the translations in the database pretty clear A database is an extremely easy way of storing information text data and gives back data in a very fast way 22 The schema for just the language system looks like this PK language id language code translate field id translation t z PK FK1 language_id PK M MILI eee PK FK2 translate field id This system is based upon the fact that each field column field in the database needs to be translate field ranslate field id translated is stored in the translate field table and is referenced by the translate field id So the translate field keeps an id to refer to and an unique name to identify the field The translate field id is an integer generated by MySQL itself by the auto increment setting This ID will be used in each column that needs translation This means the fields have to be created before they can be used in other tables as the foreign key r
34. This requires some installations and adaptations Make sure a network cable is attached and then startup your Damn Small Linux Updating We are going to make sure our packages etc are the newest available First we have to enable apt get That way we can easily install and update packages and software for our system Make sure you have a network connection with internet To do this right click on your desktop and choose Apps gt Tools gt Enable Apt This will start downloading a few packages and you have to hit enter when it s done To do the update upgrade issue these two commands sudo apt get update sudo apt get upgrade You will have to choose some settings for PC cards Choose always to stop the support on upgrading and make sure not to start the support on reboot You can do this if needed later but then you would have to edit some configuration files After this you ll get the question to overwrite a file Confirm with y Restart your system afterwards To do this hit the DSL in the left lower corner choose Exit gt Exit options Make sure you enable backup Preparation The first step is to put the keyboard settings to Finnish as all systems this tool will run on will have Finnish keyboards Right click your desktop and choose Setup gt X Setup Choose Xvesa xserver Choose No for USB mouse You should choose an IMPS 2 mouse As resolution choose 1024x768 pixel Color
35. When arrived Jonas had just finished installing the operating system the web server and the database service A lot of adjustments and tweaks still had to be done Also Jonas had already found out that the provided manual was far from complete and correct so we also had to correct this manual During the further installation we found out that a lot was wrong and or incomplete We even had to reinstall the web server and database service and reconfigure them completely This was good for me because that way didn t really miss a thing and could get to know Linux very good and that was what wanted Next to this default configuration had to set up the servers to be power failure safe using an UPS This was a Dell PowerWare and the software still had to be installed on all servers Everybody was of the idea that just plugging it in was sufficient until actually pulled out the main electricity plug and everything went down as both Jonas and expected Next to this Ganglia still needed to be installed on the second cluster the same for PHPSysInfo Next to these installations and configurations had to expand all the servers with the free statistic tool AWStats After all the programs had been installed and configured was notified that all mailing done by the websites should go through an external mail server ns2 stadia fi Configuring this is really easy ina Windows server In the php ini file you just set the SMTP directive to this se
36. and write it to a CD using a modern CD burning tool which allows you to write bootable CDs based on an ISO image Start the server an insert the CD before the system starts looking for a bootable device If necessary you may need to reset the system in case the CD is not loaded before this time debian Gnu Linux ress F1 for help or ENTER to boot installgui_ Page 10 of 53 Linux High Availability Cluster Manual In case the system does not check your CD drive for a bootable device you will have to change the configuration settings in your BIOS to make the system boot from CD Refer to the technical documentation of your server for details on how to do this Once the system has booted the CD you should get a screen as shown in Figure4 2 Now you can choose between the text mode installer and the graphical installer For GUI installation installgui For text mode installation lt CR gt 4 2 2 2 Localization When the installer finishes loading you will be shown the language selection screen After selecting the language of your choice press continue O debian RANA Choose language Please choose the language used for the installation process This language will be the default language for the final system Choose a language Chinese Simplified 32 4 Chinese Traditional da 32 9 1 Croatian Hrvatski Czech e tina Danish Dansk Dutch Nederlands Dzongkha f
37. are delivered by a PHP function and doesn t rely on any library or application like MySQLDump delivered with the system so it can be used on any PHP MySQL server The function can be checked at functions getdb php 81
38. classes in quite a decent way but had never done this before so this was a challenge I ve put on myself Classes in PHP aren t used like classes are used in normal programming languages like C and CH Where in the other languages a class should only exist for one reason SRP Single Responsibility Principle PHP can do this too but most of the times it is used to gather related tasks in one class and to hide the complexity of these tasks from the main pages The application had to be multilanguage in a way you don t have to write code if you change add remove a language Due to this requirement and as a matter of speed chose to save the language information in the database Also this language system database managed could be useful for my next assignment the altering of PR Consulting Not only for these projects this could come in handy but this can come in handy in the future for any multilanguage system want to design In one the projects had already done for my courses had provided a similar system but that one wasn t optimal yet Keeping the remarks for this system in the back of my head designed a new system which can be used on every database even an existing one with very few changes The plug ins the default system would come with are plug ins for Moodle This website is a project of another Erasmus student from Spain Antonio A second plug in will come from the next assignment l Il be working on PR Consulting
39. eee tr ee S eee cei eet dx 26 PERO DUCTION er EE 26 A e I QUUD IBID qaa nerd 26 US CASES EET 27 euigeroli es ol erc 27 Login AE 27 Edit PO Msi ER 28 Cr ate a blank INVOICE memo dad 29 Create an invoice from a plug in ooccccconnnononnnnnnnnnnnnonnnnnononnonononnnnnnnnnnnnnnnnnnncnnnnn nro nnnnnnnnnannnnnos 30 VieW archiVez santen EI ete to Feo tlie m ea EI EO et se 31 Create a new company ederent ovo A ea rena een uu derek meae A eve dae nee nda Tags evades 32 View TEM Plates cete oci t RR DRE EO YE EET EE Pe E MRE NS 33 View TE 34 Edit contiguratiorisettings rer AA tene sense drenken 35 AUS m 36 mST d 37 BT KD E E E E E E E E A 38 Add client 3st E deat te ere tete edere eese in e T a 39 Edit client ie REED O OE HERE 40 Delete client 3 a Rea aee dae ao ate e ERRARE e ld 41 Edit comparny oa ertt th eei t deri tatis eter voe ete eae TS 42 Delete company iaa 43 Adclatiguage z sarete cl UI MM MY e 44 Edit language uer rette eite ney eei 45 Delete language eee erret ee merecen estet cete eee Fete en eig 46 Add global ed orare ceo ae EE ite dur o a UR ME fe 47 Cleanup databases sette ease eivai aatia 48 Back up database Rer Tere ere te da tette E ne beteren 49 LOg OLO iid ae E ve a nien inni ene 50 Class diagkarmi uite Ai e Suet ats tte 52 EBEN recession a cele tht nie ttt ee A t o teme toe th da e d 52 PLU Rags a ndn vete und m An 52 AMETS 55 language oiee eA
40. eerste deel van mijn taken Jonas en Nick moesten aan applicatieontwikkeling en synchronisatie doen op de Nokia N810 Wouter tevens Oost Vlaming is er na mij toegekomen en had als opdracht met een Cisco box aan de slag te gaan rond VOIP Voice Over Internet Protocol en SIP Session Initiation Protocol Samen met hen zat ik op het zelfde lab waardoor er regelmatig wat afgelachen werd en we elkaar om hulp konden vragen in onze moedertaal wat altijd gemakkelijker is en sneller gaat Verder gaat mijn dank ook uit naar Corneel Theben Tervile mijn lector Java Dankzij hem is de papiermolen alsnog in beweging getreden Ik wens ook mevrouw Isabel Uitdebroeck en mevrouw Siska Wielfaert te bedanken om alle papieren te helpen vervolledigen en door te sturen Nog eens een extra dank gaat uit naar mevrouw Siska Wielfaert omdat zij ook tijdens mijn verblijf in Helsinki verder bleef informeren en verder keek om een beurs te regelen voor me Ik wens ook mevrouw Kristien Roels te bedanken mijn stagebegeleidster Zij heeft altijd gecontroleerd of mijn werkopvolging in orde was Dennis Vermaut Helsinki 21 05 2008 Preface This thesis has been made as a report for my practical training in my last semester of my studies as Bachelor in Applied Computer Sciences My placement was Polytechnic Stadia Helsinki in Finland During this practical training the student has to prove his knowledge and know how in a real world environment and also expand his knowledge and
41. etre vatten annet ane edil tada eri Ui va ee idee sia ei aea 11 Compilers for foreign packagesS cccccocononooooncnnnonononnnnnnnnnncononenononnnnnnnnennnnnnnnnnnnnnnnnnnnnnnnnnnnnnennnnnnnannos 12 G nglid amp PHPSyslrifo cicini tere dia 12 Howto Use the tool ceca iere tertio tege tan destripar T up dade anilla ea ie ERR de bn 12 Preparingto boot from USB aa 12 hiferatmengareecteec dass 13 Introduction If you want to be able to monitor the cluster anywhere in the network it would be convenient you can just carry or save the test tool to a compact device This way you don t need a computer with everything installed on it You just plug in the device and can check it The device we could use for that nowadays is an Universal Serial Bus device also known as USB stick They are very compact and sizes go from small to very big compared to its physical size As our monitoring tool Ganglia runs on Linux we should have everything on the stick needed to run from Linux But this means you still need Linux on the computer you want to use So we go a step further we place an entire Linux distribution on an USB stick provided with the software we need This way we can also provide manuals a graphical interface and a complete monitoring suite As extra bonus to this set up we can also use this tool to monitor the computer we are working on with the tool That way you can have a quick check on ever
42. gt ClearClient Sthis ClearCompanylnfo Sthis gt ClearDiscountTranslations Sthis gt ClearDiscounts Sthis gt Clearltems Sthis gt Connect Sthis gt ClearInvoicesArray Then we have to fill the object with all the invoices available in the foreign system You will probably have to do a query for that To do a query do this If you haven t done this yet connect to the foreign database Sthis Connect 64 Then type in your query and store it in for example the variable sql Your query might look something like this Ssql SELECT FROM orders WHERE Sthis gt GetStringNotld Sthis gt getLastUniquelds id ORDER BY id Note the GetStringNotld and getLastUniquelds functions provide the information to create a much smaller result The getLastUniquelds functions returns an array with all the ID s integers that have already been processed for this plug in If the plug in doesn t support the unique option it will return an empty array The GetStringNotld function takes an array of integers and a column name Then it will create a string that can be used in the WHERE part of your query The string created will be like WHERE column_name id1 AND The WHERE isn t put in the string but you get a string back that you can place after the WHERE It makes sure you get results back where the ID is not in the array To execute this query and loop through the result
43. in as root aptitude update aptitude upgrade This will perform a so called safe update which means that existing packages will be updated if updates are available but not packages will ever be installed or uninstalled To perform an upgrade of the entire distribution execute following commands aptitude update aptitude dist upgrade If aptitude is executed without any parameters it will enter the interactive mode which provides an overview of all available packages n IJ Q y T x d ID recceac y 0 i L Garesses When moving the servers to a new IP range the IPs configured on both nodes need to be changed on a few places The cluster IP only needs to be changed on 2 places on each node in the etc hosts file and in the heartbeat CRM configuration file var lib heartbeat crm cib xml The nodes IP addresses only need to be changed in etc hosts which is automatically adopted by the rest of the system And of course the node also needs to be told to listen on another IP in the network interface configuration etc network interfaces Since the direct connection between the 2 nodes is a direct link there should never be the need to change their addressing scheme Page 47 of 53 Linux High Availability Cluster Manual 6 Installation of a Powerware 5115 UPS for a High Availability Cluster 1 6 1 Introduction To make sure that the servers can shutdow
44. installation ue ipd salo ende debba kd e n phil ebd an 10 14222 Localization sail n 4 2 2 3 Keyboard Selection ennen envensensennensensenseneensensencensenseneenennenseenennensensenven 12 dat Network Cant GERI Qe i eei iani eae Urge bu ede e ai 12 1225 Parton Disk ios 14 4 2 2 6 Setting up users and passwords cssssissiccsssasscesnssneccvecsansscuennaccsceecedseansmassccsaenesncanns 19 4227 Configuring the package manager cistitis 19 des Setting p OS oon eee arena ee NNNM PUE 20 4231 Booting in command line escri 20 4 2 3 2 Configuring Network Interfaces essent rennen nnne 21 1233 Configuring pt rans meden edited elen eee 21 4284 Installing and Configuring SSH neee stenen eeb neden 22 4 2 3 5 Installing the Web Server ness enn envenvenvenvenvenvensenveneenvenvenennvenvenenvenseeven 23 43 Jnstalling the Clan 25 431 Introduction sra iia 25 Page 2 of 53 Linux High Availability Cluster Manual 4 32 General OS dd RE 25 ASQ H E E ida trata 25 433 CHgartbeat acceda eti id ette 25 Tas O Ad etek den 25 4 335 Installation tai ea ditsoauacite 25 da A e O 26 4 3 3 4 Starting and stopping heartbeat essere rennes 29 4 3 4 EE Raa Re enn DR ue a a A 29 LATE tro da DAS A 29 ASAS Installation e ERR etn wah accede GR eR bs EUREN ieee 29 4 323 Confisutat los De EP Et cous Er E BREVE nott 29 AAA RUI doct odia dete AA alib A 31 435 Apache Web Bervel oes eee hem n at M ea A AE E E A a ARER 31 3 54
45. know how This report will describe my tasks at Polytechnic Stadia Helsinki and how took care of these tasks In the attachments there will be manuals and documentation included which were made as part for my tasks and or cannot be missed to perform the tasks or operating the accomplished tasks This report is meant for follow up on the done tasks or to gain more information about the tasks and how to continue working on them would also like to take some time to say thanks to a few people who have helped my getting my practical training guided me and or helped me during the training First and for all would like to explicitly thank my parents because they have always supported me in my choice to go abroad both in a moral way as in the financial way would also like to thank the rest of my family and my girlfriend for their many messages and support received Next to them definitely want to thank Kirsi Paaso and Anneli Luoto As chiefs of internationalization for Polytechnic Stadia Helsinki they made sure all the papers the placement and my residence were okay and that in very short notice Together with them also have to thank Kari Bj rn a lot He is the head of the IT department for Polytechnic Stadia Helsinki and was my mentor as well He made sure had decent tasks to perform and gave me a very good opportunity to learn a lot of things during my practical training Then would also like to thank Hamok Hamok is the associa
46. lation values 2 10 herbeginnen lation values 1 11 menu lation values 2 11 menu lation values 1 12 home lation values 2 12 start 20 insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert profile insert passen insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert invoices are listed into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into Le into DO into into into into into into into into into into into into into into into into into into into into into into into into into into into transl transl transl transl trans trans trans trans transl transl transl transl trans trans trans trans trans transl trans transl transl trans trans trans trans trans transl transl transl trans trans trans trans transl transl trans trans trans trans trans transl trans transl transl transl trans trans trans transl tran
47. no host dmax 3600 secs cleanup threshold 300 secs gexec yes cluster name HAC C2 owner Stadia Page 41 of 53 Linux High Availability Cluster Manual The host section describes attributes of the host like the location host location ServerRoomb5fl We are not sending this information to other hosts udp_send_channel mcast_join 239 2 11 71 port 8649 ttl 1 udp_recv_channel mcast_join 239 2 11 71 port 8649 bind 239 2 11 71 You can specify as many tcp_accept_channels as you like to share an xml description of the state of the cluster tcp_accept_channel port 8649 continues Please restart the Ganglia services by issuing the following commands on both nodes etc init d ganglia restart Next we have to change a little setting to gmetad To edit the file issue following command vi etc gmetad conf Find the line defining data_source and change it to this data source HAC C2 192 168 182 16 192 168 182 17 Save this settings and restart gmetad by issuing the following command etc init d gmetad restart To test the configuration enter the following URL on a desktop pc within the same network http 192 168 182 15 ganglia The output should look similar to the following Page 42 of 53 Linux High Availability Cluster Manual Ganglia Cluster Report
48. o Alltemplates are automatically processed from its directory o Create as many templates as you want E mail addresses are checked for valid structure with JavaScript Regular Expressions Multi language support o Adding editing removing languages in a fast and easy way o Incomplete translations are caught with default translations Plug in system for invoice systems o Multiple plug ins can be created for all sorts of systems even remote systems o Plug ins are put in directories sub directories and automatically processed Prevention on search robots like Google and Yahoo Previewing invoices in all available languages o Independent on the language used for the application Strong class based framework o Strong and complex class usage with a lot of different easy to use functionalities provided Strong discounting possibilities o Low limits for price o Ontotal amount o Percentage or value Support and optimized for the most used browser engines o Tested on Internet Explorer and Mozilla Firefox on multiple resolutions Query localization o All queries are stored in a single purpose class so all queries for the entire system can be easily located and altered and or expanded if necessary 72 Default security Introduction As this web application will be used as an application and not really as a website the access should be limited somehow as the server is reachable for the public This means we use the server as an application server and web server i
49. of California 5 3 2 Installation This installation will be done on the 2 cluster since this is an update of the documentation Of course you can do exactly the same on the 1 cluster but change the IP s then Download the tar file from the internet http ganglia sourceforge net There we have a problem in the lab The private network within the Stadia environment only allows us to download ftp unless we set up a proxy So there we have to come up with another solution We have to download the file to an USB stick on another PC which has regular access to the internet or wireless Afterwards plug the USB stick into the first server Wait until the server recognises the USB stick Debian will tell you what device it is dev sd Make a directory where we can mount the USB device mkdir tmp usb Next we have to mount the USB device to that folder Issue the following command mount dev sda1 tmp usb Paste the contents of the USB device to the ganglia folder Issue following command to make the ganglia folder do this on both nodes Page 38 of 53 Linux High Availability Cluster Manual mkdir tmp ganglia and now paste the contents to it scp r tmp usb ganglia 3 0 6 tar gz tmp ganglia Unmount the USB device Issue the following command umount dev sda1 You can now safely remove the USB device Next copy the file to the second device scp r
50. remember it for himself found this necessary because there is no registration form for this application It is simply not needed The administrator s create the accounts and choose the profile data Once logged in the user can change the data Checking if the username is free is done by AJAX Asynchronous JavaScript And XML AJAX makes it possible to refresh only parts of a webpage or do server actions without refreshing the entire page JavaScript is also used to check for valid mail addresses by using regular expressions Another problem had to deal with is the way invoices are stored in foreign databases If the foreign database wasn t designed for invoicing purposes then there might not be an unique integer based ID for an invoice So the plug in system should both support systems that have these ID types and systems that don t support an unique ID for an invoice If it is possible to get an unique ID we also have to store this ID in a way that we can store it for each plug in without altering the internal database structure So for each plug in we store the name of the plug in which should be unique the ID for the invoice in the foreign database the date and time when we put it in the invoicing application and what invoice it is locally As key for this table we take the name of the plug in and the ID in the foreign database 26 Another problem is a problem every web designer has to keep in mind differences in the HTML parse
51. requested datetime On what date was the X order set up system varchar 50 From what website is this Name of the X order not through FK system where due to plug ins that may we get the be removed but archive invoice from must still exist php plugin file payed char 1 Has this invoice been X payed yet default N company id integer For what company is this company by X invoice Foreign Key user id integer What user made this user by X invoice Foreign Key client id integer For what client is this client by X invoice Foreign Key template varchar 50 What template was used The used for this invoice not template file through FK due to php template templates are just files file which may be removed If a template is empty or doesn t exist the default template will be used user Name column Type of column Description References to required user id integer Primary Key for user X username varchar 50 What username will the X user use to login unique password char 32 The password for the X user to log in MD5 firstname varchar 50 The first name of the user X lastname varchar 50 The last name of the user X email varchar 50 The e mail address of the X user admin char 1 Does this user have rights X to use the admin panel default N An user is anybody who logs in to the system to use the web application 13 company
52. this db foreign connection doQuery Ssql while Sresultrow Sthis db foreign connection SelectNext Your actions This will execute the query in a good way with error catching if necessary and everything Please only use this way of talking to the database as this way is the most secure way for the application There s also a lot of chance you will do other queries while processing the result To create an extra connection object to do this you have to call the NewConnection function and store the result in an variable to use as connection resource In this example the variable is Sconnectionobj Sconnectionobj Sthis gt NewConnection For every invoice available in the loop clear the subparts before processing Sthis gt ClearClient Sthis ClearCompanylnfo Sthis gt ClearDiscountTranslations Sthis gt ClearDiscounts Sthis gt Clearltems In this loop we then fill everything up correctly using these functions Sthis gt FillClient Sthis gt FillCompanyInfo Sthis gt FillDiscounts has to be done for each discount in the current invoice this gt Fillltems has to be done for each item in the current invoice 65 These functions take the following arguments e FillClient Sfirstname Slastname Saddress Stelephone Sfax Semail Sbank Svat_number e FillCompanyInfo Sname Saddress Semail Swebsite Stelephone Sfax Sbank Svar1 Svar2 var3 Slogo url e FillDiscounts S
53. to exceptions Remarks 40 Delete client Purpose To remove a client from the system Short description The administrator removes a client from the system Actors Administrator Frequency Low Scalability Low Criticality Average Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The client should be edited Primary way User chooses admin panel from the menu User chooses client management User chooses delete e User chooses a client Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 41 Edit company Purpose To edit a company in the system Short description The administrator edits a company Actors Administrator Frequency Low Scalability Low Criticality Average Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The company should be edited Primary way e User chooses admin panel from the menu e User chooses company management e User chooses edit e User chooses a company e User hits save Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions
54. wait until the boot process is complete If you used a floppy the floppy has to initialize first and this takes a little while and thus booting from a floppy is a bit slower 12 Monitoring To monitor the clusters right click your desktop and choose Apps gt Net gt Browsers gt Firefox Below the navigation bar you will find some bookmarks provided for the monitoring Hit any of them to open the web application 13 HELSINGIN AMMATTIKORKEAKOULU Global Invoicing Theoretical background and Usage Manual Dennis Vermaut 13 05 2008 pS Preface This manual includes all information about the Global Invoicing web application The Global Invoicing web application is an PHP5 MySQL5 based application running on a Debian cluster The main purpose of the application is to invoice data from multiple systems in one central application and store them The manual includes a theoretical background of the application This will include statement of requirements database schema s SQL queries use case and an overview of the features in the final product The next included part will be the user manual for this application How to use the application how to manage As last part of the user manual will be guidelines on how to design templates and or plug ins for the application Table of contents Preface TN 1 Table OF cota m 2 Theoretical DackBroUrid s caet coi ee tete ESSE INSERERE SR SEE EE RR S CE CERR EE REN ARE
55. 1 192 168 182 10 24 eth0 This instructs heartbeat to monitor the IP resource 192 168 182 10 24 on etho and sets HAC CiN1 as its default node Now convert this file to the version 2 configuration file with following command python usr lib heartbeat haresources2cib py tmp haresources temp Now the configuration file should have been generated but we still have to change a few options Open the CRM configuration file of heartbeat which is located at var lib heartbeat crm cib xml Open the file and make sure following lines are present and set to their appropriate values nvpair id cib bootstrap options default_resource_stickiness name default_resource_stickiness value 0 gt Legend e default resource stickiness determines whether the resources will automatically fail back the original or any other better node when it becomes available In the above sample the IDs are shown as they are generated by the configuration file generator however if preferred the IDs can be renamed to something shorter on the condition they remain unique Page 28 of 53 Linux High Availability Cluster Manual While heartbeat will usually start automatically when the servers start up it may be necessary to shut them down or re start then manually for example during updates and now after changing the configuration To start heartbeat etc init d heartbeat start
56. 192 168 182 11 HAC C1N1 ciscolab stadia fi HAC C1N1 192 168 182 12 HAC C1N2 ciscolab stadia fi HAC CiN2 192 168 254 1 HAC C1N1 ciscolab stadia fi HAC C1N1 192 168 254 2 HAC C1N2 ciscolab stadia fi HAC CiN2 192 168 182 10 HAC C1 Next we check if our resolve file is correct Open etc resolv conf vi etc resolv conf It should look like this search ciscolab stadia fi nameserver 10 20 16 25 nameserver 10 20 160 252 And then reboot the system reboot Depending on which packages you selected ssh and sshd may not have been installed during the installation If they have already been installing no harm is done If they haven t been installed yet they will be downloaded and setup with default configuration To install ssh client and ssh daemon type following command aptitude install ssh It will ask you whether you want to download and install 2 packages answer Y When the installation is complete the ssh daemon will have been started and is configured to automatically start during boot This is the ssh deamon allowing remote clients to login to the machine through ssh Page 22 of 53 Linux High Availability Cluster Manual By default Debian will not allow X and agent forwarding to enable this open etc ssh ssh_config and uncomment the directives ForwardAgent and ForwardXu and change them so the end result should look like Host ForwardAgent yes
57. CES client client id Table structure for order detail DROP TABLE IF EXISTS order detail CREATE TABLE order detail order id int 11 NOT NULL item id int 11 NOT NULL quantity int 11 NOT NULL PRIMARY KEY order id item id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci LTER TABLE order detail ADD Foreign Key order id REFERENCES order order id ON DELETE ASCADE LTER TABLE order detail ADD Foreign Key item id REFERENCES item item id ON DELETE CASCADE gt ap Table structure for order discount DROP TABLE IF EXISTS order discount CREATE TABLE order discount order id int 11 NOT NULL discount id int 11 NOT NULL PRIMARY KEY order id discount id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci ALTER TABLE order discount ADD Foreign Key order id REFERENCES order order id ON DELETE CASCADE ALTER TABLE order discount ADD Foreign Key discount id REFERENCES discount discount id ON DELETE CASCADE Data Default data for the invoice system use invoice Languages for the system insert into translate field name values English insert into translate field name values Dutch insert into language language code translate field id values EN 1 insert into language language code translate field id values NL 2 insert into translation values 1 1 Engli
58. Cluster Manual NameVirtualHost 192 168 182 10 lt VirtualHost 192 168 182 10 gt Afterwards restart apachez etc init d apache2 restart Then we have to look how we can automatically add the virtual IP when the system is booted We will do this by making a file vi etc init d local In this file we place the following content bin sh sbin ifconfig etho o 192 168 182 10 Afterwards we execute the following commands to give the created file more sense chmod 755 etc init d local update rc d local start123456 mkdir etc rc d In s etc init d local etc rc d rc local To let the configuration work we have to manually restart the nodes Issue following command reboot Page 24 of 53 Linux High Availability Cluster Manual We will first be installing the programs used to keep track of the availability of the resources in the cluster To keep the time on our server synced to UTC we will use the Network Time Protocol NTP through a client that syncs the time on boot and after that does regular small corrections if needed To install the NTP client execute following command aptitude install ntp ntpdate The program will automatically run but since large corrections are only made during boot to prevent interfering with other system services it is recommended to reboot after executing this command If you want to u
59. Consulting een web shop Het onderhoud moest vereenvoudigd worden alsook moest het systeem effici nt meerdertalig gemaakt worden Hiervoor werd de techniek van de Global Invoicing applicatie ingezet Ook moest er een conversie gebeuren van PHP4 naar PHP5 Summary In this thesis the installation of a Linux High Availability Cluster will be described as first This includes first the installation itself and next the configuration of all the necessary software for the cluster Also the configuration of the Exim4 mail server software for the usage with an external mail server is included A second part is about monitoring servers clusters from within a Linux environment with Ganglia And this from a pen drive In detail this includes installing a Linux Operating System on a pen drive and after that the research how to place the monitoring software on the system A third part is all about the Global Invoicing web application This application makes it possible to create invoices edit them archive them and print them in an uniform manner The invoices can come from any database source or from direct input The application supports multilanguage in a fashion that can be adapted to any PHP MySQL website The system is also able to deal with multiple templates to show the created invoices The last subject includes the revision and extension of the PC Consulting web shop The maintenance had to be simplified and the system had to be made multilanguage
60. English Esperanto Esperanto Estonian Eesti Finnish Suomi French Fran ais Galician Galego Georgian jo6o3co German Graal Deutsch Emu Go Back Continue Figure 4 3 Language Selection t gt 5 5 Next you will be asked to select your country you may have to select other if your country is not in the shortlist this is based on language selection If you selected a less common combination of the language and location there may be several localization options in which case the installer will ask you which one you wish to choose If this is the case simply use the default one the one already selected for example en US UTF 8 Page 11 of 53 Linux High Availability Cluster Manual O debian RANA Choose language Based on your language and country choices the following locale parameters are supported Choose a locale en US UTF 8 en US en US I50 8859 15 Go Back Continue Figure 4 4 Localization Options Finally you may and I say may because for some reason the installer is not consistent in offering this be given the chance to install additional languages The names are made up as follows language country It is possible there is a code behind that like UTF 8 or euro in which case the UTF 8 is preferable Simply select the ones you want to install if any and press Continue 4 2 2 3 Keyboard Selection Next you have to select y
61. Forwardxll yes Then restart the sshd etc init d ssh restart We will be using the apache 2 2 3 4 web server which is the latest release for Debian at time of writing Depending on which packages you selected during install apache may or may not have been installed To verify whether it is already installed type following command and look at the State line in the package description If it says installed then you can skip the installation aptitude show apache pager Press Q to exit the pager If it is not yet installed even if installed this shouldn t hurt but it unnecessary run following command to install the package aptitude install apache2 Next we will be adding phps to this installation aptitude install php5 When the installer is finished Apache will be running and configured to automatically start when the system is booted We also need to set up a second virtual IP address besides loopback That might be interesting for the Apache web servers When the web server receives an incoming request it can direct the request to one of the servers but it won t matter which one it is to the user To do so we have to give apache the virtual IP address Issue the following commands on both nodes Open vi etc apache2 sites available default You have to change some settings so they look like this Page 23 of 53 Linux High Availability
62. Gi os BA A Form Post Hijacking D zelf een Japanse tuin Reiko chan s Japane C Paintball 2Link be ConnectionStrings co Ed Farbtastic jQuery col 3 Telenet Foto Jessic FT Global Invoicing B English IN admin v 1 127 0 0 1j For the rest of this manual all items listed in the menu will be explained in the way they appear in the menu administrators menu This way it is easier and more effective to read the manual as for each step we can drop the click there there and there to get here part 71 Key Features AJAX powered check for usernames Altering invoices and data in invoices with as new option o Changing data for an item can be automatically processed to all invoices depending on it or the change can be saved just for this invoice item Anchor based invoice templates o Templates can easily be made independent of the information they get Automatic copyright notice adjustments o This improves maintenance a little bit and is often a forgotten thing to adjust Cookie based log in remember me function Created invoices are stored in own database system o Checking archives o Editing invoices without touching the remote database o Fasterand independent processing o Printing the invoice over and over again using any template Database management o Independent back up functionality o Clean up to keep the internal database as small as possible Easy extendable template system
63. Log out Invoice number Client number i Testcompany 1 1 E Company info Client info precem Testcompany Vermaut Dennis Bank English vk Rautatientori Ravenhofstraat 12 bus information B Helsinki 6 Finland 8820 Torhout http www testcompany fi Belgium E mail info testcompany fi Phone 43250213725 E mail Threesa gmail com Description VAT Quantity Unit price no VAT Unit price with VAT Total price with VAT i Item 1 is nice i i j Lana ccc 22004 c ann nn i Gereed internet 100 iL BEG S cw Gc Vos PAT CEE E Qisna 19 29 Also from this page you can print the invoice You do this by clicking the printer icon on the top right of the invoice A new window will open and the print dialog will automatically pop up Note that the result you see in the archive is different in Mozilla Firefox and Internet Explorer This has to do with differences is parsing pixels to printer resolutions Therefore the sizes in Mozilla Firefox are a lot bigger Once printed the results should look basically the same although it is preferable to print the invoices always using the same browser Internet Explorer has the advantage that everything can be shown in a 1024x768 resolution whereas Mozilla Firefox needs more space for the invoice for it to be printed correctly 76 Create company To create a new company in the database so the logo is added upon first use and can be used in the templates there s not much to do Simply fil
64. Open the etc csynca cfg file and add the following EXACTLY group linuxCluster host hac clnl hac cin2 key etc csync2 key linuxCluster include home include var www include srv exclude srv mysql cluster include etc apache2 exclude etc apache2 local conf action pattern etc apache2 exec usr sbin apache2ctl graceful logfile var log csync2 actions log do local auto younger Note that if you want to use partially different configuration settings for apache on one of the nodes it is recommended to make these changes in a separate file for example local conf and include this file into the apache configuration with the following statement Include etc apache2 local conf So now we will create this file empty and include it To include the open etc apache2 apache2 conf and add the above include statement at the bottom of the file This file is in the example configuration already excluded from being synchronized by csync2 through the following directive in csynca cfg exclude etc apache2 local conf If you want to use an entirely different web server configuration simply remove the include statement for apache as well as the action statement Finally copy the configurations file to the second node with following command scp etc csync2 cfg root HAC CiN2 etc scp etc apache2 apache2 conf root HAC CiN2 etc apache2 scp etc ap
65. Preconditions The user must be logged in and must be administrator Post conditions The old invoices should be removed Primary way e User chooses admin panel from the menu e User chooses clean up database e User chooses continue Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 48 Back up database Purpose To get a copy of all the data in the database Short description The administrator gets the entire script to back up the database the way it is Actors Administrator Frequency Low Scalability Low Criticality Low Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The old invoices should be removed Primary way e User chooses admin panel from the menu e User chooses back up database e User copies the data in the text field and stores it wherever he wants Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 49 Log out Purpose To log out from the system Short description The user gets logged out of the system and can choose to log in again Actors Administrator Viewer Frequency Average
66. SQL is not running on either of the nodes Execute following commands if you are not sure etc init d mysql stop etc init d mysql ndb stop etc init d mysql ndb mgm stop First we will configure the Management Server first node Make the directory usr local mysql cluster cd usr local mkdir mysql cd mysql mkdir cluster and put a cluster cnf file in it vi usr local mysql cluster cluster cnf Page 33 of 53 Linux High Availability Cluster Manual Make the configuration similar to the following Management Node NDB_MGMD Id 1 HostName 192 168 254 1 DataDir usr local mysql cluster Data Nodes Defaults NDBD DEFAULT NoOfReplicas 2 DataMemory 256MB IndexMemory 128MB DataDir usr local mysql cluster Data Nod T NDBD Id 2 HostName 192 168 254 1 Data Node 2 NDBD Id 3 HostName 192 168 254 2 MySQL Daemon Nodes one tag per server MYSQID Id 4 HostName 192 168 254 1 MYSOLD Id 5 HostName 192 168 252 2 We will have to make the exact copy of the cluster cnf file We do this by making the same directories on the second cluster see above and by copying the cluster cnf file from the first to the second node Issue the following command scp usr local mysql cluster cluster cnf root HAC C2N2 usr local mysql cluster Next we will co
67. Stage Eindwerk Studiegebied Handelswetenschappen en Bedrijfskunde Bachelor Toegepaste Informatica Afstudeerrichting Academiejaar 2007 2008 Student Dennis Vermaut Servers en clusters Beheer en gebruik van een Linux Cluster Linux High Availability Cluster met PHP MySQL webapplicaties Stageplaats Polytechnic Stadia Helsinki Finland Woord vooraf Dit eindwerk is tot stand gekomen als verslag voor mijn stage in het laatste semester van mijn opleiding Bachelor Toegepaste Informatica Mijn stageplaats was Polytechnic Stadia Helsinki te Finland In deze stage moet de student zijn kunnen tonen in een echte werkomgeving alsook zijn kunnen uitbreiden Dit verslag zal beschrijven wat mijn taken waren te Polytechnic Stadia Helsinki en hoe ik deze aangepakt heb In de bijlagen zullen handleidingen en documentatie vervat zijn die als onderdeel van deze taken tot stand zijn gekomen en of onmisbaar zijn bij de taken Dit verslag is bedoeld voor opvolging van de gedane taken of om informatie te winnen rond de taken en hoe er verder aan te werken en of de draad op te nemen bij de gedane taken Ik wil ook even de tijd nemen om een aantal mensen te bedanken die mij bij mijn stage geholpen begeleid en of bijgestaan hebben Eerst en vooral wil ik uitdrukkelijk mijn ouders bedanken omdat zij mij altijd gesteund hebben zowel moreel als financieel in mijn keuze voor een buitenlandse stage Ook mijn andere familieleden en vriendin wil
68. Ubuntu you can do this by issuing sudo apt get install dosfstools sudo apt get install mtools Next we will burn the iso to our blank disk In Ubunu you can simply right click the iso file and choose the option to burn the image Once the image is burned shutdown your computer Setting up the stick Start up your computer with the disc inserted and the USB stick detached When you see the bootscreen insert the stick and hit enter Wait until DSL is fully booted Right click on your desktop and go to Apps gt tools gt USB HDD Pendrive install Hit y and then type install Hit enter again to keep the English keyboard lay out Press y and enter to start Note that once this operation is completed the terminal window will be closed without confirmation This is not an error it means that the operation was successful Hit DSL in the left corner and choose exit exit options Choose shutdown without backup The system will reboot and you will have to remove your disc Booting from the stick Make sure USB boot is primary boot BIOS and your stick is plugged in If your computer cannot boot from USB devices go on to the next part If everything is ok you will get a GRUB bootloader with as only option mentioned DSL Choose this one and here you go Shutdown the system again but now you can enable the backup option Creating a boot floppy In case the computer you want to monitor on do
69. While issuing the following commands make sure you re in the tmp netwatch directory Make a directory where we can mount the USB device mkdir tmp usb Next we have to mount the USB device to that folder Issue following command mount dev sda1 tmp usb Paste the contents of the USB device to the netwatch folder Issue following command scp r tmp usb tmp netwatch Page 48 of 53 Linux High Availability Cluster Manual Unmount the USB device by issuing the following command umount dev sda1 In order to make our UPS work correctly we have to copy the software of the 1 server to the 2 server Issue the following command scp r tmp netwatch root HAC C1N2 tmp netwatch Unzip the file using the tar command do this on both nodes tar xvf NetWatch 411 unix tar Rename the tar file to lower case do this on both nodes mv NetWatch 4n unix tar netwatch 41 unix tar Start the installation of the netwatch client do this on both nodes install sh Confirm the installation do this on both nodes y Enter Confirm automatic start up do this on both nodes y Enter Confirm the parameters do this on both nodes y Enter Now the software is installed You can go on with the configuration do this on both nodes This is started automatically
70. a nodes both nodes Since we set up the cluster the very first time we must use the initial option If you later on start a data node you can omit this option Keep in mind that we configured two data nodes so we have to execute the ndbd program twice once on both nodes etc init d mysql ndb start ndbd initial etc init d mysql start Now we have to run the management client to see what s going on Run the SHOW command here now once in a while to get a status report Page 35 of 53 Linux High Availability Cluster Manual ndb mgm ndb_mgm gt show This will show the configuration and status of the resources configured in the MySQL cluster and should look similar to this Connected to Management Server at 192 168 254 1 1186 Cluster Configuration ndbd NDB 2 node s id 2 192 168 254 1 Version 5 0 32 Nodegroup 0 Master id 3 192 168 254 2 Version 5 0 32 Nodegroup 0 ndb_mgmd MGM 1 node s id 1 192 168 254 1 Version 5 0 32 mysqld APT 2 node s id 4 192 168 254 1 Version 5 0 32 id 5 192 168 254 2 Version 5 0 32 You might want to wait a while before issuing the show command It takes a while to register everything correctly If nothing shows up you might want to restart the servers First the first one completely then the second one To exit the ndb command line type ndb_mgm gt exit For a database to b
71. aScript that you echo at the point where you want to change the page This basically does the same as changing the header but changes it after the header has been committed lt script type text javascript gt document location page php lt script gt One other problem was a problem that only occurred in Windows This had to do with a PHP function that relies on strfmon part of C library Windows does not have this so the function cannot be used in Windows This is very strange for a PHP function and don t like it for a function not to work on all Operating Systems On the Internet found a Windows version of the function and added that function to PR Consulting just in case and to be able to test PR Consulting on my local machine The function is surrounded by an if tag that checks if the function is defined or not In Windows environments it is not so then it defines this new function On Linux computers the function is defined so nothing happens The function is stored in moneyformat php Multi language The database for PR Consulting hasn t changed that much as only the language system has been implemented Implementing the system took most of the time because to alter this application every file had to be checked and modified to use the multilanguage system In addition to the Global Invoicing the language table was extended with a language icon field This field stores the location 31 of the image used
72. ability project This project is an open source application for servers The application makes the main server send signals the heartbeat over a shared connection the direct link between the nodes to indicate that it is alive When there isn t a heartbeat found the resources should be taken over Heartbeat shuts down according to a script and executes all tasks defined in that script for example starting the services on the second node MON Mon is a general purpose scheduler and alert management tool used for monitoring service availability and triggering alerts upon failure detection MON is required to achieve the goal of this project because it monitors the programs running on the main server Should one of the programs Apache or MySQL on the mail server fail then MON will execute an alert script that will shutdown the heartbeat process By having done this the other server will detect that the primary node is down and start to transfer the resources Csync2 Csync2 is a cluster configuration tool It can be used to keep files on multiple hosts in a cluster in sync Csync2 can handle complex setups with much more than just 2 hosts handle file deletions and can detect conflicts It is expedient for HA clusters HPC clusters COWs and server farms To do this syncing Csync2 uses the Salite2 library For conflicts a younger older test is performed This program allows us to keep the files on both servers in sync As for websites the f
73. ache2 local conf root HAC CiN2 etc apache2 Page 30 of 53 Linux High Availability Cluster Manual Once you have done this you will also have to restart Apache and Inetd on both nodes etc init d openbsd inetd restart etc init d apache2 restart To manually trigger synchronization of remote systems to the local one execute following command csynca xv Note that when executed for the first time it has to create the database of all files this may take a while depending of the number of files To automatically run csynca at a certain interval we will add it to crontab Execute following command to open the crontab editor crontab e Then add following statement to the file and save and exit 3 usr sbin csync2 x Do this on all nodes in the cluster To install the apache web server on your system type following command aptitude install apache2 aptitude install libapache2 mod perl2 Type in yes without to allow not trusted packages if necessary The configuration of the Apache web server does not differ from the configuration of a normal installation and will not be handled here since this is not directly related to the cluster and differs greatly upon the purpose of your setup You should however add the Perl extension to the handler vi etc apache2 apache2 conf Add the end of the file add AddHandler cgi script
74. age dbobj MySQL eo oo 00 0 0 0 0 e O O e eo O O O e e e construct FillAllOfOrder order id Integer getGlobals Array GetSetTemplate String setOrderField key String value String setClientField key String value String setCompanyField key String value String FillDiscounts order id Integer Fillltems order id Integer FillCompany order id Integer getFilledCompany key String String FillClient order id Integer getFilledClient key String String FillOrder order id Integer GetFilledOrder key String String FillGlobals setLanguage lang id Integer AlterDiscountsTranslation SaveCompany SaveClient SaveOrder SaveOrderAsNew Integer getAnchors Array TotalPrice Double PluginTolnvoice Integer getltems Array Clearltems ClearDiscounts getDiscount Array destruct 57 Auth This class deals with logging in logging out storing auto login cookie authorization and profile user management e o o o 0 0 O Auth dbobj MySQL loggedin Bool isadmin Bool queryobj QueryList profileError String anchor logfailure String construct AutoLogin Boolean SessionLogin Login username String password String remember boolean Bool hashed Bool Bool getLoginAnchor String getUserFullName String Logout IsAuth Bool getProfileError String getOwnProfile String SaveOwnProfile POST CreateUser us
75. aining available space This process is identical to setting up the first partition Repeat the above paragraph for the second device and when finished check that both devices have identical partitions When finished the table should look similar to the one in Figure 4 8 Page 15 of 53 Linux High Availability Cluster Manual Odebian RANA Partition disks This is an overview of your currently configured partitions and mount points Select a partition to modify its settings file system mount point etc a free space to create partitions or a device to initialise ts partition table Configure software RAID Guided partitioning Help on partitioning DEl master hda 61 5 GB IC35L gt 1 primary 509 9 MB Kraid gt 2primary 61 0GB Kraid Y IDE1 slave hdb 61 5 GB IC35LO60AVV207 0 gt 1 primary 509 9 MB Kraid gt 2primary 61 0GB Kraid Undo changes to partitions Finish partitioning and write changes to disk Go Back Continue Figure 4 8 Partitioner with RAID partitions configured Once this is complete we can move on to configuring the software RAID the top option If it asks you whether you want to write the changes to the storage devices select yes and continue Create an MD device with device type RAID 1 and the number of active devices in the array 2 Unless your system has another extra drive there are o space devices When asked to select the RAID devices in these cases pa
76. bal Invoicing web application have designed the user management with two types of users The two types are the so called administrators and the viewers The application can only be used after being logged in as one of these types of users All users have a profile in which they can change their personal settings Administrators Administrators are the users with all rights on the system They can use the application without limitation This includes changing configuration settings language management creating users changing permissions and of course create and print invoices and manage companies To the user management and the language management there are some limitations to make sure the system doesn t become unusable This means that you will never be able to delete or change the permissions all the administrators There will always be one administrator available Without this limitation the system could become restricted to only viewers and the management would be unavailable The language management limitation includes that you can t delete the language you are currently working in nor can you delete what is set as default language This is because the default language is used to fill up missing translations in other languages Viewers The viewers are any other staff that can use the system Their actions allowed are limited to creating invoices and companies That way the part of creating invoices can be distributed among secretaries
77. c 4 Windows Internet Explorer EY y JE htto 192 168 182 15 gangla graph php g load report amp z large amp c HACm amp r hour Ss descending amp hc 48st 1203510534 x E je Search Ve de http 192 168 182 15 esngls eraph aho o load re Ed Ed y eh ey Page Groos HAC Load last hour Lozd Procs 9 5 Erry i i 13 30 13 35 13 40 23 45 13 50 13 55 14 00 14 05 14 10 14 15 14 23 14 35 E 1 min oad B Nodes MC gt Us W Running Processes Figure 5 2 Detail view Ganglia Page 43 of 53 Jan Milants 2 07 2007 Jonas Pypen Dennis Vermaut 20 02 2008 Linux High Availability Cluster Manual 5 4 PHPSysInfo 5 4 1 Introduction PHPSysInfo is a customizable PHP Script that parses proc and formats information nicely It will display information about system facts like Uptime CPU Memory PCI devices SCSI devices IDE devices Network adapters Disk usage and more 5 4 2 Installation Installing this script is real easy Just issue following command aptitude install phpsysinfo Aptitude will setup everything for you the way it should You now have a new website available onder var www as well It s called phpsysinfo 5 4 3 Example In this next image you can see what PHPSysInfo tells us about one of the servers in the second cluster System Information HAC C2N1 ciscolab stadia fi 192 168 182 15 ystem Vital Hardware Information HAC C2N1 cis
78. char 50 NOT NULL website varchar 50 telephone varchar 50 fax varchar 50 bank varchar 100 varl varchar 255 var2 varchar 255 var3 varchar 255 logo varchar 100 PRIMARY KEY company id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci Table structure for client DROP TABLE IF EXISTS client CREATE TABLE client client id int 11 NOT NULL auto increment firstname varchar 50 NOT NULL lastname varchar 50 NOT NULL address varchar 255 NOT NULL telephone varchar 20 fax varchar 20 email varchar 50 bank varchar 255 vat_number varchar 20 PRIMARY KEY client_id ENGINE NDBCLUSTER TYPE NDB AUTO_INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8_unicode_ci Table structure for order DROP TABLE IF EXISTS order CREATE TABLE order order id int 11 NOT NULL auto_increment date datetime NOT NULL requested datetime NOT NULL system varchar 50 NOT NULL payed char 1 NOT NULL DEFAULT N company_id int 11 NOT NULL user id int 11 NOT NULL client id int 11 NOT NULL template varchar 50 PRIMARY KEY order id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci ALTER TABLE order ADD Foreign Key user id REFERENCES user user id ALTER TABLE order ADD Foreign Key company id REFERENCES company company id ON DELETE CASCADE ALTER TABLE order ADD Foreign Key client id REFEREN
79. chor company var3 e Sianchor company name e Sianchor company address e Sianchor company logo This one is optional e Sianchor client firstname e Sianchor client lastname e Sianchor client address e Sianchor client telephone e Sianchor client fax e Sianchor client email e Sianchor client bank e Sianchor client vat number e Sianchor order requested e Sianchor order date e Sianchor discounts e Sianchor items 67 Each template has to implement the anchors in the FillTemplate function So each template file uses this function The anchors Sianchor_items and Sianchor_discounts have to be processed manually through Designitems and DesignDiscounts These Design functions you have to implement yourself Before calling the Design functions set the error_reporting level to E_ERROR error_reporting E_ERROR The items and discounts information are stored in arrays which are passed in the anchors You can freely choose how to make them look in your invoice The Sianchor_items array can be looped through like this foreach Sianchor_items as Sitem Where Sitem is another array with the information in the following fields e Sitem name e Sitem description e Sitem price no vat e Sitem vat percentage e Sitem amount The Sianchor discounts array can be looped through like this foreach Sianchor discounts as Sdiscount Where Sdiscount is a
80. ckages arrive or become updated installation may become possible How to use the tool This final part will provide all needed instructions on how to use this tool for monitoring the cluster and or the hardware for the computer you re working on Preparing to boot from USB Insert your USB stick in the computer make sure a network cable is attached and start up your computer On the first screen you see Splash screen or POST test hit the key needed to enter your BIOS setup Most of the times this is F1 F2 F10 or Del Check the boot screen or the manual for the motherboard in case this doesn t work Find the section that deals with boot sequence start up order Make sure USB HDD or something similar not USB CD is primary boot device Save these changes and exit most BIOS s use F10 for this If your computer doesn t provide functionality to boot from USB but it has a floppy drive then there s nothing to worry about You can still boot from the USB Shutdown your computer and also insert the floppy disk Check your BIOS same way like described above if your floppy device is primary boot device Your computer will now boot from the floppy and will show you a nice screen showing you the DSL logo Mind that you have to type in a command to start from the USB stick and you have to do this within 30 seconds or the default boot will start and fail The command you need to issue to boot from the stick is dsl fromusb Now you can
81. colab stadia fi 192 168 182 15 2 6 18 5 686 SMP e Debian 4 0 Uptime 23 days 23 hours 10 minutes Current Users 1 Load Averages 0 07 0 12 0 14 Processors 1 Model Pentium 111 Coppermine CPU Speed 751 75 MHz Cache Size 256 KB System Bogomips PCI Devices Canonical Hostname Listening IP Kernel Version Distro Name 1504 57 00 07 1 IDE interface Intel Corporation 82371AB EB MB PIIX4 IDE 00 0c 0 Ethernet controller Intel Corporation 82557 8 9 Ethernet Pro 100 00 0d 0 Ethernet controller Intel Corporation 82557 8 9 Ethernet Pro 100 00 0e 0 VGA compatible controller ATI Technologies Inc Rage XL hda IC35L060AVV207 0 Capacity 57 27 GB hdb IC35L060AVV207 0 Capacity 57 27 GB hdc CD 224E Linux 2 6 18 5 686 uhci_hcd UHCI Host Controller Network Usage Received 863 40 MB 304 01 MB 401 55 MB 0 00 KB Err Drop IDE Devices USB Devices Memory Usage Used 497 55 MB 220 29 MB 159 14 MB 118 12 MB 0 00 KB Percent Capacity fn 227 44 NENNEN 32 EE 23 1 0 Physical Memory Kernel applications Buffers Cached Disk Swap Mounted Filesystems Partition Percent Capacity Free dev mapper vg00 root Bas 22 19 GB tmpfs 10 252 29 MB tmpfs 10 252 29 MB udev 11 9 94 MB tmpfs 10 252 29 MB tmpfs 10 252 29 MB Used 1007 23 MB 0 00 KB 0 00 KB 60 00 KB 0 00 KB 0 00 KB 27 85 MB dev mdo dev mapper vg00 home dev mapper vgO00 srv fdev sdai En 6 11 m 7 inso
82. count is a percentage value or just a plain value You can also choose whether the value is a discount on the total amount for the invoice or not This is certainly needed with percentages as this makes a lot of difference If you don t put a percentage on the total price you will have to attach it to an item If the item isn t available yet in the dropdown list you will have to wait to do the attachment until you saved everything in the archive Plug in If you chose to create an invoice from a plug in there you will first get a list of available invoices left for the plug in As most plug ins support checking for last entries the plug ins will mostly only show the invoices that haven t been stored yet That way the list is as short as possible and makes creating invoices a lot faster Once you chose an invoice the same form as above will be shown but now with the fields already filled in with information You can change all the fields and again add remove items and discounts Note if you want to link a discount to an item and the item isn t available in the dropdown list yet then the invoice has to be stored in the archive first After you saved the invoice in the archive you will be automatically diverted to the archive and thus see the printable invoice you just created 75 Archive The archive is where all stored invoices are kept These are the invoices in the local database First you will have to choose for what system you
83. csnsuzeddowans canoa ARIAS vao tua v gus cech dedguaauasnags UDALA To MADE QE ADAE oe Ru Vo RAE VERRE Ye nana 5 Nro 6 Verkl rende woordenlijst nzo aaa 8 Mocabulaty EEE EEE 9 Table OF conti id beaten 11 About Polytechnic Stadia Helsinki ccce kostet ets aka e oe a dud a eoo Eae EE eaa REUS 14 ASSIgnmaents usina 15 Itro dUe tioN terca LEA 15 Nn dcs lm 16 IntnodOeti ni Em 16 General description ces etr eatis vert idad dE IR RI e ers ES UR E VERE RMIN RE UNES 16 kr rm 16 APA Bit eie A e eax n ee eere Ei n i Eten e eH 16 Quien 17 Linux High Availability Dro ect ee 17 jue esa 17 Bc a inenten denten 17 Tech ical setup Of the cluster teet tore aante ER en eae TERES TM veu PERSA SERERE MESURER 18 Work done on second cluster c cooocccnoccconocccancnnonnnononcnnnnnnnnnn nn non cnn nennen enne thee 19 aureis edem 19 Linux Ganglia on an USB StICK ccccccessceeseceesseceeseecesseecsseecssececseecesseccsaeeecsececsseceeecesaeeeeaaeeeateceseeees 20 IAOOUEON ee EE 20 albe 20 FH MP HM 21 Critical reflec tigi nata ito dina 21 Global invoicing web application cccocononocoonnncnononononnnnnnnnnnn
84. cture remained the same except for three extra added tables which aren t linked to the other tables The new scheme can be found in this thesis Managing the languages is exactly the same as for the Global Invoicing Application and can be found in the attachment for that application 35 STaDlia a HELSINGIN AMMATTIKORKEAKOULU Mu Linux High Availability Cluster Installation Configuration and Maintenance Manual Jan Milants Helsinki Polytechnic Stadia 7 2 2007 Revised edition Jonas Pypen Dennis Vermaut Helsinki Polytechnic Stadia 17 03 2008 This manual can serve as a guide to installing a Debian based Linux High Availability Cluster It provides you with an overview of all the required steps during installation and configuration of the cluster Linux High Availability Cluster Manual 1 Table of Contents 1 Table of Contents a 2 a Table of Figures COT ME 5 3 Technical OvervieW lit 6 3 1 Ld NN 6 hen Cen 6 33 Configuration Oo o oa 6 334 Network ConfiguratlOb di 6 PST IP Addressing NEP 6 sate Generali o O 7 3 33 PAR a eaten 7 A O 7 zog Physical Bouts deedeetee raked 7 3332 Lesl volte eerde 8 4 Installation annees nenenen eeens vens vensvenneeens vens vennsennsernsernnsennsennsvennsennsennserntersneesneeeneen 9 4 1 HardWare irradia 9 42 Installing the Notes ea nus apnea DRM E EE AEE AERA 10 4241 Introd ction nee evene S e e EI 10 4 2 2 Installing e OS NBN TRI RR Re 10 4 2 2 1 Beginning the
85. d manifest themselves by adding more software that is packed in the image and or more graphical goodies for the user Damn Small Linux however still exists and tries to be less than 60MB A few popular other pen drive distributions are SLAX Flash Linux Feather Linux Puppy Linux 20 Issues was still working with Jonas when started to research this project and he followed every step of the installation of Linux on a stick and kept note of the procedure because my laptop was out of order and couldn t do so He helped me keeping notes until the end of the basic installation My laptop was fixed by then Finding distributions wasn t a problem but installing proved to be a serious problem without a lot of trouble to overcome After trying a lot of possible solutions and looking for them we overcame the installation problem but we got introduced to a whole set of new problems mainly due to old software available on the distribution Also making an USB stick bootable seemed not as easy as the manuals on the internet describe as this fails most of the times All steps required to installing the software successfully and why we couldn t setup the entire monitoring system are provided in the second attachment of this thesis Critical reflection Linux on a pen drive caught my attention quite a while ago as it was quite a popular project in the days of small pen drives 64 128 MB Even now this pops up quite a lot as some computer magazin
86. d to stay 3 more weeks than originally planned due to his lack in time management In the end can only conclude this was the practical training needed as it gave me a lot of freedom and a lot of experience It gave me the freedom to also enjoy my time and get a time off from regular school so now I m revitalized to continue for my masters degree Also the Erasmus period is a period never to forget and something can only advice everybody to do as it is a once in a lifetime experience 34 Attachments Attached to this thesis are the following documents Debian Cluster Manual This first attachment will deal with the full installation and setup and configuration on how to set up a Debian based cluster with High Availability Linux Ganglia on a Stick This second attachment will deal with all needed background and installation steps on how to put Linux on an USB device Also it provides a manual how to use the tool Global Invoicing Manual The third attachment contains the entire theoretical background of the Global Invoicing application as well as the manual how to use the system and how to write plug ins and or templates for the system Remark about PR Consulting A full manual for the PR Consulting will not be attached to this thesis as basically nothing changed to the parts written for the application The way of operating remained exactly the way it was only the code was optimized to PHP5 and made multilanguage The database stru
87. dding editing removing languages in a fast and easy way o Incomplete translations are caught with default translations Plug in system for invoice systems o Multiple plug ins can be created for all sorts of systems even remote systems o Plug ins are put in directories sub directories and automatically processed Prevention on search robots like Google and Yahoo Previewing invoices in all available languages o Independent on the language used for the application Strong class based framework o Strong and complex class usage with a lot of different easy to use functionalities provided Strong discounting possibilities o Low limits for price o Ontotal amount o Percentage or value Support and optimized for the most used browser engines o Tested on Internet Explorer and Mozilla Firefox on multiple resolutions Query localization o All queries are stored in a single purpose class so all queries for the entire system can be easily located and altered and or expanded if necessary 29 PR Consulting revision and extension Introduction Johnny Vantorre en Tuur Swimberghe two students from my department in Belgium who had been to Polytechnic Stadia Helsinki four years before me had created a web shop application in PHP This website supported multiple languages but each language was stored in a so updates to the application had to be done in several places and maintenance was became a disaster 7 2 CONSULTING This led off course to many different v
88. depth is 32 bit Don t choose your own DPI For keyboard go down and choose the option fi It is best if you restart your system now Don t forget to enable the back up option You can test the new settings after the restart by opening a terminal window for example and typing some regular text We also put the time zone right for the system in case it isn t configured correctly Right click your desktop and choose Setup gt Date Time Setup gt Via Internet Time Server Nothing visible will 10 happen Reboot the system This option together with your localization settings should give you the right time In case this isn t so right click your desktop and choose Setup gt Date Time Setup gt Manually Enter via GUI and change the settings there Next up we re going to install PHP on our system Right click your desktop and choose MyDSL gt MyDSL Browser Click System We re going to install php 4 monkey because the webserver for our system is Monkey Click the package and choose Download Everything should go automatically Restart your system to enable the changes Don t forget to keep backup enabled The next step is to edit a little configuration file for our Monkey webserver Due to some updates we have version 0 9 2 but the configuration file points to a 0 9 1 directory So right click your desktop and choose XShell gt Transparent Issue following command sudo nano opt monkey 0 9 2 conf monkey conf
89. done what server the data is stored on with what username you have to reach the database and what database is used on that server If you click the name of the invoice you will be automatically send to the page to create invoices for this plug in Admin panel Introduction For the administration panel there are a few options available which will be explained in the according subsections Note the administration part and all options related to it are only available to the users with the administrator role ADMIN PANEL Configuration settings User management Client management Company management Language management Clean up database Back up database 77 Configuration settings In this panel you can change the settings that are defined in the config config php file This shouldn t be touched too much though as it is quite sensitive to changes It defines the MySQL settings for the local database invoice and some other variables related to the site You can set for example the default language for the site This however is saved as an integer which refers to the language_id in the language table Also you might want to set the site url variable correct as this will improve security User management This panel is used to manage the users The panel has three sub items add edit and delete Add Here you can add new users to the system You fill in the fields and hit the save button While typing
90. e name email address admin email company id website user id telephone client id fax template last done order bank plugin var1 forei i var2 foreign id var3 logo datetime order id firstname lastname address telephone fax email bank vat number 24 This database scheme is quite easy to comprehend but it is capable of storing all data needed for creating invoices for all sorts of systems and companies The data only becomes stored using the web application not by the plug ins The plug ins only provide the data to be processed and give back that data in the correct way using the functions provided in the super class Plugin Only discount has translations available as custom discounts may be applied to invoices from remote systems If a certain discount can t be created directly a custom discount may be of use with translations Items don t become translated as normally all items come from the remote systems and are only available in one language Note that the user table keeps the users for the system to log in and maintain the system The client table stores all the clients for the invoices so they are not users For an user the username is off course unique by constraint You may also notice the three variable fields in company Normally this is a bad solution You should work with a new table referencing to the company That way you can create an infinite and non fixed amount of variable fields This i
91. e MySQL management server after power failure 52 7 Configuring SMTP mail service u s vossorssnesrenswenenntenvanentdersthanbenedenenoevennendnaleneventendeotaassuete asen 53 71 sta E ASA AAA E E E 53 ga Contortion ene 53 Page 4 of 53 Linux High Availability Cluster Manual 2 Table of Figures Figure 4 1 Scheme Cluster Hardware nummeren tridentata Rebers 9 Figure 4 2 Debian Installer Boot Screen ass eren oetans aten enden desta 10 Figure 4 3 Language Selection ica n Figure 44 Localization ODCOBS ni 12 Figure 4 5 Network Interface Selection nen osvonsonsoneeneonennveneenensenseenensenseonensensensenven 13 Figure 4 6 Domain name configuration sese ennt ennt tnnt terrent 14 Figure 4 7 Partitioner view with empty table sese 15 Figure 4 8 Partitioner with RAID partitions configured sese 16 Figure 4 9 Partitioner after configuring RAID replication annen ennenneenenvennensenvenvenveneen 17 Figure 440 Overview LVM CONO ri der 18 Figure 4 u Layout final partitioning table cheeses aaa 19 Page 5 of 53 Linux High Availability Cluster Manual 3 Technical Overview 3 1 Servers In this manual we use 2 Intel ISP 1100 servers Technical details e CPU Intel Pentium 3 e Storage 2 x 60GB Used in Software RAID e Memory 256MB fe or 3 2 JO tware Operating System Debian 4 0 etch using Linux Kernel v 2 6 18 Web Serv
92. e available on the different MySQLd it has to be manually created on each node It is possible to write a script that automatically synchronizes the existing databases but since the problem of rights regarding that database will still exist it may be recommended to do this manually It is also important to remember that only databases which use the NDB engine can be distributed throughout the cluster The NDB engine is more performant and has more features then the MyISAM database engine but still lacks some features available in the InnoDB engine Page 36 of 53 Linux High Availability Cluster Manual 4 4 Verifving Installation 1 4 1 introduction The following chapters will provide you with a few ways to verify your installation and configuration was successful The given example outputs may differ from what you get on several points depending on your setup however it should still provide you with a general idea about your systems status 4 2 Heartbeat To verify the operation of heartbeat execute following command crm mon i5 Use Control C to exit This will show the status of all heartbeat resources and in our simple setup should look like this Refresh in 5s Last updated Mon Jun 11 15 35 24 2007 Current DC hac c1n2 05826c02 0ba5 421d 5b8d4 47d7453c8b0e 2 Nodes configured 1 Resources configured Node hac c1n1 08c75e00 af78 4b37 a68c 81607bcf5dd3 online N
93. e field variabel veld bogo s Logo configuration settings congiratie instellingen user management gebruikers beheer client management klant beheer company management bedrijf beheer language management taal beheer 22 insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into transl transl transl transl trans trans trans trans transl transl transl transl trans trans trans trans trans transl trans transl transl trans trans trans trans trans transl transl transl trans trans trans trans transl transl transl transl trans trans trans trans trans transl trans alles er voor insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert into into into into into into into into into into into into
94. e of this 38 Add client Purpose To add a client to the system Short description The administrator adds a client to the system Actors Administrator Frequency Low Scalability Low Criticality Average Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The client should be added Primary way e User chooses admin panel from the menu e User chooses client management e User chooses add e User edits the fields e User hits save Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 39 Edit client Purpose To edit a client in the system Short description The administrator edits a client in the system Actors Administrator Frequency Low Scalability Low Criticality Average Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The client should be edited Primary way e User chooses admin panel from the menu e User chooses client management e User chooses edit e User chooses a client e User hits save Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related
95. e some time pressure Also had to configure Exim4 a mail server package so that each mail sent by the PHP parser would be redirected to the mail server for the school ns2 stadia fi This required both configuration changes from the cluster side as from the mail server side General description The goal of High Availability HA is to make sure that if the primary node fails the second node of the cluster takes over all the resources and notifying an administrator the primary node is down By doing so the cluster can provide full uptime The next step in this process is if the primary server is back online the resources should not be automatically transferred back to the primary server this to prevent the jumping back and forth of resources between both servers Also the databases should automatically replicate so no data will be lost at all Luckily MySQL provides good support and options for this by providing us with NDB Management and the NDB Cluster Engine Software To achieve the High Availability we re going to rely on four main programs These are Apache and MySQL to run the web applications and MySQL especially to provide the High Availability of the MySQL data Next to that we are also going to use the High Availability project and MON to provide us the further high availability features Off course all these programs have to be configured specifically to our setup and to work with each other as well Apache needs virtual addresses f
96. e unsaved invoices available Preconditions The user must be logged in Post conditions The invoice should be stored in the local archive Primary way e User chooses create a new invoice from the menu e User chooses a plug in e User chooses an invoice e User checks the necessary fields and may edit them e User hits save in archive Use cases related to primary way e Login Alternatives The user creates an invoice from scratch Use cases related to alternatives e Create a blank invoice Exceptions Use cases related to exceptions Remarks 30 View archive Purpose View stored invoices Short description In the archive the invoices are stored for all the plug ins and empty invoices The invoices are archived by plug in name or under the own mode flag Actors Administrators Viewers Frequency Average Scalability Low Criticality Low Indirect demands There have to be stored invoices to view them Preconditions User must be logged in Post conditions a chosen invoice is showed and can be printed Primary way e User chooses archive e User selects the group e User selects the invoice Use cases related to primary way Alternatives Use cases related to alternatives Exceptions If there are no invoices nothing will be showed but a warning Use cases related to exceptions Remarks
97. echnical manual of the servers to verify th4 at cables are plugged in correctly on your devices Also note that the cable connecting the 2 nodes to each other has to be a cross cable If you want to link up more than 2 nodes they can be connected to each other through a switch or hub with a normal straight cable Also note that since version 2 of Heartbeat it is possible to use the same interface for the uplink and the communication within the cluster Page 9 of 53 Jan Milants 2 07 2007 Jonas Pypen Dennis Vermaut 20 02 2008 Linux High Availability Cluster Manual This chapter will guide you through the installation of the Debian OS on the servers and has to be performed separately for each node in the cluster So in our case you will have to perform the installation twice When console commands are given a new line is equal to pressing break During our installation will be using a minimal bootable CD and download all required packages from the internet as the installation progresses The Debian installer supports both a text mode and a graphical user interface both have an identical guided install with similar options In this manual we will use the GUI which allows us to take screenshots of our progress you can however opt to use the text mode installer The installation process is identical only the layouts of the screen will slightly differ Download a minimal bootable CD image from the Debian homepage www debian org
98. eference would fail otherwise Languages are stored in the language table Each language has its own id so it can be easily referred to It also has a language code so that the database administrator easily can recognize the id s The translate field id puts a reference to translate field because each language itself has a value for each other language for example Dutch in Dutch is Nederlands but Dutch in Dutch is Dutch This language table can also be expanded by other columns that are unique to the language for example a field that keeps track where the image for the language is stored this is used in PR Consulting for example As last table we have the translation table which stores all translations It keeps track of what field is translated in what language and what the translation is stored in column value So getting a translation is quite a long query but using joins you don t notice any speed issues and once you have written the query once you can use it over and over again using variables For each field that becomes translated there is a new arrow foreign key reference arriving to the translate field table 23 Database The final database structure for the invoice application looks like this language language id language code translate field id value translate field id is percentage on total low limit name description price no vat vat percentage username password firstname lastnam
99. er Apache 2 2 3 PHP 5 2 0 Database Server MySQL 5 0 32 Cluster Software Heartbeat 2 0 7 Latest version supplied by Debian latest 2 0 8 csync2 1 33 2 3 3 Configuration 1 Network Configuration IP Addressing 3 3 1 1 Since we also use an UPS failover system the UPS also needs an IP address The one used in the Stadia lab is 192 168 182 20 Make sure you don t use the IP address from the UPS as an IP address for the cluster You are free to choose the IP addressing for the cluster within the range of free IP addresses provided by Stadia In the lab we can chose anything between 192 168 182 1 and 192 168 182 19 Primary Interfaces 1 cluster Cluster 192 168 182 10 Node 1 192 168 182 Node 2 192 168 182 12 Subnet mask 255 255 255 0 Gateway 192 168 182 254 Secondary Interfaces 1 cluster Node1 192 168 254 1 Node 2 192 168 254 2 Subnet mask 255 255 255 0 Redundant Array of Independent Disks Page 6 of 53 Linux High Availability Cluster Manual Primary Interfaces 2 cluster if used Cluster 192 168 182 15 Node 1 192 168 182 16 Node 2 192 168 182 17 Subnet mask 255 255 255 0 Gateway 192 168 182 254 Secondary Interfaces 2 cluster if used Node 1 192 168 254 1 Node 2 192 168 254 2 Subnet mask 255 255 255 0 Proxy Server www cache stadia fi 8080 root stadia viper viper tition ing LVM storage running on a PV composed of 2 partitions in software RAID setup A separate non LVM partition stil
100. ername String admin boolean Bool firstname String lastname String email String password String passwordconfirm String Array IsAdmin Bool destruct 58 QueryList This class only deals with storing all the queries in one single location like a query enumerator QueryList No members AddTranslation language_id Integer translate_field_id Integer value String String AllLanguages String ChangePayed invoice Integer payed_y_n Char String CheckExistingClient firstname String lastname String address String telephone String fax String email String bank String vat number String String CheckExistingCompany name String address String email String website String telephone String fax String bank String var1 String var2 String var3 String String CheckExistingDiscount value String is_percentage Char on_total Char low_limit Double translation_english String item_id Integer String CheckExistltem name String description String price_no_vat Double vat percentage Double String CheckFreeUsername username String String CheckOrderDiscount order id Integer discount id Integer String CheckOrderltem order id Integer item id Integer String CheckPayed invoice Integer String CheckTranslateField field name String String CheckUsername username String String CleanLasts date String String CleanOrder date String String Connec
101. ersion for one website My task was to improve maintenance for the language system by making it into a single working system and the language stored separately just like the invoicing system The structure related to the language are thus the same After that had to create a plug in for my invoicing web application This plug in was also the first plug in made so became my test object to test and finalize the invoicing application Conversion to PHP5 First and for all had to convert to application to PHP5 Everything was still written in PHP4 and not in a very good way To start the conversion first set the error reporting level to the highest so could get an output of as many possible mistakes as possible php error reporting E ALL gt Also this reporting level is my default reporting level to program as it forces you into programming in quite a perfect way and neat way The conversion itself didn t take that long Application issues After the conversion some other issues had to be fixed One of these issues was dealing with and etcetera The Finnish languages uses a lot of letters with umlauts and these were stored correctly in the database but not printed correctly This had something to do with different character settings on the server and the database engine could not change them because that might have affected other databases Luckily had dealt with this problem before and knew how to fix it The
102. ery directory was provided with a robots txt file which says that nothing should be checked User agent Disallow Dropped functionality A print to PDF functionality has also been researched and there are many classes and functions available on the internet that can help in this task but almost every single possibility that is free for use has too much limitations or takes too much altering to be practical for this application Providing a good printable page is the best solution as this can both be used to print to normal paper or to print to PDF for example CutePDFWriter So there is a print functionality provided but it s not offered as a PDF file Adobe 27 Critical reflection The project was very interesting for me as got to deal with some PHP related stuff never worked with before plug in systems templates classes robot files What started as a relative small project soon developed to a very solid and big application It also tested my ability to think abstract as had to develop most of the program without being able to test what just created Furthermore this project was a good project to get to know the importance of gathering requirements as none were given at the start If hadn t asked the questions at the start and early in the development stage would have had real trouble The only thing that is a bit of a shame is the lack of time had too few time to complete this project in all the wa
103. es in CH C is not applied for PHP As the application has to get data from multiple system it would be very nice new systems can be added without having to change the application itself That way the maintenance is improved by far The project was started with very few requirements available but once the application and the classes started to get shape more and more subtle and less subtle features popped up Gathering requirements Introduction For each project you make you have to gather the requirements for that project otherwise you ll end up with an incomplete project or a project that is totally not what the client had in mind As the initial requirements were very few there were a lot of options open but this could also mean the client wants all the options Asking questions to the client and showing interim results completes and or perfects there requirements MOSCOW One of the ways to note down the requirements is the so called MoSCoW method This means you note down the requirements in a few categories e M Must have this e _S Should have this if possible something like this or similar e C Could have this if it doesn t affect anything else or if there is sufficient time e W Wortt have this but would like in the future For this project this resulted in the overview listed below Must e Archive and print invoices e Catch empty translations e Dealing with discounts e Get data from multiple MySQL database
104. es offer HOW TO s and manuals on their website or even in their magazines on how to do this However the reality isn t as easy as following those manuals and you have to try out a lot before you get the result you want Due to the many issues we had was able to understand more the issues that the different distributions bring along with their different setups in handling applications and configurations It was an interesting project as really got faced with all the dependencies a system has when you re not using a simple packet manager like aptitude etcetera 21 Global invoicing web application Introduction As next assignment Kari Bj rn wanted me to build a multilanguage web application that could deal with invoicing for several websites The invoices had to be legally formatted to Finnish norms and could come from any website This last requirement made me to decide to work with a plug in system That way for each new website that needs invoicing or for each new way of invoicing for a website you just need to write a plug in but the system itself never changes It would also be nice if the template for the invoice could be altered or multiple templates would be available That way the application can be very widely used and is easy extensible The application had to be PHP 5 MySQL As also wanted to implement something new in this task and something couldn t do yet in PHP chose to work with classes PHP allows you to work with
105. es you the tasks and that s it You have to choose what task you do first Furthermore it s up to you to get the information about the projects and the details He knows them but you have to make the step to ask them This is a subtle way to make you learn how to gather requirements and if you don t you will realize soon enough what big trouble you are in and you will never forget Also the time didn t matter to him in that way he didn t care when you did show up at the placement or if you even showed up You can also work at home if you prefer that You are not obliged to work in the lab He was always interested and pleased to see you were there but that wasn t important You just make sure your tasks are done by the deadline and they are done in a decent way He also likes to test what you have in the process so it s entirely your own responsibility to get the project done on time and to show him progress If you don t no complaint will be received as long as the project is done This way of working is very different of the way we receive our projects in Belgium where we have our smaller deadlines in short intervals You learn very quickly how to do time management efficiently and yet you still have the freedom to enjoy yourself and create a very good time schedule Not everybody was able to deal with this quick switch of mentality A Spanish guy who had to create a plug in for my global invoicing application got the door smacked in his face and ha
106. esn t support boot from USB device we will provide a boot floppy which will let you boot the USB device from the floppy This is a little workaround but works fine Get the floppy bootimage img from http www damnsmallinux org and get it on a Linux computer Make sure you have version gt 2 2 because older versions don t support the fromusb option In our example we save the image to tmp img Insert the floppy disk and format it using the following command sudo mkfs vfat dev fdO Once formatted it is time to prepare the floppy for boot We do this by issuing the following commands cd tmp img sudo dd if bootfloppy img of dev fdO bs 36b This might take a while to complete Just sit back and relax Take out the floppy once the task is finished and prepare for a test Booting from the floppy Take the floppy disk and the USB device to a computer that doesn t support USB boot or where USB boot is defined after floppy boot Insert the floppy and the USB device and boot up the computer You should get a beautiful boot screen provided by Damn Small Linux Insert your USB device and type the following command to boot your stick dsl fromusb Now everything runs like you would boot from the stick directly Shutdown the system again and you can enable the backup option now Finalizing the stick Now we will set up everything in a way that our DSL is fully capable of dealing with monitoring
107. ge you will be asked to confirm your choice Add global Adding globals can be very handy to create new fields to use for example in the templates There is a public page available with all the globals and all their translations That way people who write templates and or plug ins can easily see if there is a global they can use or they can request to add one The page is globals php To add a global you fill in the name of the global and the translations for it You finish by hitting the save button Clean up database This allows you to keep the database as small and performant as possible This will remove all invoices that are too old If the current month is above or equals July then it will remove everything from the past year and before If the month is before July it will delete everything from two year before or more Before actually deleting the invoices you will be shown for what years invoices will be deleted You confirm the deletion by hitting continue 80 Back up database This panel helps you to back up all the data in the database It will show a big textarea tag with the necessary queries to restore the database the way it is at the moment You can copy everything and save it the way you want it Or you can simply hit the save button at the top which will automatically push the sql file of this output This sql file is generated on the fly and is not stored on the server The back up queries
108. ge code 104 taalcode 105 global name 105 global naam 106 language name in its own language 106 naam van de taal in die taal oo oO wo NN oo 0 J gt J3J000 0d 0 UNDNR AROO 107 translation for the global in the new language 107 vertaling voor de global in de nieuwe taal 108 select a language to edit 108 kies een taal om aan te passen 109 the data will be removed for this year and before 109 de gegevens zullen verwijderd worden voor dit jaar en global value in global waarde in there are no clients er zijn geen klanten choose a template kies een template date of the order datum van de bestelling save in archive opslaan in het archief price without VAT prijs zonder BTW name in English naam in het Engels is the value a percentage is de waarde een percentage is the discount on the total amount or just on this is de korting op het totale bedrag of enkel op dit low limit for discount ondergrens voor de korting no items attached to the discount er zijn geen artikelen gekoppeld aan de korting 121 value 121 waarde 122 item 122 artikel 123 not listed item 123 niet getoond artikel 124 you will be diverted to the stored invoice in 5 23 N insert into translation values 5 seconde
109. gues 32 Critical reflection Converting the web shop from PHP4 to PHP5 was a very small task which thought would have been more difficult already had experience with both versions so the most problematic issues already knew Luckily the application was built quite solid and easy so there weren t many things that needed to be changed Also putting the error reporting level to the maximum notifies you of a lot of possible problems Preparing all the text fields for the multilanguage purpose and putting everything in the database however is a very time greedy job This took about two times the time thought it would take A critical reflection is hard to give for this project as didn t have a lot to do can only say that my predecessors made a very big mistake concerning the multiple languages when they created the application They made a subdirectory for each language and all the code files were implemented for each language This was a huge maintenance nightmare 33 Critical reflection about the training My critical reflection about the entire practical training is a very positive reflection The decision to actually continue for a masters degree was set to depend on my practical training and the decision is made to continue received a lot of opportunities from my mentor Kari Bj rn to work in the fields was interested in He gave me and all the students complete freedom in how and where and when This means he giv
110. he normal place for your system this is typically var log messages Now we have configured the first node we simply have to copy the configuration from the first node to the second one Issue following commands you may have to replace the hostname cd etc scp logd cf root HAC C1N2 etc scp ha d authkeys ha d ha cf root HAC CiN2 etc ha d Page 27 of 53 Linux High Availability Cluster Manual If the system ask to store the fingerprint confirm with yes without After configuring the node we have to configure the cluster resources we want heartbeat to monitor The only resource we will instruct heartbeat to monitor in our setup is the clusters IP address All other resources Apache MySQL will be running continuously on both nodes This will decrease the time required for the failover and also allow us to use the services for example apache without the high availability provisions Since we have configured heartbeat to use CRM we have to use the complicated version 2 structure configuration file The easiest way to create this without using the graphical client is creating a version 1 configuration file and converting it to a version 2 file using a script provided by the heartbeat package Note that we have to do these steps on both nodes Create a file called tmp haresources temp using vi nano and configure it similar to the following this is the same on both nodes hac c1n
111. he system by hitting the save button The system will automatically check if the company already exists or not All fields are checked but the image field If the company already exists the picture will be updated If not the company will be added One field that is different is enough to create a new company Note this page is also available to users from the viewer role Edit To edit a company you first have to select a company from the list Next you will be presented with the filled out form For the picture you have some options If there is a picture set you will see the current picture and you can choose to remove it or not That way you can completely remove the logo If you browse for a picture on your computer the logo will be removed and overwritten anyway You save the changes by hitting the save button Delete To delete a company from the system you select it from the list You will be asked to confirm your choice as this results in removing all linked invoices 79 Language management This is one of the main parts for the language system and was specifically requested On this panel you can add languages and the translations for the site edit languages and the translations or delete them You can also add new globals These are fields that can be used all over the site and the globals are to be translated in the other add and edit form Add The first step in adding a language is choosing what languages you w
112. hors there are and to place them 15 Code Last but not least is the MySQL code for the database The database is called invoice and no table prefixes are used The code is separated in two parts a structure part which builds the database tables and columns with the necessary relations and a data part which enters the translation data for the lay out for the application in two default languages English and Dutch and two basic users admin admin and viewer viewer All queries were designed by hand Especially for the data inserts this was necessary as while creating the application new translate fields popped up frequently and needed to be implemented immediately The administration panel wasn t available yet at that time Structure create database if not e s invoice use invoice Table structure for translate field DROP TABLE IF EXISTS translate field CREATE TABLE translate field translate field id int 11 NOT NULL auto increment name varchar 50 NOT NULL CONSTRAINT TransLateFieldUniqueKey UNIQUE name PRIMARY KEY translate field id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci Table structure for language DROP TABLE IF EXISTS language CREATE TABLE language language id int 11 NOT NULL auto increment language code varchar 10 NOT NULL translate field id int 11 NOT NULL PRIMARY KEY language id ENGINE NDBCLUSTER TYPE
113. icality Very high Indirect demands the user should exist in the database added by administrator before he she is able to log in Preconditions the user exists Post conditions the user is logged in and has the sufficient rights Primary way e User browses to the web application e Enters username e Enters password e Chooses to store log in information or not e Hits log in Use cases related to primary way none Alternatives The user is automatically logged in due to past login and he she chose to save the information Use cases related to alternatives Exceptions If the password is changed the alternative way cannot be used the primary way must be used Use cases related to exceptions Log in Remarks For the automatic log in feature the browser must support cookies 27 Edit profile Purpose edit personal information and log in information Short description By editing the profile the user can sets its own data and log in information Actors Administrator Viewer Frequency Low Scalability Low Criticality High Indirect demands the password must be entered to save the edited profile Preconditions The user must be logged in Post conditions The changes are saved Primary way e User chooses profile from the menu e User enters information and password e User hits save Use cases related to primary way e Login Alter
114. ice now the class name is the filename with capitals This is required Spaces aren t allowed use underscores instead 63 Next you will setup the configuration for your plug in by calling the private function Configure private function Configure Sthis gt setPluginName Template plugin This name also has to be unique Sthis gt setUnique true is this plug in able to check new entries on foreign id Next are the variables for the foreign database connection Sthis gt setDBServer 127 0 0 1 Sthis gt setDBUsername pluginuser Sthis gt setDBPassword pluginpassword Sthis gt setDBDatabase plugindatabase These variables determine where to check for new entries if the system has an unique id for each invoice Sthis gt setUniqueKeyTable plugin_table in what table can we check Sthis gt setUniqueKeyColumn plugin_table_column what column in that table Configure After this function you can define your own functions and code you might need Then you have to use the main function that does all the processing That is the function ReadForFillEnglish The name means you only read from the foreign database all the data needed to fill an invoice and if possible take English descriptions The functions first has to call the clearing methods These make sure everything is empty in the object Also the Connect method has to be called to create the foreign connection Sthis
115. icon in the task bar At the top of the browser under your navigation bar there are a few icons Right click them and choose Delete Now we will add our own links Browse to http 192 168 182 15 ganglia and drag and drop the page icon in front of the URL to the bar where you previously removed the links Right click the new Item and hit Properties Give it a name that tells you clearly what it is for example Cluster Monitoring 11 Repeat this step both for http 192 168 182 15 phpsysinfo and http 192 168 182 15 cgi bin awstats pl config localhost Compilers for foreign packages To be able to compile packages from scratch using make and make install we have to install a C compiler To do this right click your desktop and choose MyDSL gt MyDSL Browser Click UNC and scroll down and choose gcc 2 95 unc Hit Download Also download the gcc1 with libs unc Once the downloads have been completed reboot the system and everything is ready for compiling packages Ganglia amp PHPSysInfo Installing Ganglia and PHPSysInfo has been proved to be impossible for now tried more than one way to install these packages even dependency by dependency None of this works due to outdated packages that are part of DSL Not all of these packages can be updated not even by compiling from source due to the drastic changes made in the lay out and functionality of Damn Small Linux Maybe in the future when new pa
116. ies String GetCompany company id Integer String GetCompanyLogo company id Integer String GetDiscountTranslation language id Integer discount id Integer String GetGlobalFiller global name String String GetGloballang name String language id Integer String getGlobalsQuery lang id Integer String Getltem item id Integer String getltems String getLangSelectQuery String GetLanguageTranslateField language id Integer String getLoginQuery username String password hashed String String GetOrderClientInfo order id Integer String GetOrderCompanylnfo order id Integer String GetOrderDiscounts order id Integer String GetOrderlnfo order id Integer String GetOrderltems order id Integer String GetTables String GlobalFields String InsertinDiscount order id Integer discount id Integer String InsertinOrder order id Integer item id Integer quantity Integer String InsertLast plugin name String id Integer String LanguageCode language id Integer String LanguageValue language id Integer String LastUniqueld plugin name String String OrderAmount order id Integer item id Integer String OrderExists order id Integer item id Integer String OrderUpdate order id Integer item id Integer quantity Integer String OrdersInAllSystems String OrdersInSystem system String String RemoveClient client id Integer String RemoveCompany company id In
117. ik via deze weg bedanken voor hun vele berichten en steun Daarnaast wil ik ook zeker Kirsi Paaso en Anneli Luoto bedanken Als hoofd van internationalisering voor Polytechnic Stadia Helsinki hebben zij er in heel korte tijd voor gezorgd dat de stageplaats stagepapieren en verblijfplaats in orde was ook al was ik extreem laat met mijn aanvragen Samen met hen moet ik ook Kari Bj rn bedanken Hij is het hoofd van de afdeling informatica voor Polytechnic Stadia Helsinki en was tevens mijn mentor Hij heeft ervoor gezorgd dat ik een degelijke opdracht kon uitwerken en een goede kans kreeg veel bij te leren tijdens mijn stage Daarna moet ik ook zeker Hamok bedanken Hamok is de vereniging opgezet door Polytechnic Stadia Helsinki en bestaat uit studenten Deze studenten tutors genaamd zorgen er voor dat internationale studenten opgevangen worden bij hun aankomst en van de nodige papieren en informatie voorzien worden Verder organiseren zij ook activiteiten voor de Erasmus studenten Bij deze gaat mijn dank dan ook speciaal uit naar de aan mij toegewezen tutor Ana Barrionuevo Korkeill Zij is tevens ook de hoofdtutor international representative van Hamok te Helsinki Ook wens ik Nick Deboo Jonas Pypen en Wouter Cosyns te bedanken Nick is een West Vlaming die al in Helsinki verbleef als student sinds september en die me veel info verschaft heeft Nick volgt ook zijn studies aan Howest Jonas is een Oost Vlaming en was mijn werkpartner gedurende het
118. iles don t change that much live clustering isn t needed so this tool is just the right thing Also this program can exclude directories and or files from the syncing Using this ability we can use a single file to keep specific server related Apache2 settings without being synced You never know why a certain node may need different settings 17 Technical setup of the cluster The servers used in this manual are Intel Pentium 3 servers each with 2 hard disks of 60GB which we will use in RAID configuration and 2 Ethernet interfaces These Ethernet interfaces are both needed As shown in the picture below one interface is used for direct communication in the cluster between the nodes This interface will also be used for the heartbeat The other interface is used to connect to the switch and to the global network of the school In this picture only the cluster related network cables are shown Also connected to the switch trough an Ethernet interface is our UPS which uses UTP to send query the status Cluster Node 1 9 qe ssou Also note that the cable connecting the 2 nodes to each other has to be a cross cable If you want to link up more than 2 nodes they can be connected to each other through a switch or hub with a normal straight cable Also note that since version 2 of Heartbeat it is possible to use the same interface for the uplink and the communication within the cluster 18 Work done on second cluster
119. ill compare to create this new language The translations for the globals will be shown then next to the globals while adding the translations for this new language You can select as much languages as you want or none at all In the next step you set up some basic language information and the translation for the global fields If you have chosen languages to compare to they will be shown next to the global If you leave a translation for a global blank it will be caught by the translation in the default language for the website This means the translation stays empty but while browsing it will be replaced by the default language Fill out all the fields and hit the save button Edit This is pretty similar to adding a language but now you also have to choose what language you want to edit You can once again compare with as much languages as you want or none at all The form with settings and translations is the same but filled out with the provided values To save the changes hit the save button Delete You can also delete languages and their translation from the system There are some limitations here First and for all you can t delete the default language as this one is used to catch missing translations Furthermore you can t delete the language you are currently working in The combination of this also prevents deleting all the languages even if the setting for the default language is not existing Before you delete the langua
120. in an efficient manner To achieve this last requirement the technique from the Global Invoicing application was used Also there had to be done a small conversion from PHP4 to PHP5 Verklarende woordenlijst e AJAX e COW e CSS e DSL e HA e HAC e HPC e HTML e LAMP e PHP e RDBMS e SIP e SLAX e SRP e SQL e VOIP Asynchronous JavaScript And XML Cluster of Workstations Cascading Style Sheet Damn Small Linux High Availability High Availability Cluster High Performance Computing HyperText Markup Language Linux Apache MySQL PHP PHP Hypertext Preprocessor Relational DataBase Management System Session Initiation Protocol Slackware LinuX Single Responsibility Principle Structured Query Language Voice Over Internet Protocol Vocabulary e AJAX e COW e CSS e DSL e HA ES e HAC e HPC e HTML e LAMP e PHP e RDBMS e SIP e SLAX e SRP e SQL E e VOIP m Asynchronous JavaScript And XML Cluster of Workstations Cascading Style Sheet Damn Small Linux High Availability High Availability Cluster High Performance Computing HyperText Markup Language Linux Apache MySQL PHP PHP Hypertext Preprocessor Relational DataBase Management System Session Initiation Protocol Slackware LinuX Single Responsibility Principle Structured Query Language Voice Over Internet Protocol Table of contents Woord Vitoria AAA AAA 1 Preface tatiana 3 SaIMEN VALUING vaazcrecsaseees
121. in the username it is automatically checked whether this username is available valid or not This is done with AJAX Also you can immediately set if the new user should have the administrator role or not If not the default role is viewer You can use any username and password as the user can alter this himself herself in the profile The user is notified by e mail of his newly created account and the log in data Edit Here you can switch the role assigned to the user This means you can make an administrator viewer or a viewer administrator To do so simply click the user in the list The system does have a limitation that you can t switch roles of the last administrator available as you would otherwise lock down the entire system The profile can t be changed here as we leave this to the users their selves Furthermore this is not needed very much as the profiles aren t public Delete You can also remove users from the system This works in the same way like editing an user You choose an user from the list and he s gone Here too there is the limitation that you can t remove the last administrator for the system this for the same reason Client management This panel allows you to add edit or delete clients from the system This can be done to enhance the speed of the plug ins as the plug in doesn t have to enter them itself This way the number of database connections are somewhat limited Deleting clients shouldn t be done as the linked
122. insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert Translations for the fields insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into transl transl transl transl trans trans trans trans transl transl transl transl trans trans trans trans trans transl trans transl transl trans trans trans trans transl transl transl transl trans trans trans trans transl transl transl transl trans trans trans trans trans transl trans transl transl trans trans trans trans transl transl transl trans
123. ision a very complete user manual and technical background was written by my predecessors Johnny Vantorre and Tuur Swimberghe As nothing did to the application had serious affects on their documents didn t have to adapt it The changed database scheme will be included in this thesis and the usage for the new administration part for the language management is similar to the language management used for the Global Invoicing application 15 Linux HA cluster Introduction My first tasks was to help Jonas Pypen with finishing setting up the second Linux HA cluster and reviewing the provided manual These clusters are so called High Availability clusters which means they work as one cluster and they take tasks over in case of failures Jonas job with me ended after we configured the main High Availability items Apache MySQL Heartbeat UPS basic Ganglia successfully and we could alter the manual correctly Furthermore at the end of my practical training the first cluster had serious issues and had to be completely reinstalled As Jonas had already left back to Belgium had to do this on my own This was a good time to fully test the manual and to edit the parts that weren t clear yet Also noticed that some steps were missing in the manual Apparently not everything was noted perfectly while we were revising the manual It was a less good timing from the servers as still had to finish my global invoicing project and this gave me quit
124. isted after the data dictionary language Name column Type of column Description Referencesto Required language_id integer Primary Key for language X language code varchar 10 The language code to X identify the language for database administrators translate field id integer What field is this in the translate field X language structure for by Foreign Key translation purposes translate field Name column Type of column Description References to Required translate field id integer Primary Key for X translate field name varchar 50 The name of the field X used to build up the array for display translation Name column Type of column Description References to Required language id integer In what language is the language by X translation provided Foreign Key translate field id integer What field will be translate field X translated by Foreign Key value varchar 255 What is the translation X order detail Name column Type of column Description References to required order id integer Primary Key for what order by X order are we giving Foreign Key details ordered items item id integer Primary Key what item item by X was ordered in this order Foreign Key quantity integer How many times is this X item ordered in this order 11 order_discount
125. istrator Frequency Low Scalability Low Criticality High Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The role for the user should be changed Primary way User chooses admin panel from the menu User chooses user management User chooses edit e User chooses an user Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks There should always be one administrator left to do the administration The system should take notice of this 37 Delete user Purpose To delete an user from the system Short description The administrator removes an user from the system Actors Administrator Frequency Low Scalability Low Criticality High Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The user should be removed Primary way User chooses admin panel from the menu User chooses user management User chooses delete e User chooses an user Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks There should always be one administrator left to do the administration The system should take notic
126. its turn query the NDB nodes that keep the entire database in memory Note that because of that last part the RAM available in the servers should be checked to make sure it s sufficient The following formula can be used to determine the amount of memory required by the SQL storage nodes DB size Number of Replicas 1 1 Number of Storage Nodes In this formula the DB size is the total size of the MySQL database the Number of Replicas refers to the amount of copies you want to store of a specific piece of data and Number of Storage Nodes refers to the number of NDBs you have on your setup We use 2 however the Page 32 of 53 Linux High Availability Cluster Manual more the better It is however recommended to increment the number of Storage Nodes in steps of 2 When installing the MySQL Server through the Debian packaging system all required components are automatically installed If you are compiling it yourself you should use the Full package To install the MySQL Server type aptitude install mysql server 5 0 This has to be done on all servers including the one running the NDB Management Server Now we will set a default password for the root user Issue following command mysql gt use mysql gt update user set Password PASSWORD stadia where User root gt exit This should alter 2 rows Before beginning with the confirmation make sure My
127. ke sure the php ini file gets reloaded Jetc init d apache2 restart And this should be it You can now start sending mail from the websites Page 53 of 53 STADId TJ HELSINGIN AMMATTIK ORKEAKOULU Linux Ganglia on a Stick Installation Configuration and Usage Manual Dennis Vermaut 17 03 2008 Table of contents Table Of contents ici da 1 INTRO CON iio att rat tinta 2 SUMMA PITE IUIUS LIII 2 DNeIeUdpkle C M 3 PATe arde 4 Damn Small Linux or Feather Linux nnen ener nennen nnne nets entere nn nn anna entente nnns 5 Abo t Gangliasosc eem KE EE 6 About PAPSYSInfO iii 7 Installation and Configuration of Damn Small Linux cesses ennemi 8 Requireme Mts er 8 Creating atlcKzu A AA AA A AA dende 8 Preparing the live ed certet er Reo add siii 8 Settirig up tie SEICK ies ire Rh ee EROS ARER TUE cess TORRES VM GUESS PER E E QUE RARE sesame FEY eR Ruta ROS MR Raet 9 Booting from the SLICK nia Io ehe isa E vut ma DU ep te ruere deu ey er ideen Dev veo tS 9 Creating DOOt TIOP iii a a aaa 9 Booting from the floppy cccccccccccsssssscececscessesseaececcssseseuseseceescesseseeaeeeeceseeseeaeaeeeesceseasaeeeesessseseaaeas 10 Finalizing the Stick oerte ete er ette A See teins IA 10 Updating PEERS DIDIT 10 O 10 Monitoring links nme seegers
128. l trans transl transl transl transl trans trans trans trans trans transl trans transl transl trans trans trans trans transl transl late field name values choose system late field name values name late field name values address late field name values website late field name values t in undi late field name values fax late field name values variable field late field name values logo late field name values config settings late field name values user mgm late field name values client mgm late field name values company mgm late field name values language mgm late field name values clean db late field name values back db late field name values add late field name values edit late field name values delete late field name values no admin late field name values switch admin late field name values admin late field name values new account subject late field name values no_company late field name values current_logo late field name values remove current logo late field name values no late field name values are you sure late field name values continu late field name values lang compare late field name values lang code late field name values global name late field name values
129. l out all the fields choose a logo if desired Note the classes are made like that that a logo may be the URL of the image It just receives the location string which is directly used in the src part of the image tag When finished filling out the fields just hit save View templates This functionality allows you to have an overview of the available templates for the system Furthermore you can get a preview of this template filled with random data This preview can also be viewed in all the available languages and can be printed too using the same print button on the top right of the invoice The default template should never be deleted as this would cause fatal errors The application is designed that way that the default template will kick in if the set template could not be loaded The default template however may be changed off course HTML code Note that the random data is not an invoice object filled with random data It is just an array of random data that is why the total price can t be calculated Instead just X s are shown View plug ins Here you can check all the available plug ins recursively This means all directories and subdirectories etc from plugins are processed Each directory name is listed as a header for the plug ins in that directory The directory structure is also maintained in the tree structure you receive For all the plug ins some basic information is given if it can save what invoices have been
130. l using RAID is used for booting yt gt IDE hda 61 5GB e dev hdai 500MB Linux RAID e dev hda2 61GB Linux RAID gt IDEz2 hdb 61 5GB e dev hdbi 500MB Linux RAID e dev hdb2 61GB Linux RAID gt Software RAID e dev mdo 500MB boot partition e dev md1 61GB LVM Partition Only use proxy configuration if required on your network 3 Logical Volume Management Logical Volume Manager Physical Volume Page 7 of 53 Linux High Availability Cluster gt vgoo e e e dev dm o dev dm 1 dev dm 2 dev dm 3 16 1GB 26 6GB 16 1GB 2 1GB Manual home V swap Page 8 of 53 Linux High Availability Cluster Manual 4 Installation 4 1 Hardware The servers used in this manual are Intel Pentium 3 servers each with 2 hard disks of 60GB which we will use in RAID configuration and 2 Ethernet interfaces Figure 4 1 shows the basic hardware setup of our Linux Cluster Only the cluster related cabling is shown here The power supply may be connected to a UPS unit instructions on setting up UPS will be given further in this manual Input and output may be connected directly permanently or just for installation purposes or can be connected to a KVM system Cluster Node 1 9 qe ssoJ5 Figure 4 1 Scheme Cluster Hardware In our example the etho interface is the lower most interface of the device and the second Ethernet interface will be named eth1 by the OS Check the t
131. lang own lang late field name values val new lang late field name values select edit late field name values clean year late field name values global value late field name values no clients late field name values choose template late field name values date order late field name values save archive late field name values price no vat late field name values name in english late field name values value is percentage late field name values discount total late field name values low limit late field name values no item attached late field name values value late field name values item late field name values not listed item late field name values divert print late field name values invoice payed late field name values create empty late field name values self made late field name values save as new lation values 1 3 language lation values 2 3 taal lation values 1 4 username lation values 2 4 gebruikersnaam lation values 1 5 password lation values 2 5 wachtwoord lation values 1 6 remember me lation values 2 6 onthou mij lation values 1 7 yes lation values 2 7 ja lation values 1 8 Global Invoicing lation values 2 8 Globale Facturatie lation values 1 9 log in lation values 2 9 log in lation values 1 10 reset
132. lia on an USB stick Introduction Kari Bj rn mentioned me about a research a student had done to put this monitoring on an USB stick so you could monitor the cluster from anywhere you want Unfortunately the project was never finished and got lost but the idea was very good so decided with Kari Bj rn to see what could do Linux on an USB stick wasn t new for me in that way had already heard of it and knew it could be done Several distributions had found their way to the internet so that shouldn t be so much of a problem But it is Linux History As Linux has bootable discs for quite a while creating a bootable system without write rights wasn t so hard to find out for the community A few people of this community also started projects to get an Operating System as small as possible but still provided with the essential software Damn Small Linux was one of the first projects to do this and actually capable of creating a disc image of about 50MB Damn Small Linux was derived from a Debian distribution This image was made for a CD but they took it a bit further as changing it so that it could also be used from an pen drive Pen drives at that time were 64MB or 128MB but larger didn t exist yet So this SOMB image was perfect for these pen drives After Damn Small Linux a lot of projects followed the idea and most of the projects are based on Damn Small Linux As the storage capabilities of the pen drives rose the projects coul
133. n insert into translation values insert into translation values insert into translation values insert into translation values insert into translation values insert into translation values insert into translation values insert into translation values 24 u zal omgeleid worden naar de opgeslagen factuur binnen 25 is this invoice already paid 25 is deze factuur al betaald 26 create a new empty invoice 26 maak een nieuwe lege factuur 27 self made 27 zelf gemaakt 28 save as new invoice 28 sla op als nieuwe factuur BO FP IO PIB IS BD Default preview Item insert into item values 1 Test Item This is testitem 20 23 21 Default administration user username admin password admin insert into user username password firstname lastname email admin values admin 21232 297a57a5a743894a0e4a801fc3 Dennis Vermaut webmaster eleanorcomputing be Y Default non administration user username viewer password viewer insert into user username password firstname lastname email admin values viewer 4b2a1529867b8d697685b1722ccd0149 Dennis Vermaut webmaster eleanorcomputing be N 24 Theoretical usage Introduction This theoretical usage will show how the system works in theory and how everything is related To do this use cases are used After the theoretical show case the practical manual will follow Type of users For the Glo
134. n lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation Vai val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val Vai val ues ues ues ues LUES ues ues lues ues ues ues ues ues ues lues lues ues ues ues ues ues lues ues ues ues ues ues ues ues Lues ues ues Lues ues ues ues ues ues ues Lues Lues ues ues ues ues ues lues LUES ues ues ues ues ues ues Lues ues ues lues ues ues ues ues LUES ues lues lues ues ues ues ues ues lues Lues ues ues ues ues 2 49 50 2 50 21 2 51 94s 2 52 D Oy 2 53 24 2 54 55 2 55 poe 2 56 1 57 2 57 58 2 58 59 2 59 L 60 2 60 61 2 61 62 2 62 63 2 63 64 2 64 1 65 2 65 66 2 66 67 2 67 68 2 68 L 69 2 69 1 70 2 705 11 2 71 772 2 72 1 73 2 73
135. n in a proper way during a power failure you can use an Interruptible Power Supply UPS This device delivers for a limited amount of time enough power to make sure that both servers can shutdown This instruction manual is specifically for the setup of a Powerware 515 UPS As Installation of the f1 ro 0 2 ifiSLadiidadtiOI OF UNIC SOILWaI To make the servers connect to the X slot Web SNMP Card you need to install a SNMP client on both servers This client checks on a regular basis the status of the UPS When there is a power failure the client waits a configured amount of time and then triggers a shutdown script This installation should be done on all servers that are physically connected to the UPS To install this software you can download it from the website from Powerware http www powerware com Change the working directory to the temporary directory and make a working directory e g Netwatch Do this on both nodes cd tmp mkdir netwatch Next download the tar file from the internet There we have a problem in the lab The private network within the Stadia environment only allows us to download ftp So there we have to come up with another solution We have to download the file to a USB stick on another PC which has regular access to the internet Afterwards plug the USB stick into the first server Wait until the server recognises the USB stick Debian will tell you what device it is dev sd
136. n one To use our website like an application we deny access to all users To gain entry to the system an user has to log in using his or her credentials As mentioned before there are two types of users administrators and viewers Viewers can only create companies and invoices where administrators can also manage the settings users clients and languages Log in The log in system uses the Auth class This class will handle everything related to the authentication or management of a particular user The class is capable of dealing with automated log ins This means that a user can choose the log in information This is done by a cookie so the browser of the user has to support cookies otherwise he will have to log in on each visit Once logged in the log in is passed into the SESSION of PHP and the Auth class keeps working with the SESSION Global Invoicing Login Language English v Username Password Remember me Y Yes Log in Reset To log in the class checks for the combination of username and password The password is stored as an MD5 hash As the user logs in he can also choose what language he wishes to work in The choice is stored both in the SESSION as in a cookie That way if the browser of the user supports cookies upon next visit this chosen language will be automatically set Log out OA Meny UU To log out of the system you simple have to close the browser as this will ia terminate the SESSION If
137. n the classes A little note about this scheme the arrows represent which classes uses what type of data member or what type a function of the class returns Invoice 62 Writing a plug in Introduction Writing a plug in is something which has to be done by a PHP programmer The provided classes are made like this that the programmer doesn t need to know the entire class nor the entire system Here are some guidelines and the functions he should need Also the empty plug in should be of great value to him This empty plug in can be found at plug ins template_empty php will discuss how to write a plug in based on this empty template and add some comments How To First and for all note that the plug ins should never have a the filename template_empty php as this will be neglected Furthermore the name of the file and thus of the plug in should be unique all over the Global Invoicing Application Check with the administrator to view the already used plug in names If you write multiple plug ins for a system put them in a directory named to your system The Global Invoicing application can handle directory structures All code listed is PHP5 code Code blocks are marked with a border around it The basic declaration is simple if you know that every plug in is an extension of the Plugin class and uses the PluginInterface For example class Template Empty extends Plugin implements Plugininterface As you may not
138. natives Use cases related to alternatives Exceptions If the password is not entered the changes will not be saved Use cases related to exceptions Remarks if changing the username gt check if username is available 28 Create a blank invoice Purpose To create a new invoice from scratch Short description The user wants to create a new invoice from an empty form Actors Administrator Viewer Frequency Average Scalability Average Criticality Average Indirect demands Preconditions The user must be logged in Post conditions The invoice should be stored in the local archive Primary way User chooses create a new invoice from the menu User chooses a blank invoice User fills in the necessary fields e User hits save in archive Use cases related to primary way e Login Alternatives The user creates an invoice from a plug in Use cases related to alternatives e Create an invoice from a plug in Exceptions Use cases related to exceptions Remarks 29 Create an invoice from a plug in Purpose To create a new invoice from a plug in Short description The user wants to create a new invoice listed from a plug in Actors Administrator Viewer Frequency High Scalability Average Criticality Average Indirect demands There should be plug ins in the system and the plug in should hav
139. nce you can use it over and over again using variables For each field that becomes translated there is a new arrow arriving to the translate_field table Also the tables can be extended with some extra information For example if you want to use an icon for a language you can add an extra field for the icon location As the icon has no translations and is unique for the language it has to be put in the language table To have optimal performance between load balancing and memory all the translations are loaded at the same time in the memory As this gives a simple text array this doesn t use a lot of memory Only the language of the application becomes loaded off course Full scheme The full database scheme looks like this The data dictionary with basic information is provided after the scheme name description price_no_vat vat_percentage order_discount PK FK1 order id PK FK2 discount id date requested system payed company id user id client id template firstname lastname address telephone fax email bank vat number plugin foreign id value translate field id is percentage on total low limit item id password firstname lastname email admin datetime order id 10 Data dictionary The database in words with all the information needed is called the data dictionary This is the data dictionary for the Global Invoicing web application Some extra remarks about the scheme are l
140. ne by the classes so everything is checked The main database of the Global Invoicing system is actually empty The database has to be designed to store invoice data and everything related to that As the default system doesn t have any invoices stored yet everything is empty The database doesn t deliver dynamic content to the website for users It only stores the invoices In addition there are three tables used for the language management and that s it The functionality fully relies on the classes More about the language system further on Multilanguage As mentioned before the system had to be multilanguage and this was in fact one of the biggest requirements as the client had experience with multilanguage applications that were a big mess to maintain Changing code if for example you want to add new functionalities to the website should only be done in a single place and not for every language A graphical interface to enter or edit languages would be very much appreciated and in addition to this an interface where you can compare the languages to each other Taking these requirements decided to store the language information in the database The database can store a lot of information and is capable of delivering the required information very quickly by using decent queries Furthermore the queries only have to be designed once independent of the number of languages This is also an improvement in maintenance px memes la
141. ne number of the client fax varchar 20 Fax number of the client email varchar 50 The email address of the client bank varchar 255 Bank information for the client vat number varchar 20 Personal VAT number A client is a person stored in the database and linked to an invoice so client to the invoice Remarks about the database scheme Only discount has translations available as custom discounts may be applied to invoices from remote systems If a certain discount can t be created directly a custom discount may be of use with translations Items don t become translated as normally all items come from the remote systems and are only available in one language Note that the user table keeps the users for the system to log in and maintain the system The client table stores all the clients for the invoices so they are not users For an user the username is off course unique by constraint You may also notice the three variable fields in company Normally this is a bad solution You should work with a new table referencing to the company That way you can create an infinite and non fixed amount of variable fields This is not done nor was it needed as the application uses anchors to fill out the template This means there is a fixed number of variables to use and place in the template So the template creator doesn t have to check the number of variable fields and doesn t need to check the database He just needs to know what anc
142. nfigure the NDB Storage Nodes It will make your MySQL daemon enable the cluster storage engine tell the management node where to find the configuration file and let all other nodes know where to find the management node Open etc mysql my cnf vi etc mysql my cnf Make sure the directives in the configuration match the following do this on both nodes Page 34 of 53 Linux High Availability Cluster Manual mysqld ndbcluster ndb connectstring 192 168 254 1 default storage engine NDBCLUSTER only if you want ndb as default bind address 0 0 0 0 mysql cluster ndb connectstring 192 168 254 1 ndb mgmd config file usr local mysql cluster cluster cnf The IPs in above directives are the IPs of the NDB Management Server change them if required Also make sure that the directives are uncommented and that you may have to add some Directives not listed here do not need to be changed Some directives may not be present in the configuration file if this is the case add them It is a good idea to reboot the first node now and shutdown the second reboot shutdown h now First we reboot the first cluster and start the management server on the 1 server only ndb mgmd This will give a warning but that s okay The management server is now running and waits for other nodes to connect So right now we boot the second server as well and we will start the dat
143. nguage code translate field id PK FK1 language id PK FK2 translate field id translate field PK translate field id This system is based upon the fact that each field column in the database needs to be translated is stored in the translate_field table and is referenced by the translate_field_id So the translate_field keeps an id to refer to and an unique name to identify the field The translate_field_id is an integer that is automatically generated by MySQL using the auto increment property set to increase by 1 Languages are stored in the language table Each language has its own id so it can be easily referred to It also has a language code so that the database administrator easily can recognize the id s The translate_field_id puts a reference to translate_field because each language itself has a value for each other language for example Dutch in Dutch is Nederlands Dutch in English is Dutch This language table can also be expanded by other columns that are unique to the language for example a field that keeps track where the image for the language is stored this is used in PR Consulting for example As last table we have the translation table which stores all translations It keeps track of what field is translated in what language and what the translation is So getting a translation is quite a long query but using joins you don t notice any speed issues and once you have written the query o
144. nother array with the information in the following fields e Sdiscount value e Sdiscount translation e Sdiscount is_percentage e Sdiscount on total e Sdiscount low limit e Sdiscount item_id Note as the system is multi language field names should be multi language as well This can easily be done All globals these are placeholders which have translations in the database are passed along to the FillTemplate function To use one of these place holders type in Sianchor global and then the name of the global for example Sianchor global email To view a list of all the available anchors browse to globals php of the Global Invoicing application If you need more anchors you can ask an administrator 68 So your template file should look like this function FillTemplate Sorder_id Sarray if Sarray Sinvoiceobj new Invoice Sinvoiceobj gt FillAllOfOrder Sorder_id Sanchorarray Sinvoiceobj gt getAnchors EXTRACT Sanchorarray Jelse EXTRACT Sarray error_reporting E_ERROR Sitemrows Designltems Sianchor items error reporting E ERROR discountrows DesignDiscounts Sianchor discounts Sianchor global discounts Sianchor global on total Sianchor global on II OWN INDEPENDENT PREPARATIONS II Sinvoice lt lt lt INVOICE lt In this area you can type your style sheet and your HTML template You can use the anchors just by typing their variables names like Sianchor_gl
145. nterface is connected before pressing continue Next you will be asked to enter a hostname for your server Note In the example figure we used LHC CiN whereas in our setup we use HAC CIN1 Then you will be asked for the domain name and if you used DHCP earlier you should be fine using the default value ciscolab stadia fi Page 13 of 53 Linux High Availability Cluster Manual O debian RANA Configure the network Please enter the hostname for this system The hostname is a single word that identifies your system to the network If you don t know what your hostname should be consult your network administrator If you are setting up your own home network you can make something up here Hostname LHC CLN1 Go Back Continue Figure 4 6 Domain name configuration 2 2 5 Partition Disks We will install our 2 60GB drives in a RAID 1 configuration with our partitions managed by LVM After the partitioner has been loaded you will be asked how you want to continue Since our setup cannot be configured automatically by the guide we will have to configure it manually If there are already partitions listed on the hard disks select the hard drive and press Continue You will then be asked whether you want to create a new empty partition table on the device select yes and continue Do this for both hard disks listed after which the table should look similar to the one shown in Fig
146. ny id Integer getCompany Integer SetupClient Bool getForeignConnectionObject MySQL setClient client id Integer getClient Integer SetupDiscounts Bool Setupltems Bool setlnvoiceld id Integer setForeignDate unixtimestamp Integer SetupLast Bool setUniqueValue id Integer Clearltems getltems Array FillClient firstname String lastname String address String telephone String fax String email String bank String vat number String getFilledClient key String String ClearClient Fillltems name String description String price Double vat Double amount Integer ClearDiscounts FillDiscounts value Double translations array Array is percentage bool Bool on total bool Bool low limit Double item id Integer ClearDiscountTranslations FillDiscountTranslation language id Integer value String FillCompanylnfo name String address String email String website String telephone String fax String bank String var1 String var2 String var3 String logo url String getFilledCompany key String String ClearCompanylnfo 53 getDiscountLanguageArray Array getObject Plugin Addlnvoice class object Plugin getLastUniquelds Array GetStringNotld id array Array column name String String getCompanylnfo Array getClientInfo Array getOrder Array getDiscount Array OverviewToCreateList String getSinglelnvoice key
147. o ensure start up at boot time issue the next command update rc d gmond defaults We will set up Ganglia in the way that the first server will monitor and the second server will be like a client Watch out Both servers will be monitored but we will only ask the first server to give out information Note that the automatically generated configuration for gmond uses multicast We will provide sample documentation for the unicast configuration We will only provide a partial configuration including only what had to be changed First make the default configuration file by issuing this command gmond default_config gt etc gmond conf For the nodes being monitored globals daemonize yes setuid yes user ganglia debug level 0 max_udp_msg_len 1472 mute no deaf no host_dmax 0 secs cleanup_threshold 300 secs gexec yes Page 40 of 53 Linux High Availability Cluster Manual cluster name HAC C2 owner Stadia host location ServerRoom5fl udp_send_channel mcast_join 239 2 11 71 port 8649 ttl 1 udp_recv_channel mcast_join 239 2 11 71 port 8649 bind 239 2 11 71 tcp_accept_channel port 8649 continues For the hosts collecting the information not being monitored in this case globals daemonize yes setuid yes user ganglia debug level 0 max udp msg len 9600 mute no deaf
148. obal_email There s no need to escape them gt INVOICE return Sinvoice FillTemplate function Designitems Sianchor_items Your own preparations Designitems function DesignDiscounts Sianchor_discounts Sianchor_global_ discount Sianchor_global_on_total Sianchor_global_on Your own preparations 4 W DesignDiscounts 69 Note The Design functions aren t inherited or whatsoever so you can call them what you want and pass all the variables you want If you want you can also use static images in the template to make more specific templates Normally the logo for a company shouldn t be used as a static image as the location for the image should be passed in the appropriate anchor Images are stored in images but you will have to agree with the administrator where to save them Know that the images always need to called from the root of the application and not from the location of the template You don t have to use to go to the root Everything is executed from the root directory even though it is stored in subdirectories 70 Practical manual Introduction In this part of the manual the overall use of the web application and anything related to it will be explained and shown First we will start off with an overview of the key features Bestand Bewerken Beeld Geschiedenis Bladwijzers Extra Help E QI oS E E mosnz ooinvocelindexche amlogout ID
149. ode hac c1n2 0b826c02 O0ba5 421d b8d4 47d74b3c8b0e online IPaddr 192 168 182 10 heartbeat ocf IPaddr Started hac cin1i Page 37 of 53 Linux High Availability Cluster Manual 5 Monitoring ll auci 10 I There are several tools available to monitor the cluster Though the cluster will run fully automatically it may be useful to under certain circumstances be able to verify where which resources are running t heat rt Dedi To view the status of the Heartbeat resources in the cluster execute following command crm_mon i5 5 3 1 introduction Ganglia is a scalable distributed monitoring system for high performance computing systems such as clusters and Grids It is based on a hierarchical design targeted at federations of clusters It leverages widely used technologies such as XML for data representation XDR for compact portable data transport and RRDtool for data storage and visualization It uses carefully engineered data structures and algorithms to achieve very low per node overheads and high concurrency The implementation is robust has been ported to an extensive set of operating systems and processor architectures and is currently in use on thousands of clusters around the world It has been used to link clusters across university campuses and around the world and can scale to handle clusters with 2000 nodes Ganglia is an open source project that grew out of the University
150. of space Feather Linux doubles this space but provides us with more possibilities to extend Unfortunately we weren t able to use Feather Linux The space wasn t the problem because we received a 4GB Kingston USB device The problem was getting Feather Linux to work We tried many methods to get it working the way it should but it just never did We got the stick booting but once it started booting we got errors from the boot from Feather Linux A few people on the internet seemed to have the same problem but a solution was never given nor found So we had to change to Damn Small Linux After trying a few methods as well both with success and failures we chose to use the easiest installation method This will give you a working distribution for sure but requires one more extra step requirement to be completed a blank disc You can also choose to make an embedded version This makes it possible to run your Linux environment in an already running environment Windows or Linux doesn t matter This sounds very good and promising and takes away the problem with boot support but you need to have a working a distribution If you create a fully bootable system you can also use this monitoring tool to check why a certain distribution won t work About Ganglia Ganglia is a complete suite which offers scalable distributed server monitoring The monitoring is done by Linux daemons and supplied through XML files Luckily we don t have to analy
151. ogd yes crm on deadtime 10 warntime 5 initdead 120 bcast ethl auto_failback off node HAC C1N1 HAC C1N2 Directive overview e use logd sets whether or not to enable heartbeat logging daemon e crm refers to Cluster Resource Management and tells heartbeat we will be using a configuration file made for version 2 e deatime after how much time without a response is a node considered dead e warntime after how much time do we write a notice in the logs e initdead how long after start up should we wait before acting on seemingly dead servers This is required because the network doesn t always go up right away e bcast sets the interface to broadcast heartbeat packets on In our setup this is the second interface however if the server has only one network interface this can be etho e node is used to list all servers in the cluster e auto failback determines whether we automatically switch back to the primary server when it comes back online Check that the directives have also been uncommented There will be many more directives in the sample configuration file but you can leave them on their default value Read through them if you want to personalise your setup further Finally open etc logd cf and modify it so that the logfacility directive is uncommented and set to daemon logfacility daemon This will make sure the heartbeat log messages are written to t
152. ononnnnnncnnnnnnnonnnnnnnnnnnnn nn nnnnnnnnnnnanenenannnos 22 ltro dUCt ON em 22 Mu ltilanguag e szeri ia e I a a E E 22 Data 24 Problems and things to keep in MinNd ccccconococonnncnconononononononnnanononcnnnnnnnnnno nono enen ennnnnsnevernenenennnnen 26 Dropped functionality eni a a a a a a a a i a a A aR aai 27 Critical reflection tirar ada 28 Features Of the invoicing system tree e Rei ie e ade 29 PR Consulting revision and extension cccccccccsssssccccecsssesseaeeececesesssaeeececsceeseeaaeseseeseeeaaeaeeseseesseaaes 30 EOL fH 30 Conversion to PHP Seiren aerer i ceti le veter tenes eie e e e I re Cet etd 30 Application issues ie ete eerie e eec e ive 30 M ltislanglages eon GRO ORE RE ONIS 31 Critical reflectiOM iet ti eto tet ote tee te tet ttt e ettam tecta 33 Critical reflection about the trainingssessie 34 Attachments so ioe ert at eee epe to e en ety ner nee ERR seio Ce at e bx Yu eh RR ER aee 35 Debian Cluster Mari als iiti te AA D e ERR OE E RR 35 Lin x Ganelia ona Sticker terere roter teet n ev evene etd E i eee dee eee A eu eden 35 Global Invoicing Manual rcr e eh ree eR iaa 35 Remark about PR Consulting ctt ei atit rte aa rete a la i eee Hag 35 12 13 About Polytechnic Stadia Helsinki My work placement took place in a department of Polytechnic Stadia Helsinki A polytechnic is similar that we know in Belgium as a Hogeschool or in English as an university college STaDlia
153. ons The user must be logged in Post conditions The template should be filled with random data and shown to the user Primary way e User chooses view templates from the menu e Users chooses a template e User can switch the language and print the invoice Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 33 View plug ins Purpose To view the available plug ins and their properties Short description The user gets a list of available plug ins listed in recursive groups based upon directories For each plug in some data is shown Actors Administrator Viewer Frequency Low Scalability Low Criticality Low Indirect demands there must be plug ins to view Preconditions The user must be logged in Post conditions The available plug ins should be listed recursively Primary way e User chooses view plug ins from the menu Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 34 Edit configuration settings Purpose To change the settings in the configuration file Short description The user gets an overview of the current settings and can change them Actors Administrator Frequenc
154. or this MySQL uses NDB Mon checks if MySQL and Apache are running and provides triggers in case they aren t and Heartbeat monitors the up state of the nodes and fires up the necessary scripts in case of failure Apache Apache is the most popular web server in the world It is an open source web server that is continuously under development Apache is fast scalable extendable and secure One of the goals is that the websites are available through the same address disregarding what server is serving Virtual Hosts is the feature of Apache who will enable this 16 MySQL MySQL is an open source relational database management system RDBMS that use Structured Query Language SQL to manage the data in the database MySQL is fast and reliable and also continuously under development Also MySQL is free of charge in many cases A built in functionality is MySQL clustering cluster management and cluster engine so MySQL is by default perfectly equipped for clustering While working with this clustering we encountered a bottleneck to the NDB Engine used for clustering Its specification allows less attributes columns etc then for example MyISAM Due to this specification one of the available websites can t be automatically replicated Moodle as it has too much attributes The first attribute limitation can be changed in the configuration file but even the maximum supported value for the NDB Engine isn t enough for Moodle Linux High Avail
155. ors each user can change his or her credentials To change anything to the profile the password has to be given to keep this flexibility as safe as possible If the user is changing the username the chosen username becomes automatically checked using AJAX Asynchronous JavaScript and XML The profile is also retrieved from the Auth class PROFILE Username admin Admin panel Yes You have to enter your password to make changes to your profile Password New password Repeat the new password First name Dennis Last name Vermaut E mail address webmaster eleanorcomputing be To change the password the user has to enter the old password and enter the new one and confirm the new one This will make sure no accidents happen All changes will be applied and checked when hitting the Save button at the bottom of the form 74 Create invoice Creating invoices is the main purpose of this application To make this as general as possible the underlying structure and classes are very complex Creating complex classes is a job that anybody can do if they want but the trick is to add functions to these classes to make the use as easy as possible That way you can easily plug an user friendly interface into these classes using the provided general functions For advanced options the high level functions can be used This mix also makes it a lot easier for people that will write plug ins for the application as they don t need to kno
156. our keyboard layout This can be changed later however do keep in mind that if you do not select the correct layout for your keyboard for example an azerty keyboard instead of a qwerty keyboard what you type may not match the keys your press Especially keep this in mind when filling in the passwords further on into the installation 4 2 2 4 Network Configuration After the installer finishes mounting the CD and loading the installer components you will have to select your primary network interface at least if your server is equipped with multiple interfaces which should be the case for this setup Note that this interface must be connected to a network with access to the internet to be able to continue the installation Page 12 of 53 Linux High Availability Cluster Manual 2 debian RANA Configure the network Your system has multiple network interfaces Choose the one to use as the primary network interface during the installation If possible the first connected network interface found has been selected Primary network interface etho Intel Corporation 82 Ethernet Pro 100 ethl Intel Corporation 82557 8 9 Ethernet Pro 100 Go Back J Continue Figure 4 5 Network Interface Selection Next it will ask you whether you want to configure your server through DHCP In our example we use yes and will assign the permanent IP for the server after the installation is completed successfully Make sure the i
157. pl cgi without and save the file Page 31 of 53 Linux High Availability Cluster Manual Also note that for each website you want to enable Perl support for you have to add this lines to the file lt Directory directory to site gt Options ExecCGI AddHandler cgi script cgi pl lt Directory gt Next restart Apache etc init d apachez restart Note that node specific configurations of the web server should be made in local conf since all other files in the configuration directory are automatically being synchronized by csynca We will be using a MySQL Cluster with 2 nodes The number of nodes can be changed depending on your setup but a recommended minimum is 3 For logistical reasons this manual will be using a setup with only 2 machines however if you have a third machine available it is highly recommended to use it The MySQL cluster has 3 main parts e First is the NDB Management Server This should ideally run on a separate server and can theoretically be shut down as soon as the server is started This is however not recommended since it will have to be restarted each time you want to administer the cluster e The second part is NDB This is a data node that stores the database in memory In our cluster both servers will be running an NDB node e The third part is the MySQL node this is a regular MySQL server configured to process the clients queries which will on
158. re split up in two blocks as the first part was the technical part of the practical training where could learn how to work with Linux and clusters After finished these projects got to develop web applications for the cluster The revision and extension for the web shop contained making the application multilanguage and converting it to PHP5 Atime overview e Linux HA cluster 1 month e Linux Ganglia monitoring on a pen drive 2 weeks e Global Invoicing 1 month and a half e Web shop revision and extension one week and a half All of these task had to be taken care of and carefully documented Documentation differed from project to project For the Linux HA cluster we had a manual with technical background provided but we had to revise it adapt it extend it For the Linux and Ganglia monitoring on a stick had to start from scratch All research had to be done and what was actually used for the final project had to be documented Documentation for a project is more than just a HOW TO You also have to provide some technical background about the used utilities etcetera For the Global Invoicing everything had to be written from zero as well Both the research the database analysis requirement analysis as the manuals to use the application and to write templates and plug ins Most of this had to been done after debugging and testing the application as had to do this project completely by myself For the web shop rev
159. rs in different browsers Even though web standards are set websites do tend to look different on different browsers This is due to how the standards are interpreted or in what order Each designer should at least try to make his her application look work the same on both Internet Explorer and Mozilla Firefox or another browser that uses the Gecko rendering machine One of the issues typically for this application was the preview and print version for invoices Due to major differences in pixel usage and print options in the browsers it was quite a deal to get print out look as similar as possible Again due to these pixel interpretations and differences in supporting the CSS they cannot look totally the same but the biggest problem was to get them to use an A4 paper fully for printing purposes The footer should be on the right place and the data should take the entire width of the page not more and not less This is why there is a difference in previewing invoices in Mozilla Firefox and Internet Explorer The widths are different for the browsers to get the optimal results when printing The printing has been tested on multiple resolutions and has proven to be solid now As this web application will be used as an accounting application it is not advised and not wanted that data in the application becomes published on search engines The application should only be used for internal purposes So to prevent search robots to search through the site ev
160. rtitions select dev hda1 and dev hdb1 supposing your hard disks were labelled hda and hdb and continue These are the 2 boot partitions Repeat above paragraph for the remaining 2 devices in these cases partitions select dev hda2 and dev hdb2 and finish Multidisk Configuration You should now be back on the Partition Disks screen where 2 RAID1 devices one boot device of 500MB and one 61GB device to be used for LVM should have been added to the devices list We can then continue by configuring the LVM Select the largest RAID1 device and configure it to be used as physical volume for LVM When this is done the table should look similar to the one in Figure 4 9 Multidisk Page 16 of 53 Linux High Availability Cluster Manual O debian RANA Partition disks This is an overview of your currently configured partitions and mount points Select a partition to modify its settings file system mount point etc a free space to create partitions or a device to initialise ts partition table J Configure the Logical volume Manager Guided partitioning Help on partitioning Y IDE1 master hda 61 5 GB IC35LO60AVVA07 0 gt 1 primary 501 7 MB Kraid gt 2primary 61 0GB Kraid 7 IDE1 slave hdb 61 5 GB IC35LO60AVV207 0 gt l primary 501 7 MB Kraid gt 2primary 61 0GB Kraid Y RAID1 device 0 501 6 MB Software RAID device gt 1 501 6 MB Y RAID device 1 61 0 GB Software RAID device
161. rver This directive however is only valid for Windows In Linux there s more that has to be done so had to figure out how to configure Exim4 PHP5 and Apache2 to do this A full installation and configuration manual on the Debian HA Cluster is included in this thesis as the first attachment Critical reflection Working with Linux and getting a hang of it was one of the goals still wanted to achieve will being a student as Linux is a very often used operating system on web servers etcetera Furthermore working with a non graphical interface you have to edit the configuration files directly and thus you get to know more about how an operating system works and how much little things are involved and depend on it Linux is far from a perfect operating system as there are too many distributions to have a very decent support on the internet but if want to continue in the web designing business and manage my own servers will have to be able to manage these servers This assignment was perfect for this goal as learned how to work with Linux with as key feature web application support and clustering them learned how to configure Linux in a complex hard drive set up including RAID for direct back up also learned how to configure Apache en MySQL more deeply to work with a cluster so you even have a redundant server working My interest is even more awaken now and I m able to manage a Linux server in quite a decent way 19 Linux Gang
162. s e Good price calculating functionality e Multilanguage with very good and easy language management e Maintenance must be kept as simple as possible e Security should be good and the data shouldn t be public available e Use as less resources memory as possible due to low RAM amount in the servers Should e Ability to edit invoices e Graphical interface for language management preferably with comparing options e Invoice lay out can be different for each system company e User management e View invoices in the available languages independent of the application s language Could e Database clean up e Fully edit saved invoices e Neat yet functional lay out Won t e Support for other database systems than MySQL Database Introduction All the data used for the Global Invoicing system and stored by it are stored in a MySQL5 database In our specific case it is stored in a MySQL cluster using the NDB Cluster Engine The database schema is compact enough to have no problems at all with the clustering The system itself never uses the remote databases The only code that accesses remote databases are in the plug ins and all the plug ins should do is read data from these databases This way the administrator can easily create an extra account especially for this plug in who has only read permissions This improves security The plug in never writes anything The writing is only done in the local Global Invoicing database and the writing is do
163. s not done nor was it needed as the application uses anchors to fill out the template This means there is a fixed number of variables to use and place in the template So the template creator doesn t have to check the number of variable fields and doesn t need to check the database He just needs to know what anchors there are and to place them More detailed information about this scheme can be found in the data dictionary This is included in the attachment with the full manual for the Global Invoicing application 25 Problems and things to keep in mind Creating this application seemed very easy at the beginning but showed a lot of difficulties and things to keep in mind while was at it First and for all had to program the major part of the application with no data There was no website or data could use to test my system with there were no examples to use as main idea This means the first part of the programming creating the classes etc was a very abstract thing as the functionality only existed in my head and in the classes but nothing could be tested So had to think of every possible exception or usage and keep that in mind and implement it You have to keep the big picture of all your parts in your head or you will lose track of everything you have done Due to the abstractness and complexity of the classes it s also more difficult to keep the system user friendly Not only the interface but also ways to expand the s
164. s the language Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks The current language and the default language shouldn t be able to be deleted The default language is also used to fill up missing translations 46 Add global Purpose To edit a global to the system Short description The administrator adds a global Actors Administrator Frequency Low Scalability Low Criticality Average Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The global should be added to the system Primary way e User chooses admin panel from the menu e User chooses language management e User chooses add global e User fills in the fields e User hits save Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 47 Clean up database Purpose To remove all old invoices from the system Short description The administrator can choose to remove all old invoices more than a year old from the system to keep the database as light as possible Actors Administrator Frequency Low Scalability Low Criticality High Indirect demands
165. scount id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci ALTER TABLE discount ADD Foreign Key translate field id REFERENCES translate field translate field id ON DELETE CASCADE ALTER TABLE discount ADD Foreign Key item id REFERENCES item item id ON DELETE CASCADE Table structure for last done order DROP TABLE IF EXISTS last done order CREATE TABLE last done order plugin varchar 50 NOT NULL foreign id int 11 NOT NULL datetime datetime NOT NULL order id int 11 NOT NULL PRIMARY KEY plugin foreign id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci ALTER TABLE last done order ADD Foreign Key order id REFERENCES order order id ON DELETE CASCADE Table structure for user DROP TABLE IF EXISTS user CREATE TABLE user user id int 11 NOT NULL auto increment username varchar 50 NOT NULL password char 32 NOT NULL firstname varchar 50 NOT NULL lastname varchar 50 NOT NULL email varchar 50 NOT NULL admin char 1 NOT NULL DEFAULT N CONSTRAINT UsernameUniqueKey UNIQUE username PRIMARY KEY user id ENGINE NDBCLUSTER TYPE NDB AUTO INCREMENT 1 DEFAULT CHARSET UTF8 COLLATE utf8 unicode ci Table structure for company DROP TABLE IF EXISTS company CREATE TABLE company company id int 11 NOT NULL auto increment name varchar 70 NOT NULL address varchar 255 NOT NULL email var
166. se a specific NTP server open etc ntp conf and add the following server my server domain ext prefer Heartbeat is a cluster management program that allows servers to be joined into a cluster relatively easily and share one common virtual IP Since the release of version 2 heartbeat also supports an unlimited amount of nodes in each cluster resource monitoring and policy and time based resource management The version supplied by Debian may not be the latest version supplied by the Heartbeat development crew but to keep installation and updating as easy as possible we will use the Debian Package Manager to install the software and manage the updates as they are released To install the heartbeat program issue following command aptitude install heartbeat 2 This needs to be done on both servers 2 UTC Coordinated Universal Time Page 25 of 53 Linux High Availability Cluster Manual It is normal to see an error at the end like the one below because we haven t yet configured heartbeat Setting up heartbeat 2 2 0 3 2 Heartbeat not configured etc ha d ha cf not found Heartbeat failure rc 1 Failed Finally copy the example configuration files from the documentation directory to the configuration directory by issuing following sequence of commands cd usr share doc heartbeat 2 cp ha logd cf etc logd cf cp authkeys etc ha d gzip d ha cf gz cp ha cf etc ha d
167. sed in other Linux on USB device projects like Feather Linux It matured in many ways and had a lot of people testing it using it and improving it in many ways Thus Damn Small Linux became a very solid operating system For this distribution a 64 MB should be more than enough but if you think about installing the monitor tools and add some documentation you should take a device which has at least 128 MB of space available About Feather Linux Feather Linux is one of the matured abbreviations of Damn Small Linux This distribution is a bit bigger more stable and offers a beautiful user interface Its requirements for space are still below 128MB Included software in this distribution are for example Firefox gaim prozilla nano fireftp abiword and so on As Window Manager Fluxbox is used which is a neat and light Window Manager Feather Linux is based on DSL so this means it has a very firm and well tested base More information about Feather Linux can be found at http featherlinux berlios de To make sure we have enough space for swap documentations and our software we have to choose an USB stick which has at least 256MB Damn Small Linux or Feather Linux At first our decision was quite quickly made we were going to use Feather Linux Feather Linux is more user friendly and has more capabilities than Damn Small Linux Off course this is a tradeoff because Damn Small Linux wants to keep everything below 60 MB
168. sh 18 insert into translation values 2 1 Engels insert into translation values 1 2 Dutch insert into translation values 2 2 Nederlands Fields needed for the contents of the website insert into translate_field name values language insert into translate_field name values username insert into translate_field name values password insert into translate_field name values remember_me insert into translate_field name values yes insert into translate_field name values site_title insert into translate_field name values log_in insert into translate_field name values reset insert into translate_field name values menu insert into translate_field name values home_page insert into translate_field name values welcome insert into translate_field name values logout insert into translate_field name values profile insert into translate_field name values choose_action insert into translate_field name values create_invoice insert into translate_field name values archive insert into translate_field name values admin_panel insert into translate_field name values create_company insert into translate_field name values view_templates insert into translate_field name values view_plugins insert into translate_field name values new_password insert into translate_field name values new_pas
169. sks Current LVM configuration Unallocated physical volumes none Volume groups vyg00 60989MB Uses physical volume dev md1 60989MB Provides logical volume home 16106MB Provides logical volume root 26629MB Provides logical volume srv 16106MB Provides logical volume swap 2147MB Continue Figure 4 10 Overview LVM configuration When finished press Continue Now all that still needs to be done is creating partitions on the newly created LVs and assign the still unused RAID boot partition Select the only remaining unassigned RAID1 partition and change the Use as setting to Ext3 journaling file system You should then get a few more options in the partition settings menu change the Mount point option to boot static files of the boot loader and finish setting up the partition Next select the LV swap on the LVM VG vgoo device and change its Use as option to swap area Now go through the remaining LVM VG devices change their file system option to Ext3 journaling file system and change the mount point to what there label implies In our example that means LV home will be mounted as home srv as srv and root as You are now finished partitioning the disks so after going through the partition and device list you can select Finish partitioning and write changes to disk and continue If prompted whether you
170. sl transl transl trans trans trans trans transl transl transl transl trans insert into transl niet gemaakte facturen getoond insert insert insert insert insert insert insert insert insert insert insert into into into into into into into into into into into trans transl trans transl transl trans trans trans trans transl lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation transl lation val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val val ues ues ues ues LUES ues LUES lues ues ues ues ues ues ues lues Lues ues ues ues ues ues lues
171. stments Exim is an open source mail transfer agent which is commonly used on Linux Unix systems It is freely available under the terms of the GNU General Public License It is very flexible in the way mail can be routed Furthermore exim can be used as a replacement for the common used sendmail The next steps have to be done on each server in the cluster To install exim aptitude install exim Make sure you confirm the installation and when asked choose Satellite system Use the default name and mails will be read from ns2 stadia fi in our case The satellite is also ns2 stadia fi Enter none without for system administrator mail Choose y to replace the aliases file Save this configuration with y Now we have to make sure our PHP settings point to this service so the service directs everything to our SMTP server To do this open the php ini file vi etc phps apache2 php ini Find the setting sendmail path and set it to usr sbin sendmail t i Next we have to make a symbolic link so that PHP automatically will use the exim library when looking for the sendmail library In s usr sbin exim usr sbin sendmail We continue setting up exim Open the configuration file vi etc exim exim conf Search for the local_domains setting and make sure it is empty Next restart the service etc init d exim restart Next we restart Apache to ma
172. sword_repeat insert into translate_field name values firstname insert into translate_field name values lastname insert into translate_field name values emailaddress insert into translate_field name values save insert into translate field name values pass required _profile insert into translate field name values identical new pass insert into translate field name values username taken insert into translate field name values wrong email insert into translate field name values enter password insert into translate field name values succeeded insert into translate field name values failed insert into translate field name values wrong pass insert into translate field name values username not found insert into translate field name values detail info insert into translate field name values support unique insert into translate field name values server insert into translate field name values database insert into translate field name values choose invoice insert into translate field name values invoice unique notice insert into translate field name values order insert into translate field name values items insert into translate field name values discounts insert into translate field name values em on insert into translate field name values by insert into translate field name values tans
173. t insert insert insert insert insert insert insert insert insert insert insert insert into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into into transl trans trans transl trans trans trans trans transl transl trans transl trans trans trans trans trans transl trans transl transl trans trans trans trans trans trans trans transl trans trans trans trans transl transl trans transl trans trans trans trans trans transl trans transl transl trans trans trans trans trans trans trans transl trans trans trans trans transl transl trans transl trans trans trans trans trans transl trans transl transl trans trans trans trans transl trans lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation lation latio
174. t 78 DopmE M 78 Ao EEE STEE 79 DT ii A A REPRE 79 Conipany mariagermient i deo A cee diderteheiiaeaace 79 Add EEE oi ipeo ret dea der Ep ie ER E P HENRI ap CUBE EE xS ase 79 ma E 79 Rl M 79 Language managementa ciori RT ge ab Tode eeu 80 pn 80 n M M PRA 80 Delete eicere idas 80 Add elo tisdale 80 Clean p database uento ia 80 Back Up database tatto une tite S 81 Theoretical background Introduction The Global Invoicing application is a web based application that has as main purpose to gather invoice data from any other database related system and store it locally The application is PHP5 MySQL5 and had as extra requirement that it need to have multilanguage support in a way that keeps maintenance as easy as possible The project uses classes to keep the very abstract functionality apart from the rest of the application The multilanguage data is stored in the database to enhance speed and maintenance These classes also deal with the aspect of getting data from multiple systems One must note however that classes in PHP are commonly used to collect related tasks in a single file and not only single functionalities The Single Responsibility Principle SRP used for creating class
175. tdown script vi usr Powerware NetWatch shutdown sh Search for the Linux section that looks like this Jlinux echo message usr bin wall cd sbin shutdown h now lt dev console shutdownstatus 2 Insert the following lines between the cd and the sbin shutdown h now lt dev console etc init d mon stop etc init d heartbeat stop Save the file and exit lines On HAC CIN2 Edit the same shutdown script scroll to the Linux section and add the following line between the cd and the sbin shutdown h now lt dev console etc init d heartbeat stop Save the file and exit Page 51 of 53 Linux High Availability Cluster Manual After a power failure has occurred every mysql service should start working again by itself Although the management server does not start up automatically after power failure That s why we have to tell him to start up automatically We can do this by issuing the following commands echo ndb_mgmd f usr local mysql cluster cluster cnf gt etc init d ndb_mgmd chmod 755 etc init d ndb_mgmd update rc d ndb_mgmd defaults Now the servers are configured to shutdown properly in case of a power failure Page 52 of 53 Linux High Availability Cluster Manual 7 Configuring SMTP mail service In order for our cluster to use the mailing services in PHP correctly using a remote mail server we have to do some adju
176. teger String RemoveCompanyLogo company id Integer String RemoveLanguage language id Integer String RemoveTranslateField translate field id Integer String 60 RemoveTranslations language id Integer translate field id Integer String SaveForeignld plugin name String foreign id Integer local order id Integer String SetCompanyLogo company id Integer logo url String String SwitchAdmin user id Integer admin Y N Char String Translate language id Integer translate field id Integer String UpdateClient id Integer firstname String lastname String address String telephone String fax String email String bank String vat number String String UpdateCompany id Integer name String address String email String website String telephone String fax String bank String var1 String var2 String var3 String logo String String UpdateLanguage language_id Integer lang_code String String UpdateOrderClient order_id Integer client id Integer String UpdateOrderCompany order_id Integer company_id Integer String UpdateTemplateRequested order_id Integer template String requested String String UpdateTranslation language id Integer translate field id Integer value String String UpdateUser user id Integer username String firstname String lastname String email String password String new_password String String UserList String 61 Relations i
177. terfaces available on your system and how to activate them For more information see interfaces 5 The loopback network interface auto lo iface lo inet loopback he primary network interface allow hotplug eth0 auto ethO iface eth0 inet static address 192 168 182 11 netmask 255 255 255 0 network 192 168 182 0 broadcast 192 168 182 255 gateway 192 168 182 254 The secondary network interface auto ethl iface ethl inet static address 192 168 254 1 netmask 255 255 255 0 Then issue this command to restart the network interfaces to apply the changes etc init d networking restart After installing the OS Debian will when installing new packages still look on the CD rom before checking sources on the internet to disable this behaviour which is recommended for use on a remotely managed server follow these instructions Open etc apt sources list with vi or nano or and comment out the line beginning with deb cdrom 7 Commenting out a line in a configuration file can be done by adding in front of that line Page 21 of 53 Linux High Availability Cluster Manual We also have to change the host file a bit Because we are using a proxy we have to add the IP address of this proxy to our host file vi etc hosts Add the following lines to the file 193 167 197 35 www cache stadia fi
178. the rc d links so that gdm is only started in init level 5 Enter following command as root in a console terminal update rc d f gdm remove update rc d f gdm start 20 5 stop 20012346 If you also installed KDE also enter following command update rc d f kdm remove update rc d f kdm start 20 5 stop 20012346 After you have completed this reboot your computer to test if the changes were succesfull reboot Now the system should boot only in command line To switch to the GUI you first have to start Gnome gdm If you are not automatically switched to the GUI hit CTRL ALT F7 To switch back hit the same combination but with F1 to F6 instead of F7 GNOME Display Manager Page 20 of 53 Linux High Availability Cluster Manual 4 2 3 2 Configuring Netw rk Interfaces We will now configure the IPs we will be using for the different nodes in the server Open etc network interfaces in your favourite text editor VI VIM nano and edit it to look like this vi etc network interfaces Note You also might want to use the tab button It is an easy way to perform the commands faster Simply type the first couple of letters of the word and then press tab The command line interface will solve the word for you At that way you do not need to type the whole word over and over again This file describes the network in
179. thing Plugin plugin name String plugin has unique key Bool db server String db username String db password String db database String unique key table String unique key column String oo oo 0 0 0 0 db foreign connection MySQL db local connection MySQL O items_array Array company_info Array client_info Array discounts array Array discount language array Array item array inserted Array discount array inserted Array company id Integer invoice id Integer unique value Integer O O oo 00 0 0 0 O0 e date foreign String e id foreign Integer o client id Integer o template name String invoices array Array e construct Connect NewConnection MySQL e getServer String e getUser String e getPassword String e getDatabase String setTemplate template_name String getTemplate String getPluginName String setPluginName plugin_name String setUnique bool Bool setDBServer server String setDBUsername username String setDBPassword password String setDBDatabase database String setUniqueKeyTable table String setUniqueKeyColumn column String hasUniqueKey Bool Createlnvoice Bool ClearlnvoicesArray SetupCompany Bool Setuplnvoice date String requested String system String payed Bool company id Integer user id Integer client id Integer template String Bool setlnvoice id Integer setCompa
180. tion created by Polytechnic Stadia Helsinki and is made out of students These students so called tutors make sure the international students are taken care off when they arrive and provide them with the needed papers and information Furthermore they organize many activities which can be attended not only by the exchange students Among them especially have to thank my tutor Ana Barrionuevo Korkeill She is also the international representative of Hamok in Helsinki would also like to thank Nick Deboo Jonas Pypen en Wouter Cosyns Nick is from West Flanders and has been staying in Helsinki since September and provided me with a lot of information Nick is also a student at Howest Jonas is from East Flanders and was my colleague during my first assignment Jonas and Nick had to work on application development and synchronization for the Nokia N810 Wouter also from East Flanders arrived after me and was assigned to work with a Cisco Box and dealing with VOIP Voice Over Internet Protocol and SIP Session Initiation Protocol Together with them was working in the same lab which resulted in good and fun times and also we could help each other in our native tongue which is always faster and easier Furthermore would like to thank Corneel Theben Tervile my teacher Java Thanks to him the paperwork finally got a move also wish to thank miss Isabel Uitdebroeck and miss Siska Wielfaert for helping me completing the papers and sending them
181. titions you will be asked to enter the root password for the system Please remember that this password should be hard to guess and not found in any dictionaries If anyone else has or manages to guess the password he will have full access to the system Next you will be asked to enter the user data for another user account which should be used for non administrative activities 4 2 2 7 Configuring the package manager After the installer finishes installing the base system you will be asked whether you want to use a network mirror Since we have used a netinst CD which only installed the minimal base system we will have to download all packages we want installed from a network mirror Select yes and continue by selecting the country you are in or at least from where you want to download the packages You may also be asked what protocol you want to use to download the packages In most cases either will work fine if you are behind an http proxy server however you should chose http If you can t choose what protocol to use choose go back and choose configure the package manager and continue As a proxy we use http root stadia www cache stadia fi 8080 You might also be asked to select which packages to install just install the standard system package and the Desktop environment We will download the rest of the packages through the command line later By doing it that way we will only install the packages
182. tltemDiscount item id Integer discount id Integer String CopyOrder order id Integer String CreateClient firstname String lastname String address String telephone String fax String email String bank String vat_number String String CreateCompany name String address String email String website String telephone String fax String bank String var1 String var2 String var3 String logo String String CreateDiscount value String translate_field_id Integer is_percentage Char on_total Char low_limit Double item_id Integer String Createlnvoice date String requested String system String payed Char company_id Integer user_id Integer client_id Integer template String String Createltem name String description String price_no_vat Double vat_percentage Double String CreateLanguage lang code String translate_field_id Integer String CreateTranslateField name_description String String CreateTranslation language_id Integer translate_field_id 59 Integer value String String CreateUser username String password hash String firstname String lastname String email String admin_boolean Bool String DeleteUser user_id Integer String ExistLanguage language id Integer String GetAllTranslations name String String GetAmountltemsOrder order id Integer item id Integer String GetClient client id Integer String GetClients String GetCompan
183. tmp ganglia root HAC CiN2 tmp ganglia Now we have to download some programs used for compiling the software and to be able to run ganglia issue the following commands on both nodes aptitude install make aptitude install gcc aptitude install g aptitude install gmetad aptitude install rrdtool Make sure you are in the folder tmp ganglia Now we have to unzip the package on both nodes tar xzvf ganglia 3 0 6 tar gz cd ganglia 3 0 6 Afterwards we compile the installation package on both nodes configure make make install Issue the following commands to setup the default configuration file and to test the file and the daemon gmond default_config gt etc gmond conf gmond To test the configuration you can issue the following command If everything was properly installed you should receive an XML file output telnet localhost 8649 Page 39 of 53 Linux High Availability Cluster Manual To be able to start gmond on startup we have to place an init file in etc init d Issue following command cp etc init d gmetad etc init d gmond We still have to edit this file so that it would work with gmond vi etc init d gmond In this file change the initial variables like the ones showed below DAEMON usr sbin gmond NAME GMOND DESC Ganglia and save the file T
184. to represent this language As the icon is language sensitive but translation insensitive the icon is the same for each translation of the language the language table is the place where you should store this discount tel fax ex ia reduction delivery_street min qty delivery nr E reduction delivery_postal comp_id delivery_city delivery country delivery comment CU catalogue companyid page date descr1 status descr2 comment descr inv vat updated reduction comment quantreduction visible delivery date status ek ja status sort FK2 extra_id FK1 orderline_id text cost language id language code translate field id language icon translate field x language id Pk translate field id 3 translate field id rame aing translation description cust_visible mailsubject subjectname language description cost pricelot supplier catalogue pcode ean_code product_names descr2 descr3 descr_inv min_aty price pricelot currency updated comment visibile extra_options_items extra_id items_id supplier PK telephone email delivery_street delivery_nr delivery_postal delivery_city delivery_country delivery_comment As you can see the translation table are not linked to any other table This is because only the interface had to be made multilanguage and not the contents of the catalo
185. trick is to set the names correctly right after the connect Luckily most programmers put the connection in a separate file so you only have to implement it once 30 lt php mysql_connect Sdb_hostname Sdb_username Sdb_password true or die Could not connect to the database mysql select db Sdb database or die Unable to select database mysql query SET NAMES utf8 All items coming from the database were displayed correct by doing this but some normal data from the files still had this problem changed altering some settings on the servers a bit Apache settings mainly but nothing worked After some other tests suddenly remembered that these are so called HTML Entities and you need to enter a HTML code for them instead of their normal character So was able to fix this too after replacing them by the correct entities An overview of HTML Entities can be found at http www w3schools com tags ref entities asp One of the changes that took quite some time was changing how it was originally programmed to go back to a certain page after processing a POST of a form In the original version the PHP function header was used to change the header data and thus send the browser to another page This function can now only be used correctly before anything else has been outputted So to keep this functionality had to change the way the resending took place The change was done by using a little piece of Jav
186. ure 4 7 Page 14 of 53 Linux High Availability Cluster Manual O debian RENO Partition disks This is an overview of your currently configured partitions and mount points Select a partition to modify its settings file system mount point etc a free space to create partitions or a device to initialise its partition table Guided partitioning Help on partitioning Y DEl master hda 61 5 GB IC35L060AWVA07 0 gt prilog 61 5 GB FREE SPACE IDE1 slave hdb 61 5 GB IC35L060AVV207 0 gt prilog 61 5 GB FREE SPACE Undo changes to partitions Finish partitioning and write changes to disk Go Back Continue Figure 4 7 Partitioner view with empty table Next we have to create 2 new physical partitions one for booting the system another to be used by LVM Both of these have to be configured to be used in RAID Select the free space on the first device in our case hda and continue Then chose Create a new partition and when asked to enter the size enter 500MB which should be sufficient for a boot partition The type of the partition should be Primary and it should be placed in the beginning of the hard drive The partitioner will then show you final partition settings here you will have to change the Use as option to physical volume for RAID Now finish setting up the partition Next select the free space again and create another new primary partition on it using all of the rem
187. value Stranslations array Sis percentage bool Son total bool Slow limit Sitem_id 0 e Filliltems Sname Sdescription Sprice Svat Samount After you have processed a single invoice add it in the overall object Sthis gt AddInvoice Sthis gt getObject The last thing your plug in should definitely have is the construct function which has to look like this public function __construct Sthis gt Configure Plugin __construct V construct 66 Creating a template Introduction The Global Invoicing application can automatically read all templates in the templates invoice folder and use them To create a template you should only have a minor knowledge of PHP and HTML CSS How To The template system is based upon anchors PHP variables These contain all the information obtained from an invoice You can simply design the lay out and put them in it You can also edit them and modify them according to your needs Each template should use all of the anchors These two anchors determine the width and height of your invoice so that it would look perfect when printed These have to be implemented in theHTML tag that surrounds your complete invoice data e Sianchor width e Sianchor height Other anchors e Sianchor company telephone e Sianchor company fax e Sianchor company email e Sianchor company website e Sianchor company bank e Sianchor company var1 e Sianchor company var2 e Sian
188. w study the entire class structure Only the general points they need First step in creating an invoice is choosing whether you want to create an invoice using just an empty form or using one of the plug ins that will deliver filled in forms Blank invoice If you chose to create an invoice using an empty form you will get an empty form You can enter all the fields of the form Also you can easily add or remove items and discounts to the invoice This is done using JavaScript Hitting the edit button will save the changes in the SESSION but not yet in the archive local database To save everything in the database hit the save in the archive button After you saved the invoice in the archive you will be automatically diverted to the archive and thus see the printable invoice you just created Note if you want to link a discount to an item and the item isn t available in the dropdown list yet then the invoice has to be stored in the archive first The classes will automatically check all the entered information It will check if the company and or client doesn t exist yet If so this existing company client will be used If a logo is entered for a company and the company exists the logo will be overwritten In case the company client doesn t exist it it will be created This will make sure the data in the database isn t redundant For discounts there are a few options You can first choose if the value given for the dis
189. want to see an invoice The system is the used plug in The splitting up in categories is to keep the pages easy to browse as after a while a lot of invoices will be stored and scrolling for hours isn t something people like Invoices made from an empty form are stored in a separate system Once you clicked on the wanted invoice the invoice is shown with the template that was set while creating the invoice If the template is for some reason no longer available the default template will be used You can switch the language for the invoice and even the template This will not affect the interface of the application nor will it be stored in the database If you want to change data to the invoice or link discounts to items you simply have to click the edit button on top of the invoice This will take you to a similar form like used to create invoices e Global Invoicing Windows Internet Explorer Jee GO tenen o tievoicelindes chorpuerchivetinvoicem tet v 14211 x el We Fclobal invoicing gt El dA e Pagina gt GQextra gt EN MENU ARCHIVE Profile E E d Create a new Choose the language for the invoice English x invoice i SR Em s Aras Is this invoice already paid No m e Create a new company H Bil e View INVOICE templates e View plugins E i cea voice date late agere 2005 04 22 2008 05 18 15 32 08 00 00 00
190. want to write the changes to disk select yes and continue Figure 4 11 below illustrates how the partition table should look after going through the entire process Of course sizes may vary and additional VG devices may have been defined This is just a sample configuration which should be sufficient for most setups however Page 18 of 53 Linux High Availability Cluster Manual Odebian RANA Partition disks This is an overview of your currently configured partitions and mount points Select a partition to modify its settings file system mount point etc a free space to create partitions or a device to initialise its partition table P IDE1 master hda 61 5 GB IC35L060AV A07 0 Y IDE1 slave hdb 61 5 GB IC35LO60AVV207 0 gt 1 primary 501 7 MB Kraid gt 2primary 61 0GB Kraid 7 LVM VG vg00 LV home 16 1 GB Linux device mapper gt 1 16 1GB fext3 home V LVM VG vg00 LV root 26 6 GB Linux device mapper gt 1 26 6GB fext3 7 LVM VG vg00 W srv 16 1 GB Linux device mapper 1 16 1 GB fext3 srv 7 LVM VG vg00 LV swap 2 1 GB Linux device mapper gt 1 21GB f swap swap 7 RAID1 device 0 501 6 MB Software RAID device gt 415016MB fext3 boot Y RAID device 1 61 0 GB Software RAID device gt 1 61 0GB Klvm Go Back Continue Figure 4 11 Layout final partitioning table 4 2 2 6 Setting up users and passwords After the installer finishes creating the par
191. we need for setting up the cluster Installing this will take quite some time Page 19 of 53 Linux High Availability Cluster Manual After the installation completed you have to set up the XServer configuration Choose the following video modes 1280x1024 1024x768 800x600 and 640x480 Next we install the GRUB boot loader on the system to the Master Boot Record This will give us a menu when we boot the system from which we can choose what OS kernel to boot Now the installation is complete Remove the disc and continue The system will automatically reboot After the reboot don t install any updates whatsoever This part is similar for each node in the cluster however the settings may vary This manual will give the installation instructions for node 1 to configure node 2 simply replace the node 1 specific configuration directives with those for node 2 We will be doing everything through command line so having a desktop environment installed is no requirement to use this guide Ifyou have followed this manual you will probably boot in a Desktop environment so we need to open a command line first To do this click Applications in the task bar and choose Accessories gt Root Terminal If you chose to install the GNOME graphical desktop environment Debian will boot into this by default and since the gdm loads at most init levels by default in Debian the links to the startup scripts will have to be changed We change
192. y Low Scalability Low Criticality High Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The configuration settings should be changed Primary way User chooses admin panel from the menu User chooses configuration settings User edits fields e User hits save Use cases related to primary way e Login Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 35 Add user Purpose To add an user to the system Short description The user gets a form to complete and can add users to the system Actors Administrator Frequency Average Scalability Low Criticality High Indirect demands Preconditions The user must be logged in and must be administrator Post conditions The user should be added Primary way User chooses admin panel from the menu User chooses user management User chooses add User edits fields User hits save Use cases related to primary way Log in Alternatives Use cases related to alternatives Exceptions Use cases related to exceptions Remarks 36 Edit user Purpose To change the role of an user Short description The user can be switched from viewer to administrator or the other way around Actors Admin
193. y computer you want Summary This manual will deal with the full installation of all the software and requirements for Linux Ganglia on a stick and how to use it The first part of this manual will guide you step by step through the steps needed to set up a similar system This means creating a bootable USB stick with Damn Small Linux on it a bootable floppy disk in case USB boot isn t supported for the computer and all software Ganglia needed in Damn Small Linux to be able to monitor the cluster The second part of this manual will provide instructions on how to use this monitoring tool How to start the system both USB and floppy wise and how to get the monitoring information About DSL Damn Small Linux or DSL is a free Linux distribution for the X86 family of personal computers It was designed to run graphical applications on older PC hardware for example machines with 486 early Pentium processors and very little memory Damn Small Linux used to be a LiveCD with a size of 50 MB What originally started as an experiment to see how much software could fit in 50 MB eventually became a full fledged Linux distribution It can be installed on storage media with small capacities like bootable business cards USB flash drives various memory cards and Zip drives Damn Small Linux was derived from Knoppix which itself is derived from Debian DSL can be used as base to install a full Debian environment Next to that DSL has become frequently u
194. you have the cookie stored you will be Create anewinvoice automatically logged in again Archive Create a new company If you use the log out function of the website the cookie becomes deleted and automatic log in will be disabled until it is checked again Also the View templates SESSION becomes deleted and you will be kicked back to the log in screen View plugins For both the log in cookie and the language cookie the settings are set to f keep the cookie alive for a month Upon each visit this month becomes renewed If you haven t used the application within a month the cookie el EY he PNEU y expires and cannot be used 73 Changing language Changing languages can be done very easy In the log in screen you can already choose what language to use Once logged in you can still switch the language using the drop down box in the left hand menu Once clicked the language will automatically be loaded Translations for the chosen language are retrieved from the database and stored in the SESSION This is the best tradeoff between speed and performance and memory usage The chosen language is stored in a SESSION so changing pages doesn t change the language Also if the browser supports it the choice is stored in a cookie This cookie never gets deleted not even when you log out Profile Each user can edit his or her profile To improve flexibility to the user and less maintenance to the administrat
195. ys wanted There was still some functionality wanted to add and also wanted to give the application a better design but was short in time due to the fact was the only one working on this project and had to take care of the old cluster that suddenly crashed 28 Features of the invoicing system A short overview of the key features of this application AJAX powered check for usernames Altering invoices and data in invoices with as new option o Changing data for an item can be automatically processed to all invoices depending on it or the change can be saved just for this invoice item Anchor based invoice templates o Templates can easily be made independent of the information they get Automatic copyright notice adjustments o This improves maintenance a little bit and is often a forgotten thing to adjust Cookie based log in remember me function Created invoices are stored in own database system o Checking archives o Editing invoices without touching the remote database o Faster and independent processing o Printing the invoice over and over again using any template Database management o Independent back up functionality o Clean up to keep the internal database as small as possible Easy extendable template system o All templates are automatically processed from its directory o Create as many templates as you want E mail addresses are checked for valid structure with JavaScript Regular Expressions Multi language support o A
196. ysInfo is an open source project and can be found at http phpsysinfo sourceforge net System Information ubuntu desktop 172 20 22 28 System Vital Hardware Information Canonical Hostname ubuntu desktop Processors 1 Listening IP 172 20 22 28 Model Intel R Pentium R 4 CPU 3 00GHz Kernel Version 2 6 17 10 generic SMP CPU Speed 2 99 GHz Distro Name 9 Debian testing unstable Cache Size 2048 KB System Bogomips PCI Devices 00 07 1 IDE interface Intel Corporation Load Averages 1 08 0 46 0 19 82371AB EB MB PIIX4 IDE 00 0f 0 VGA compatible controller VMware Inc VMware SVGA II PCI Display Adapter _ Network Usage rl SCSI storage controller BusLogic BT Device Received Sent 00 11 0 Ethernet controller Advanced Micro E 1 98 MB 1 98 MB SM ttu udis PCnet32 LANCE etho 1 08 GB 13 50 MB IDE Devices c VMware Virtual IDE CDROM Drive sito 0 00 KB 0 00 KB SCSI Devices VMware VMware Virtual S Direct Access ymnets 0 00 KB 0 00 KB vmneti 0 00 KB 0 00 KB Uptime 2 days 2 hours 22 minutes Current Users 2 6005 78 Memory Usage Type Percent Capacity Free Used Size Physical Memory ee 92 20 27 MB 229 71 MB 249 98 MB Kernel applications II c 165 23 MB Buffers 11 1 50 MB Cached nn 25 62 68 MB Disk Swap 1 0 0 00 KB Mounted Files Partition Percent Capacity Free Used Size dev sdal II 707 1 91 GB 5 47 GB 7 77 GB varrun 10 124 79 MB 208 00 KB 124 99 MB warlock 10 124 99 MB 0 00 KB 124 99 MB udev 10 9 95 MB 48 00
197. ystem for example the plug ins Off course a programmer is needed to create the plug ins but it shouldn t be necessary for that programmer to know the entire system A small manual on the plug in writing and an example should be more than enough So we have to provide easy anchors in the complex classes for the plug in writers The interface should be as keen as possible but very strong and capable of altering a lot The complexity of the classes makes the full altering of the data through an interface possible Not only plug ins should be able to be created but also different templates for invoice lay outs This way an invoice can be printed in many styles default company custom To even enhance the possibilities the templates are filled with anchors This means a company with logo can easily use the template of another company because the anchor field for the logo will be replaced Off course if fixed image tags are used instead of anchors it s better to keep the template for the specific company The user management should be effective as well There are only two types of users so this isn t difficult On one hand you have the viewers who can create check and alter invoices and alter their own profile On the other hand you have the administrators who can change settings for the site do user management etc On top of these two types the username and password identifies the user An user can also change his username so he can easily
198. ze these XML files because Ganglia also comes with a web interface This web interface is PHP based so it needs an webserver to run on Next to that RRDTools is used for the data storage and the creation of images The installation of Ganglia is at first quite difficult on systems you don t know yet and if you re fairly new to Linux but we re going to provide the full steps to install Ganglia successfully on the stick so everything will be pretty straight forward More information about Ganglia can be found at http ganglia sourceforge net cpu_nice cpu_system 1 0 1000 m se oe 13 20 13 40 14 00 13 20 13 40 14 00 Bl HAC C2N1 ciscolab stadia fi last hour now 0 00 Bl HAC C2N1 ciscolab stadia fi last hour now 0 00 cpu user cpu wio i 2 0 1 0 0 0 0 0 ha gt i 13 20 13 40 14 00 13 20 13 40 14 00 B HAC C2N1 ciscolab stadia fi last hour now 0 00 BI HAC C2N1 ciscolab stadia fi last hour now 0 00 disk free load fifteen 60 60 m 3 40 m BA NENNEN 50 o l 13 20 13 40 14 00 13 20 13 40 14 00 Bl HAC C2N1 ciscolab stadia fi last hour now 0 00 Bl HAC C2N1 ciscolab stadia fi last hour now 0 00 About PHPSysInfo PHPSysInfo is a PHP script that displays information about the host being accessed It will displays things like Uptime CPU Memory SCSI IDE PCI Ethernet Floppy and Video Information This information can be displayed in multiple languages and in different lay outs PHPS
Download Pdf Manuals
Related Search
Related Contents
HDMI Matrix Switcher with 2x2 Videowall function Eizo MX270W-BK Operating Instructions - Quick Reference (Copying): Athena Husqvarna 1010000-01 User's Manual "VUIPSJTFE %JTUSJCVUPST JVC AV 30W476 User's Manual N° 60/1 optional - Axor Industries Philips Walita Blender RI2030/21 Copyright © All rights reserved.
Failed to retrieve file