1.安装插件之前使用如下命令查询
sudo apt-cache search php5
2.安装libmcrypt加密库
sudo apt-get install php5-mcrypt libmcrypt4 libmcrypt-dev
sudo apt-get install php5-mcrypt php5-dev
sudo ln -s /etc/php5/fpm/conf.d/20-mcrypt.ini /etc/php5/mods-available/ 看这个自己的路径来 和网上有区别
sudo php5enmod mcrypt
sudo /etc/init.d/php5-fpm restart
sudo /etc/init.d/nginx restart
2.安装curl
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
sudo ln -s /etc/php5/fpm/conf.d/20-curl.ini /etc/php5/mods-available/
sudo php5enmod curl
sudo /etc/init.d/php5-fpm restart
sudo /etc/init.d/nginx restart
2.1.以上安装不用在php.ini里添加扩展路径
3.如果添加不成功执行如下命令更新
sudo apt-get update