cvs: peardoc /en/chapters installation.xml
| From: | Greg Beaver | Date: | Tue, 16 Dec 2003 03:20:20 +0000 |
| Subject: | cvs: peardoc /en/chapters installation.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-2049@lists.php.net to get a copy of this message | ||
cellog Mon Dec 15 22:20:20 2003 EDT
Modified files:
/peardoc/en/chapters installation.xml
Log:
add new section on how to install a local PEAR copy on a shared host
correct spelling of prerequisite
Index: peardoc/en/chapters/installation.xml
diff -u peardoc/en/chapters/installation.xml:1.12 peardoc/en/chapters/installation.xml:1.13
--- peardoc/en/chapters/installation.xml:1.12 Sun Oct 19 12:12:16 2003
+++ peardoc/en/chapters/installation.xml Mon Dec 15 22:20:20 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<!--
WORK IN PROGRESS, THERE IS PROBABLY LITTLE POINT IN TRANSLATING
THIS DOCUMENT YET.
@@ -128,7 +128,7 @@
<titleabbrev>CLI installer</titleabbrev>
<para>
<warning id="installation.web.prerequesite">
- <title>Prerequesites</title>
+ <title>Prerequisites</title>
<para>
The following description requires the latest version of the
<link linkend="installation.getting">PEAR package manager</link>
@@ -199,6 +199,103 @@
</sect2>
</sect1>
+ <sect1 id="installation.shared">
+ <title>Installation of a local PEAR copy on a shared host</title>
+
+ <para>
+ Many users have a shared provider that grants access to a system-wide PEAR installation.
+ However, in many cases, it is advantageous to have a local copy of PEAR that can be used
+ for packages that are not installed by the host provider. There are ways of installing
+ PEAR both for users with a telnet/ssh shell access and users who only have ftp access.
+ </para>
+ <sect2 id="installation.shared.shell">
+ <title>Installing a local copy of PEAR through telnet</title>
+ <para>
+ To install PEAR through telnet, you can use this command sequence to set up a local copy of
PEAR:
+ </para>
+ <para>
+ <screen>
+ <userinput>
+$ pear -s -c ~/.pearrc -d doc_dir=~/pear/docs -d ext_dir=~/pear/ext -d
php_dir=~/pear/lib -d data_dir=~/pear/data -d test_dir=~/pear/tests -d cache_dir=~/pear/cache -d
bin_dir=~/pear/bin
+ </userinput>
+ </screen>
+ </para>
+ <para>
+ This will create a local configuration file in a file in your home directory named
<filename>.pearrc</filename>.
+ In addition, it will create a directory structure based on a subdirectory of your home
directory
+ named <filename>pear</filename> that contains all of the packages that you
install.
+ </para>
+ <para>
+ Then, if you add ~/pear/bin to your path as the first entry in .bashrc
+ (or whatever your startup file is), and run the command:
+ </para>
+ <para>
+ <screen>
+ <userinput>
+$ pear -c ~/.pearrc install Archive_Tar PEAR Console_Getopt XML_RPC
+ </userinput>
+ </screen>
+ </para>
+ <para>
+ You will have a local version of PEAR that supersedes the system's copy. To use the
files you have installed,
+ you should set your PHP include_path in either the code that uses your PEAR packages like so:
+ </para>
+ <para>
+ <programlisting role="php">
+<![CDATA[
+<?php
+ini_set('include_path', '~/pear/lib' . PATH_SEPARATOR .
ini_get('include_path'));
+?>
+]]>
+ </programlisting>
+ </para>
+ <para>
+ Or, in an .htaccess file for apache using php_value.
+ </para>
+ </sect2>
+ <sect2 id="installation.shared.ftp">
+ <title>Installing a local copy of PEAR through ftp</title>
+ <para>
+ In order to install a local copy of PEAR through ftp, you must have an ftp client that can set
permissions
+ on upload. First, create a directory that is NOT in your publicly accessible web space, and
name it
+ anything you'd like. Set it to be readable and writable by any user (permissions 0777).
Then, download
+ a copy of http://go-pear.org and save it as go-pear.php.
Upload go-pear.php to a subdirectory of your
+ publicly accessible web space. It is a very good idea to password-protect the directory
containing
+ go-pear.php with an .htaccess file.
+ </para>
+ <para>
+ Next, browse to the go-pear.php file. If your web address is http://www.example.com, you have placed
+ go-pear.php in public_html/install/go-pear.php, and http://www.example.com will browse to public_html/,
+ then browse to http://www.example.com/install/go-pear.php.
Follow the installation prompts. When asked
+ where to install PEAR, choose the directory you created to be readable and writable by any
user. You will
+ need to know the location of the cli version of PHP. To find this, browse to this script and
copy the output:
+ </para>
+ <para>
+ <programlisting role="php">
+<![CDATA[
+<?php
+echo
which php;
+// if this does not work, also try echo PHP_BIN;
+?>
+]]>
+ </programlisting>
+ </para>
+ <para>
+ After PEAR has been installed, you can use the web installer to install and upgrade packages
just as you would
+ with any other PEAR installation. To use the files, you must set the include path in scripts
on the website.
+ </para>
+ <para>
+ <programlisting role="php">
+<![CDATA[
+<?php
+ini_set('include_path', '~/pear/lib' . PATH_SEPARATOR .
ini_get('include_path'));
+?>
+]]>
+ </programlisting>
+ </para>
+ </sect2>
+ </sect1>
+
<sect1 id="installation.manually">
<title>Manual installation</title>