ubuntu 下安装 phpbrew

访问量: 1550

refer to:  https://github.com/phpbrew/phpbrew

1. $ sudo apt-get update

2. 运行下面的命令:

apt-get build-dep php5
apt-get install -y php5 php5-dev php-pear autoconf automake curl build-essential libxslt1-dev re2c libxml2 libxml2-dev php5-cli bison libbz2-dev libreadline-dev
apt-get install -y libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev libjpeg-dev libjpeg8-dev libjpeg8  libgd-dev libgd3 libxpm4 libltdl7 libltdl-dev
apt-get install -y libssl-dev openssl
apt-get install -y gettext libgettextpo-dev libgettextpo0
apt-get install -y libicu-dev
apt-get install -y libmhash-dev libmhash2
apt-get install -y libmcrypt-dev libmcrypt4

3. 安装: 

curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
sudo mv phpbrew /usr/bin/phpbrew

phpbrew init

4. 向 ~/.bashrc 的末尾增加:

export PHPBREW_SET_PROMPT=1

source /root/.phpbrew/bashrc

5. 使用:

$ phpbrew known  # 列出所有的版本

$ phpbrew install php-5.4.38 +default +mysql +gettext +mcrypt +intl +iconv +ftp +curl +hash +zlib +gd +openssl +soap +apxs2=/usr/bin/apxs2 -- --with-libdir=lib/x86_64-linux-gnu --with-gd=shared --enable-gd-native-tff --with-jpeg-dir=/usr --with-png-dir=/usr --enable-wddx --with-mysql-sock=/var/run/mysqld/mysqld.sock
$ phpbrew install 5.4.1
$ phpbrew use 5.4.1  # 使用
$ phpbrew list # 列出安装的版本

订阅/RSS Feed

Subscribe

分类/category