Skip to content

Instantly share code, notes, and snippets.

@simkimsia
Created March 11, 2013 11:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simkimsia/5133631 to your computer and use it in GitHub Desktop.
Save simkimsia/5133631 to your computer and use it in GitHub Desktop.
install Phing_d51PearPkg2Task for phing commands
#!/bin/bash
###
#
# Ubuntu 12.10 based web server installation script for Phing_d51PearPkg2Task
# because the pear.domain51.com channel is down
# Run this by executing the following from a fresh install of Ubuntu 12.10 server:
#
# bash -c "$(curl -fsSL https://raw.github.com/gist/4372049)"
#
# Also, run this as root, unless you enjoy failing.
#
# Its handy to install 'screen' if you want to ensure your remote connection to
# a server doesn't disrupt the installation process. If you want to do this, just
# do the following before running the main bash command:
#
# apt-get install screen -y
# screen
#
# To recover your session if you are disconnected, ssh to your server as root again,
# and type:
#
# screen -x
#
# Dependencies:
# - curl
#
# Todo:
# - SSL Configuration
#
###
## install unzip
apt-get install unzip
## go get the markstory repo of the package
wget https://github.com/markstory/Phing_d51PearPkg2Task/archive/master.zip
## unzip the zip file
unzip master.zip
## cp the folders and files to the phng tasks/ext
cp Phing_d51PearPkg2Task-master/src/phing/tasks/ext/d51PearPkg2Task /usr/share/php/phing/tasks/ext -r
cp Phing_d51PearPkg2Task-master/src/phing/tasks/ext/d51PearPkg2Task.php /usr/share/php/phing/tasks/ext -r
## now need to set pear config temporarily to beta because some packages are not stable
pear config-set preferred_state beta
apt-get install php-pear
pear channel-update pear.php.net
pear upgrade-all
## pear install PEAR_PackageFileManager2 because it is needed by Phing_d51PearPkg2Task
pear install PEAR_PackageFileManager2
## reset config back to stable
pear config-set preferred_state stable
## remove the zip file and the unzipped version
rm master.zip
rm Phing_d51PearPkg2Task-master/ -Rf
@marado
Copy link

marado commented Apr 29, 2014

FYI, there's a package available at http://pear.cakephp.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment