#! /Usr/bin/ENV bash
Sed-I "s/US \./CN \./g"/etc/APT/sources. List
Apt-Get update
# Install nginx
Apt-get-y install nginx
If ["$? "! = "0"]; then
Echo "error! Nginx is not installed correctly"
Exit 1;
Fi
# Install PHP
Apt-get-y install PhP5
If ["$? "! = "0"]; then
Echo "error! PHP is not installed correctly"
Exit 2;
Fi
# Install PECL
Apt-get-y install PHP-Pear
If ["$? "! = "0"]; then
Echo "error! PECL is not installed correctly"
Exit 3;
Fi
# Install the Mongo Extension
Apt-get-y install make
PECL install mongo-1.3.4
If ["$? "! = "0"]; then
Echo "error! Mongo is not installed correctly"
Exit 4;
Fi
Echo "extension = Mongo. So">/etc/PhP5/CONF. d/Mongo. ini
# Install Yar Extension
Apt-get-y install libcurl4-openssl-dev
PECL install yar-1.2.3
If ["$? "! = "0"]; then
Echo "error! Yar is not installed correctly"
Exit 5;
Fi
Echo "extension = yar. So">/etc/PhP5/CONF. d/yar. ini
# Install yaf Extension
Apt-get-y install libpcre3-dev
PECL install yaf-2.2.9
If ["$? "! = "0"]; then
Echo "error! Yar is not installed correctly"
Exit 6;
Fi
Echo "extension = yaf. So">/etc/PhP5/CONF. d/yaf. ini
# Install xhprof Extension
PECL install xhprof-0.9.4
If ["$? "! = "0"]; then
Echo "error! Xhprof is not installed correctly"
Exit 7;
Fi
Echo "extension = xhprof. So">/etc/PhP5/CONF. d/xhprof. ini
# Install msgpack Extension
PECL install msgpack-0.5.5
If ["$? "! = "0"]; then
Echo "error! Msgpack is not installed correctly"
Exit 8;
Fi
Echo "extension = msgpack. So">/etc/PhP5/CONF. d/msgpack. ini
# Install the gearman Extension
Apt-get-y install libgearman-Dev
PECL install gearman-1.1.0
If ["$? "! = "0"]; then
Echo "error! Gearman is not installed correctly"
Exit 9;
Fi
Echo "extension = gearman. So">/etc/PhP5/CONF. d/gearman. ini
# Install APC Extension
PECL install APC-3.1.6
If ["$? "! = "0"]; then
Echo "error! APC is not installed correctly"
Exit 10;
Fi
Echo "extension = APC. So">/etc/PhP5/CONF. d/APC. ini
# Install the rabbitmq Server
CD/tmp
Wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
Apt-key add rabbitmq-signing-key-public.asc
Echo "Deb http://www.rabbitmq.com/debian/ Testing main">/etc/APT/sources. List. d/rabbitmq. List
Apt-Get update
Apt-get-y install rabbitmq-Server
Rm/tmp/rabbitmq-signing-key-public.asc
# Installing the rabbitmq Client
Apt-get-y install librabbitmq-dev git bzr
If [$? ! = "0"]; then
Echo "error! Rabbitmq is not installed correctly ."
Exit 11;
Fi
CD/tmp
Git clone git: // github.com/alanxz/rabbitmq-c.git
CD rabbitmq-C
Git submodule init
Git submodule update
Autoreconf-I &./configure & make install
Rm-RF/tmp/rabbitmq-C
# Install amqp extension in PECL
PECL install amqp-1.2.0
If [$? ! = "0"]; then
Echo "error, amqp is not installed correctly! "
Exit 12;
Fi
Echo "extension = amqp. So">/etc/PhP5/CONF. d/amqp. ini
This article from the "Han Jiang fishing" blog, please be sure to keep this source http://iter2012.blog.51cto.com/6873825/1550283
PECL install amqp Mongo imagick gearman Yar yaf APC Extension