示例#1
0
function fb21_init()
{
    //http://www.slideshare.net/mindthebird/firebird-on-linux
    //http://www.ibphoenix.com/resources/documents/search/doc_26
    $fb_ver = "2.1";
    $classic = "";
    //   exec_script("sudo add-apt-repository ppa:mapopa
    //            sudo apt-get update");
    exec_script("\n                sudo apt-get update\n                sudo apt-get -f -y install\n\t\tsudo sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_probes=3 net.ipv4.tcp_keepalive_intvl=10\n\t\tsudo apt-get -y -q install firebird{$fb_ver}-super{$classic} subversion git-core\n                sudo dpkg-reconfigure firebird2.1-super\n\t\t");
    time_zone();
    //	exec("sudo fdisk /dev/sdc << EOF\nn\np\n1\n\n\nw\nEOF");
    ////        exec_script("sudo mkfs -t ext3 /dev/sdc1
    //
    //         if (is_file("/dev/sdc1")){
    //           exec_script("
    //                sudo sed '/sdc/d' /etc/fstab > /tmp/fstab.tmp; sudo mv /tmp/fstab.tmp /etc/fstab
    //                echo '/dev/sdc1 /home/cloud-db ext3 defaults 0 0' | sudo tee -a /etc/fstab");
    //         }
    //
    //         if (is_file("/dev/xvda1")){
    //           exec_script("
    //                sudo sed '/xvd/d' /etc/fstab > /tmp/fstab.tmp; sudo mv /tmp/fstab.tmp /etc/fstab
    //                echo '/dev/xvda1 /home/cloud-db ext3 defaults 0 0' | sudo tee -a /etc/fstab");
    //         }
    if (PHP_INT_SIZE == 8) {
        put_template("firebird/tbudf-64x.so", "/usr/lib/firebird/{$fb_ver}/UDF/tbudf.so");
    } else {
        put_template("firebird/tbudf.so", "/usr/lib/firebird/{$fb_ver}/UDF/tbudf.so");
    }
    exec_script("      \n                sudo mkdir /home/cloud-db\n                sudo mount /home/cloud-db\n\t\tsudo chmod 444 /etc/init.d/postfix\t\n\t\tsudo chown firebird.firebird /usr/lib/firebird/{$fb_ver}/UDF/*.so\n                 \n\t");
    //  sudo ln -s /usr/lib/libfbclient.so.2.5.0 /usr/lib/libfbclient.so
    exec_script("\n         sudo ufw allow 3050\n");
    firebird_tunning(true);
    firebird_restart();
}
示例#2
0
function xdebug_init()
{
    put_template("xdebug.ini", "/etc/php5/conf.d/xdebug.ini");
    $diretorioExtensoes = ini_get('extension_dir');
    $xdebugIni = 'zend_extension=' . rtrim($diretorioExtensoes, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'xdebug.so';
    exec_script("\n        sed -i '1i" . $xdebugIni . "' /etc/php5/conf.d/xdebug.ini;\n        cd /tmp; \n        mkdir /tmp/xdebug; \n        cd xdebug;\n        wget -O /tmp/xdebug/xdebug.tar https://github.com/derickr/xdebug/tarball/master;\n        tar --strip-components 1 -xf /tmp/xdebug/xdebug.tar; \n        phpize; \n        ./configure; \n        sudo make; \n        sudo make install;\n        rm -rf /tmp/xdebug;\n        sudo mkdir -p /var/log/xdebug;\n        sudo mkdir -p /var/log/xdebug/profiler/;\n        sudo chmod -R 777 /var/log/xdebug;\n        sudo /etc/init.d/apache2 restart;\n    ");
}
示例#3
0
function cloudini_init($ambiente = "cloud")
{
    if ($ambiente == "cloud") {
        put_template("cloud.ini", "/home/cloud/configs/cloud.ini");
    }
    if ($ambiente == "plataforma") {
        put_template("cloud-apps.ini", "/home/plataforma/library/Application/Configs/cloud.ini");
    }
}
示例#4
0
function phpini_init()
{
    put_template("php-5-4.ini", "/etc/php5/apache2/conf.d/php-5-4.ini");
    apache_restart();
}
示例#5
0
function hhvm_init($maq = "trusty")
{
    exec_script("\ncloud-init cloud default\nwget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -\necho deb http://dl.hhvm.com/ubuntu {$maq} main | sudo tee /etc/apt/sources.list.d/hhvm.list\nsudo apt-get update\nsudo apt-get install hhvm\nsudo update-rc.d hhvm defaults\nsudo /usr/share/hhvm/install_fastcgi.sh\nsudo rm -Rf /var/www/html\nsudo ln -s /home/cloud/public /var/www/html\n");
    put_template("hhvm_proxy_fcgi.conf", "/etc/apache2/mods-available/hhvm_proxy_fcgi.conf");
}
示例#6
0
function eaccelerator_init()
{
    exec_script("\n\tsudo apt-get install make;\n\tcd /tmp; mkdir /tmp/eaccelerator; cd eaccelerator; wget -O /tmp/eaccelerator/eaccelerator.tar https://github.com/eaccelerator/eaccelerator/tarball/master;\n\tcd /tmp/eaccelerator; tar --strip-components 1 -xf /tmp/eaccelerator/eaccelerator.tar; phpize; ./configure; make; make install;\n    rm -rf /tmp/eaccelerator;\n    sudo mkdir -p /var/cache/eaccelerator;\n    sudo chmod -R 777 /var/cache/eaccelerator;\n");
    put_template("eaccelerator.ini", "/etc/php5/conf.d/eaccelerator.ini");
}
示例#7
0
function time_zone()
{
    put_template("timezone", "/etc/timezone");
    exec_script("sudo apt-get -y -q install tz-brasil" . "sudo chmod 444 /etc/init.d/postfix");
}