linux安装php5.4.33

首先下载5.4.33

wget http://museum.php.net/php5/php-5.4.33.tar.gz
然后解压

tar zxvf php-5.4.33.tar.gz
然后进入php-5.4.33文件夹中

./configure --prefix=/home/homework/php --with-config-file-path=/home/homework/php/etc --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-opcache --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gettext --enable-mbstring --with-iconv --with-mcrypt --with-mhash --with-openssl --enable-bcmath --enable-soap --with-libxml-dir --enable-pcntl --enable-shmop --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-sockets --with-curl --with-zlib --enable-zip --with-bz2 --with-readline
然后make

然后make install

然后编辑~/.bash_profile

PATH=$PATH:$HOME/bin:/home/homework/php/bin

然后source ~/.bash_profile

然后 php -v查看安装结果

如果想卸载,就用make clean

你可能感兴趣的:(小菜鸡历险记)