On Web tier by yaofenji

VIEWS: 10 PAGES: 3

									Rubis                                                                    http://libvm.springnote.com/pages/5059899?print=1




         Rubis



         1. Server

         1) APM install         3R ;IF XMIV
         apt-get install apache2 mysql-server mysql-client libapache2-mod-auth-mysql php5-common php5 libapache2-

         mod-php5 php5-mysql

         /etc/init.d/apache2 restart



         2) Mysql setup        3R (& XMIV
         # Initial work

         killall mysqld

         mysqld_safe --skip-grant-tables &

         mysql -u root mysql

         update user set password=password('mysql') where user='root';

         flush privileges;

         quit

         killall mysqld

         /etc/init.d/mysql start



         # setup rubis

         cd database         3R (& XMIV
         mysql -u root --password='mysql'

         mysql> source rubis.sql;

         mysql> source categories.sql;

         mysql> source regions.sql;

         mysql> GRANT ALL ON rubis.* TO 'rubis'@'%' IDENTIFIED BY 'rubis';              ;IF XMIV LSWX -4

         mysql> GRANT ALL ON rubis.* TO 'rubis'@'localhost' IDENTIFIED BY 'rubis';
         +6%28 %00 46-:-0)+)7 32 VYFMW             83 VSSX$                          -()28-*-)( &= VYFMW ;-8, +6%28 348-32
         quit

         Exchange /bin/awk to /usr/bin/awk in generate_categories.awk generate_regions.awk

         ./generate_categories.awk ebay_full_categories.txt

         ./generate_regions.awk ebay_regions.txt



         # mysql server setting




1 of 3                                                                                   Wednesday 20 October 2010 11:41 PM
Rubis                                                                       http://libvm.springnote.com/pages/5059899?print=1


         Comment bind-address in /etc/mysql/my.cnf like #bind-address          = 127.0.0.1
         %PWS EHH GLERKI QE\CGSRRIGXMSRW !                    MR IXG Q]WUP Q] GRJ
         /etc/init.d/mysql restart



         3) PHP setting
                                 3R ;IF XMIV
         cp -a PHP /var/www

         Edit getDatabaseLink() in PHP/PHPprinter.php

          $link = mysql_pconnect("localhost", "rubis", "rubis") or die ("ERROR: Could not connect to database");
                                (& LSWX -4 VSSX


         2. Client

         1) Java Installation

         apt-get install sun-java6-jdk

         Add to /etc/environments

                 CLASSPATH=.:/usr/lib/jvm/java-6-sun/lib

                 JAVA_HOME=/usr/lib/jvm/java-6-sun

         Add to the first line of /etc/jvm

                 /usr/lib/jvm/java-6-sun

         update-java-alternatives -s java-6-sun



         2) Build Client

         make Client



         Client의 rubis.properties 파일 수정 필요함

         rubis.properties 여기서 ##을 찾아서 수정할것
         6IJIV VYFMW TVSTIVXMIW THJ -X WLSYPH KS EW 69&M7 'PMIRX VYFMW TVSTIVXMIW

         3) Init DB

         make initDB PARAM=all



         4) Run emulator

         - Before starting emulation, make sure that you can login to ssh automatically to server and client.

         ssh-keygen -t rsa

         cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

         scp ~/.ssh/id_rsa.pub <server host>:~/.ssh/

         Connect to server

         cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys




2 of 3                                                                                       Wednesday 20 October 2010 11:41 PM
Rubis                                                                        http://libvm.springnote.com/pages/5059899?print=1


         - Also before emulation, make sure all .awk files in bench directory should be fixed from /bin/awk to /usr/bin/awk

         Edit bench/*.awk files via vi -o bench/*.awk



         - Finally before emulation, make sure sysstat, which include sar, is installed. But, parsing program depends on

         sar's version.

         - sar 8.0.3 version is safe, but 8.1.7 is not parsed.



         # Start emulation

         make emulator                  # After then, you can check bench directory for the result



         # If you want to change workloads

         Edit Client rubis.properties

         workload_transition_table = /root/RUBiS/workload/transitions.txt




3 of 3                                                                                      Wednesday 20 October 2010 11:41 PM

								
To top