sudo vim /etc/apt/source.list # 将软件源改为 sohu 的 deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
apt-get update apt-get upgrade apt-get install libcurl3-dbg curl libpcre3 libpcre3-dev libcurl4-openssl-dev libyaml-dev
apt-get install nginx mysql-server redis-server git subversion
apt-get install php5 # 中途出现 apache 相关的警告和错误,说明系统默认安装了 Apache,卸载之 apt-get remove apache2 apt-get autoremove # 安装核心扩展 apt-get install php5-dev php5-cgi php5-cli php5-fpm php5-common php5-mysql php5-curl php5-dbg php5-json php5-gd php5-mcrypt php5-redis
curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer
pecl install yaml pecl install yaf pecl isntall yar
# 下载的源码放在 /source 目录下 git clone --depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install
配置
sudo vim /etc/php5/mods-available/private.ini extension=yaml.so extension=yaf.so extension=yar.so extension=phalcon.so extension=swoole.so ln -s /etc/php5/mods-available/private.ini /etc/php5/fpm/conf.d/30-private.ini ln -s /etc/php5/mods-available/private.ini /etc/php5/cli/conf.d/30-private.ini ln -s /etc/php5/mods-available/private.ini /etc/php5/cgi/conf.d/30-private.ini