如何安装？

0.1 安装依赖插件

0.2 安装最新版PHP5

因为后文会使用PHP来测试客户端与Golang服务端的交互

#先添加phpkey
root@m2:/home/hadoop/thrift-git# add-apt-repository ppa:ondrej/php5
You are about to add the following PPA to your system:
This branch follows latest PHP packages as maintained by me &amp; rest of the Debian pkg-php team.
You can get more information about the packages at https://sury.org
If you need to stay with PHP 5.4 you can use the oldstable PHP repository:
ppa:ondrej/php5-oldstable
BUGS&amp;FEATURES: This PPA now has a issue tracker: https://deb.sury.org/pages/bugreporting.html
PLEASE READ: If you like my work and want to give me a little motivation, please consider donating: https://deb.sury.org/pages/donate.html
More info: https://launchpad.net/~ondrej/+archive/ubuntu/php5
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: 钥匙环‘/tmp/tmpZ7PZIy/secring.gpg’已建立
gpg: 钥匙环‘/tmp/tmpZ7PZIy/pubring.gpg’已建立
gpg: 下载密钥‘E5267A6C’，从 hkp 服务器 keyserver.ubuntu.com
gpg: /tmp/tmpZ7PZIy/trustdb.gpg：建立了信任度数据库
gpg: 密钥 E5267A6C：公钥“Launchpad PPA for Ondřej Surý”已导入
gpg: 合计被处理的数量：1
gpg: 已导入：1 (RSA: 1)
OK
root@m2:/home/hadoop/thrift-git# apt-get update
root@m1:/home/hadoop/thrift-git# apt-get install php5-dev php5-cli phpunit