Reputation: 1172
I need to install PEAR on a server which does not have outsite access to the net. There is no go-pear.bat in the php folder and even if it had go-pear.bat i think it needs access to the net.
I looked an the Installing PEAR from a local copy from the PEAR website. But it needs PEAR to be already installed for it to work.
So do any of you guys know how to install PEAR without access to internet?
Upvotes: 1
Views: 1955
Reputation: 2936
I wrote an article on this very subject:
http://christian.roy.name/blog/install-pear-without-network-no-internet-accessoffline
It will allow you to use the pear command as well.
mkdir pear-temp
cd pear-temp
cp /mnt/usb/*.tgz ./
mkdir lib
tar x -C lib -zf PEAR-*.tgz
tar x -C lib -zf Console_Getopt-*.tgz
tar x -C lib -zf Archive_Tar-*.tgz
tar x -C lib -zf Structures_Graph-*.tgz
function join() {
local IFS=$1
shift
echo "$*"
}
PHPOPT="-d output_buffering=1 -d include_path=.:$(join ':' lib/*)"
php $PHPOPT lib/PEAR-*/scripts/pearcmd.php config-create $HOME/ $HOME/.pearrc
php $PHPOPT lib/PEAR-*/scripts/pearcmd.php install -o -O *.tgz
cd ..
rm -Rf pear-temp
PATH="$PATH:$HOME/pear"
Upvotes: 1
Reputation: 78528
You don't need PEAR installed on the webhost, just on your local machine. The two main approches are
pear install -R/my/root_dir -a PEAR
. This will install the PEAR
package and all dependencies to the specified root directory. Copy this installation to your webhost.I think it's possible to use pear to manage an installation via FTP also. I never tried.
You should also have a look at "pear help" and "pear help install".
Upvotes: 2
Reputation: 83244
There is a way to do this if you are on Windows and have the PHP installer.
You can select, during the PHP installation time, the PEAR option under extension menu when selecting the components for PHP installation in order to install PEAR package.
If you already have PHP installed, you just have to click on the installer to choose "modify", and choose the correct option.
http://lh4.ggpht.com/_SDci0Pf3tzU/SgBXLClDWEI/AAAAAAAAEuI/TgnBA_SEHFs/s400/pear%20install.jpg
Upvotes: 1