Переглянути джерело

Fixed some errors in the setup file. Also updated the installer to include necessary php libs

Patrick Falls 12 роки тому
батько
коміт
88d0bbe846

+ 3 - 2
installer.py

@@ -22,7 +22,7 @@ class Installer:
     #######################################
     self.__run_command("sudo apt-get update", True)
     self.__run_command("sudo apt-get upgrade", True)    
-    self.__run_command("sudo apt-get install build-essential libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev python-software-properties unzip git-core libcurl4-openssl-dev libbz2-dev libmysqlclient-dev mongodb-clients libreadline6-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev libgdbm-dev ncurses-dev automake libffi-dev htop libtool bison libevent-dev libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 liborc-0.4-0 libwxbase2.8-0 libwxgtk2.8-0 libgnutls-dev libjson0-dev libmcrypt-dev", True)
+    self.__run_command("sudo apt-get install build-essential libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev python-software-properties unzip git-core libcurl4-openssl-dev libbz2-dev libmysqlclient-dev mongodb-clients libreadline6-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev libgdbm-dev ncurses-dev automake libffi-dev htop libtool bison libevent-dev libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 liborc-0.4-0 libwxbase2.8-0 libwxgtk2.8-0 libgnutls-dev libjson0-dev libmcrypt-dev libicu-dev", True)
 
     self.__run_command("cp ../config/benchmark_profile ../../.bash_profile")
     self.__run_command("sudo sh -c \"echo '*               soft    nofile          8192' >> /etc/security/limits.conf\"")
@@ -95,7 +95,7 @@ class Installer:
 
     self.__run_command("wget --trust-server-names http://www.php.net/get/php-5.4.13.tar.gz/from/us1.php.net/mirror")
     self.__run_command("tar xvf php-5.4.13.tar.gz")
-    self.__run_command("./configure --with-pdo-mysql --with-mysql --with-mcrypt --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data", cwd="php-5.4.13")
+    self.__run_command("./configure --with-pdo-mysql --with-mysql --with-mcrypt --enable-intl --enable-mbstring --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data", cwd="php-5.4.13")
     self.__run_command("make", cwd="php-5.4.13")
     self.__run_command("sudo make install", cwd="php-5.4.13")
     self.__run_command("printf \"\\n\" | sudo pecl install apc-beta", cwd="php-5.4.13")
@@ -381,3 +381,4 @@ class Installer:
   ############################################################
   # End __init__
   ############################################################
+

+ 2 - 2
php-micromvc/benchmark_config

@@ -7,7 +7,7 @@
       "db_url": "/db",
       "query_url": "/db?queries=",
       "port": 8080,
-      "sort": 63
+      "sort": 70
     }
   }]
-}
+}

+ 2 - 2
php-micromvc/deploy/nginx.conf

@@ -59,7 +59,7 @@ http {
         #    proxy_pass   http://127.0.0.1;
         #}
 
-        root /home/ubuntu/FrameworkBenchmarks/php-micromvc/public/;
+        root /home/ubuntu/FrameworkBenchmarks/php-micromvc/Public/;
         index  index.php;
 
         location / {
@@ -122,4 +122,4 @@ http {
     #    }
     #}
 
-}
+}

+ 2 - 2
php-micromvc/setup.py

@@ -6,7 +6,7 @@ from os.path import expanduser
 home = expanduser("~")
 
 def start(args):
-  setup_util.replace_text("php-micromvc/config/Config.php", "localhost", ""+ args.database_host +"")
+  setup_util.replace_text("php-micromvc/Config/Config.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-micromvc/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
   try:
@@ -23,4 +23,4 @@ def stop():
     subprocess.check_call("sudo chown -R $USER:$USER php-micromvc", shell=True)
     return 0
   except subprocess.CalledProcessError:
-    return 1
+    return 1