cvs: peardoc / global.ent /en language-defs.ent /en/chapters installation.xml /en/chapters/installation cli.xml cvs.xml getting.xml
introduction.xml manually.xml pecl.xml shared.xml /en/guide/users commandline.xml installation.xml /en/guide/users/commandline beforeyoubegin.xml
channels.xml commands.xml config.xml cvsinstall.xml installing.xml manualinstallation.xml packageinfo.xml pecl.xml /en/guide/users/installation
cli.xml cvs.xml getting.xml introduction.xml manually.xml pecl.xml
| From: | Christian Weiske | Date: | Fri, 04 Apr 2008 09:05:46 +0000 |
| Subject: | cvs: peardoc / global.ent /en language-defs.ent /en/chapters installation.xml /en/chapters/installation cli.xml cvs.xml getting.xml introduction.xml manually.xml pecl.xml shared.xml /en/guide/users commandline.xml installation.xml /en/guide/users/commandline beforeyoubegin.xml channels.xml commands.xml config.xml cvsinstall.xml installing.xml manualinstallation.xml packageinfo.xml pecl.xml /en/guide/users/installation cli.xml cvs.xml getting.xml introduction.xml manually.xml pecl.xml |
||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-10615@lists.php.net to get a copy of this message | ||
cweiske Fri Apr 4 09:05:46 2008 UTC
Added files:
/peardoc/en/guide/users/commandline beforeyoubegin.xml channels.xml
commands.xml config.xml
cvsinstall.xml installing.xml
manualinstallation.xml
packageinfo.xml pecl.xml
Removed files:
/peardoc/en/chapters installation.xml
/peardoc/en/chapters/installation cli.xml cvs.xml getting.xml
introduction.xml manually.xml
pecl.xml shared.xml
/peardoc/en/guide/users/installation cli.xml cvs.xml manually.xml
pecl.xml
Modified files:
/peardoc global.ent
/peardoc/en language-defs.ent
/peardoc/en/guide/users commandline.xml installation.xml
/peardoc/en/guide/users/installation getting.xml introduction.xml
Log:
Big fat user guide commit:
- Finish user cli guide (channels)
- Split up cli guide into several files
- Remove chapters/installation* since it's in guide/users/installation* now
- transferred sections from installation to cli guide
http://cvs.php.net/viewvc.cgi/peardoc/global.ent?r1=1.98&r2=1.99&diff_format=u Index: peardoc/global.ent diff -u peardoc/global.ent:1.98 peardoc/global.ent:1.99 --- peardoc/global.ent:1.98 Sun Mar 23 18:21:16 2008 +++ peardoc/global.ent Fri Apr 4 09:05:45 2008 @@ -1,6 +1,6 @@ <!-- -*- SGML -*- - $Id: global.ent,v 1.98 2008/03/23 18:21:16 amir Exp $ + $Id: global.ent,v 1.99 2008/04/04 09:05:45 cweiske Exp $ Contains global "macros" for all the XML documents. @@ -112,8 +112,9 @@ <!ENTITY url.php.anoncvs 'http://www.php.net/anoncvs.php'> <!ENTITY url.php.callback 'http://www.php.net/manual/language.pseudo-types.php'> <!ENTITY url.php.manual 'http://www.php.net/manual/'> -<!ENTITY url.php.manual.howto 'http://www.php.net/dochowto'> <!ENTITY url.php.manual.about 'http://www.php.net/manual/about.php'> +<!ENTITY url.php.manual.howto 'http://www.php.net/dochowto'> +<!ENTITY url.php.manual.peclinstall 'http://www.php.net/manual/en/install.pecl.php'> <!ENTITY url.php.mailinglists 'http://www.php.net/mailing-lists.php'> <!ENTITY url.php.cvs 'http://cvs.php.net/'> <!ENTITY url.php.cvs.pear 'http://cvs.php.net/pear/'> http://cvs.php.net/viewvc.cgi/peardoc/en/language-defs.ent?r1=1.6&r2=1.7&diff_format=u Index: peardoc/en/language-defs.ent diff -u peardoc/en/language-defs.ent:1.6 peardoc/en/language-defs.ent:1.7 --- peardoc/en/language-defs.ent:1.6 Mon Mar 31 15:24:31 2008 +++ peardoc/en/language-defs.ent Fri Apr 4 09:05:45 2008 @@ -1,9 +1,10 @@ -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!ENTITY PEARManual "PEAR Manual"> <!ENTITY Translatedby "Translated by"> <!ENTITY Date "Date:"> <!ENTITY AboutPEAR "About PEAR"> +<!ENTITY UsersGuide "User guide"> <!ENTITY DevelopersGuide "Developer Guide"> <!ENTITY UsersGuide "User Guide"> <!ENTITY NewMaintainersGuide "New Maintainers' Guide"> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/guide/users/commandline.xml diff -u peardoc/en/guide/users/commandline.xml:1.3 peardoc/en/guide/users/commandline.xml:1.4 --- peardoc/en/guide/users/commandline.xml:1.3 Thu Apr 3 14:25:14 2008 +++ peardoc/en/guide/users/commandline.xml Fri Apr 4 09:05:46 2008 @@ -1,379 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- $Revision: 1.3 $ --> -<chapter id="cli"> +<!-- $Revision: 1.4 $ --> +<chapter id="guide.users.commandline.cli"> <title>Command line installer</title> - <sect1 id="beforeyoubegin"> - <title>Before you begin</title> + <warning> + <title>Prerequisites</title> - <para>Always remember that PEAR has a help command:</para> + <para>The following description requires the latest version of the <link + linkend="installation.getting">PEAR package manager</link> to be + installed.</para> + </warning> + + <para> + This chapter shows you how to use the PEAR command line installer. + </para> + + &guide.users.commandline.beforeyoubegin; + &guide.users.commandline.config; + &guide.users.commandline.installing; + &guide.users.commandline.packageinfo; + &guide.users.commandline.channels; + &guide.users.commandline.commands; + &guide.users.commandline.manualinstallation; + &guide.users.commandline.cvsinstall; + &guide.users.commandline.pecl; - <screen>$ pear help -.. list of commands follows .. </screen> - - <note> - <para>Command examples will have a dollar sign $ before each line that - is typed. This helps to distinguish input from the output of the PEAR - installer.</para> - </note> - - <para>Help for a command is just as easy to get:</para> - - <screen>$ pear help <command> -$ pear help install -.. help for install follows ..</screen> - - <sect2> - <title>Configuring your PEAR setup</title> - - <para>PEAR has a number of configuration options that you can change. - Getting an overview about them is as easy as issuing a</para> - - <screen>$ pear config-show</screen> - - <para>The default settings suffice for novice users, there is rarely a - need to change them when getting started.</para> - - <para>Reading single values is accomplished by using - <literal>config-get</literal>. The following command will show you where - all the .php files of your installed pear packages reside.</para> - - <screen>$ pear config-get php_dir -/usr/share/pear</screen> - - <para>Changing a value is as easy as retrieving it:</para> - - <screen>$ pear config-set preferred_state beta -config-set succeeded</screen> - </sect2> - </sect1> - - <sect1 id="installing"> - <title>Installing packages</title> - - <para>After getting PEAR working on your machine (see <link - linkend="installation">Installation</link>) you most likely - want to install some packages. This guide shows people new to the PEAR - command line installer how to get started.</para> - - <sect2> - <title>Normal installation procedure</title> - - <para>The general command to install a PEAR package named "foo" - is</para> - - <screen>$ pear install foo</screen> - - <para>Typing this and pressing return, the package will be downloaded - and installed on your computer. It does not matter if you write the - package name in lowercase, UPPERCASE or MixedCase - the installer will - find the package by lowercasing the name.</para> - - <para>When a package is already installed, you will get the following - message:</para> - - <screen>$ pear install foo -Ignoring installed package pear/foo -Nothing to install</screen> - - <para>This happens even if there is a newer version of the package! The - correct command to update to the lastest version is</para> - - <screen>$ pear update foo -upgrade ok: channel://pear.php.net/Foo-1.2.3</screen> - - <para>If the package already has the lastest version, you will get a - message similar to the following:</para> - - <screen>Ignoring installed package pear/Foo -Nothing to upgrade</screen> - - <para>In the case you deleted some file and really really want to - re-install the package, you have two choices:</para> - - <itemizedlist> - <listitem> - <para>Uninstall the package, and reinstall it afterwards</para> - </listitem> - - <listitem> - <para>Force the installation</para> - </listitem> - </itemizedlist> - - <para>Forcing an command should only be done when you absolutely know - what you are doing - you might in some circumstances break PEAR - otherwise. Forcing something should always be the last option.</para> - - <screen>$ pear install -f foo -$ pear upgrade -f foo</screen> - </sect2> - - <sect2> - <title>Unstable alpha/beta packages</title> - - <para>Now and then, you will get error messages like</para> - - <screen>Failed to download pear/foo within preferred state "stable", - latest release is version 0.1.2, stability "beta", - use "channel://pear.php.net/foo-0.1.2" to install -Cannot initialize 'channel://pear.php.net/foo', invalid or missing package file -Package "channel://pear.php.net/foo" is not valid -install failed</screen> - - <para>Reason for this is that PEAR by default installs stable packages - only. When a package is in state <emphasis>devel</emphasis>, - <emphasis>alpha</emphasis> or <emphasis>beta</emphasis> it will refuse - to install them. You can easily persuade it by adding either the version - number or the stability you are willing to accept:</para> - - <screen>$ pear install Foo-beta -$ pear install Foo-alpha</screen> - - <para>You can also install a specific version, or upgrade to a specific - version regardless of the state:</para> - - <screen>$ pear install Foo-1.2.3 -$ pear upgrade Foo-1.2.3</screen> - - <sect3> - <title>Living on the edge</title> - - <para>If you don't care about stability and don't want to specify the - <literal>-alpha</literal> or <literal>-beta</literal> suffix - everytime, you can change the global stability config option: </para> - - <screen>$ pear config-set preferred_state alpha -config-set succeeded</screen> - - <para>You can switch between the following stability states (sorted by - stability):</para> - - <itemizedlist> - <listitem> - <para>stable</para> - </listitem> - - <listitem> - <para>beta</para> - </listitem> - - <listitem> - <para>alpha</para> - </listitem> - - <listitem> - <para>devel</para> - </listitem> - </itemizedlist> - </sect3> - </sect2> - - <sect2> - <title>Dependencies</title> - - <para>A package often requires other packages to be installed to - function correctly. Such a relation is called a dependency. The PEAR - installer has full support for dependencies; it can automatically - install required and/or optional dependencies if you wish so.</para> - - <para>If you try to install a package with required dependencies, you - will get an error that the installation failed. Looking deeper and - actually reading the messages shows you that the package needs - dependencies that are not installed on your system:</para> - - <screen>$ pear install html_page2 -Did not download dependencies: pear/HTML_Common, - use --alldeps or --onlyreqdeps to download automatically -pear/HTML_Page2 requires package "pear/HTML_Common" (version >= 1.2) -No valid packages found -install failed</screen> - - <para>You have several choices:</para> - - <itemizedlist> - <listitem> - <para>Install dependent packages by hand</para> - </listitem> - - <listitem> - <para>Let PEAR automatically install necessary dependencies - only</para> - </listitem> - - <listitem> - <para>Let PEAR automatically install necessary and optional - dependencies</para> - </listitem> - </itemizedlist> - - <para>The first method can be a painful and daunting process, because - dependent packages itself can have dependencies.</para> - - <para>Both other methods just require a switch to the install command, - either <literal>--onlyreqdeps</literal> (install required dependencies - only) or <literal>--alldeps</literal> (install all dependencies).</para> - - <screen>$ pear install --onlyreqdeps html_page2 -WARNING: "pear/HTML_Common" is deprecated in favor of "pear/HTML_Common2" -downloading HTML_Page2-0.5.0beta.tgz ... -Starting to download HTML_Page2-0.5.0beta.tgz (15,467 bytes) -......done: 15,467 bytes -downloading HTML_Common-1.2.4.tgz ... -Starting to download HTML_Common-1.2.4.tgz (4,519 bytes) -...done: 4,519 bytes -install ok: channel://pear.php.net/HTML_Common-1.2.4 -install ok: channel://pear.php.net/HTML_Page2-0.5.0beta</screen> - </sect2> - - <sect2> - <title>Offline installation</title> - - <para>You can download individual packages for e.g. offline installation - on a second machine just as you would install or upgrade a - package:</para> - - <screen>$ pear download Foo</screen> - - <para>After downloading, you will have a file like - <filename>Foo-1.2.3.tgz</filename> if the latest version of - <classname>Foo</classname> was <literal>1.2.3</literal>. Installing it - is as easy as typing</para> - - <screen>$ pear install Foo-1.2.3.tgz</screen> - </sect2> - </sect1> - - <sect1 id="packageinfo"> - <title>Getting information about packages</title> - - <sect2> - <title>Package information</title> - - <para>If you simply want to get to know the installed version of a - package or see its description, issue an <command>info</command> - command:</para> - - <screen>$ pear info PEAR -About pear.php.net/PEAR-1.7.1 -.. more info follows ..</screen> - </sect2> - - <sect2> - <title>Package files</title> - - <para>You often don't know which files belong to a certain installed - package. <command>list-files</command> is helping you here. It shows you - the file's role and its full path:</para> - - <screen>$ pear list-files log -Installed Files For log -======================= -Type Install Path -doc /usr/share/pear/docs/Log/docs/guide.txt -... -php /usr/share/pear/Log/composite.php -php /usr/share/pear/Log/console.php -... -data /usr/share/pear/data/Log/misc/log.sql -test /usr/share/pear/tests/Log/tests/composite.phpt -... -php /usr/share/pear/Log.php</screen> - </sect2> - - <sect2> - <title>Package examples</title> - - <para>While we try to document each package in the manual, many packages - - with or without a manual entry - come with examples. They have the - file role "<literal>doc</literal>" and can be located with - <command>list-files</command>, too:</para> - - <screen>$ pear list-files log | grep ^doc -doc /usr/share/pear/docs/Log/docs/guide.txt -doc /usr/share/pear/docs/Log/examples/composite.php -doc /usr/share/pear/docs/Log/examples/console.php -doc /usr/share/pear/docs/Log/examples/display.php -doc /usr/share/pear/docs/Log/examples/error_log.php -doc /usr/share/pear/docs/Log/examples/file.php -doc /usr/share/pear/docs/Log/examples/firebug.php -...</screen> - </sect2> - - <sect2> - <title>List all packages</title> - - <para><command>list</command> shows you all installed packages with - their version and stability:</para> - - <screen>$ pear list -Installed packages, channel pear.php.net: -========================================= -Package Version State -Archive_Tar 1.3.2 stable -Auth 1.5.4 stable -Cache 1.5.4 stable -Console_Getargs 1.3.4 stable -Console_Getopt 1.2.3 stable -...</screen> - - <para>To see all available packages on the channel server, use - <command>remote-list</command>:</para> - - <screen>$ pear remote-list -... output follows ...</screen> - - <note> - <para>This command takes some time if there are many packages on the - server</para> - </note> - </sect2> - - <sect2> - <title>Search remote packages</title> - - <para>Instead of going to the PEAR website, you can use the pear - installer to search for package names.</para> - - <screen>$ pear search w3c -Retrieving data...0%. -Matched packages, channel pear.php.net: -======================================= -Package Stable/(Latest) Local -Services_W3C_CSSValidator 0.1.0 (alpha) An Object Oriented Interface ...</screen> - - <para>The result list shows name, remote version and stability and the - package description.</para> - </sect2> - </sect1> - - <sect1 id="channels"> - <title>Using channels</title> - - <remark>FIXME</remark> - - <sect2> - <title>Channels?</title> - - <remark>FIXME</remark> - </sect2> - - <sect2> - <title>Channel discovery</title> - - <remark>FIXME</remark> - </sect2> - - <sect2> - <title>Work with packages on a channel</title> - - <remark>FIXME</remark> - </sect2> - - <sect2> - <title>Password protected channels</title> - - <remark>FIXME</remark> - </sect2> - </sect1> </chapter> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/installation.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/guide/users/installation.xml diff -u peardoc/en/guide/users/installation.xml:1.1 peardoc/en/guide/users/installation.xml:1.2 --- peardoc/en/guide/users/installation.xml:1.1 Mon Mar 31 07:53:53 2008 +++ peardoc/en/guide/users/installation.xml Fri Apr 4 09:05:46 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <chapter id="installation"> <chapterinfo> <author> @@ -10,16 +10,12 @@ </chapterinfo> <title>Installation</title> <simpara> - This chapter describes, how to install packages from PEAR. + This chapter describes how to install the PEAR package manager. </simpara> - &chapters.installation.introduction; - &chapters.installation.getting; - &chapters.installation.cli; - &chapters.installation.shared; - &chapters.installation.manually; - &chapters.installation.cvs; - &chapters.installation.pecl; + &guide.users.installation.introduction; + &guide.users.installation.getting; + &guide.users.installation.shared; </chapter> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/installation/getting.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/guide/users/installation/getting.xml diff -u peardoc/en/guide/users/installation/getting.xml:1.1 peardoc/en/guide/users/installation/getting.xml:1.2 --- peardoc/en/guide/users/installation/getting.xml:1.1 Mon Mar 31 07:53:53 2008 +++ peardoc/en/guide/users/installation/getting.xml Fri Apr 4 09:05:46 2008 @@ -1,9 +1,39 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 id="installation.getting"> <title>Getting the manager</title> <sect2> + <title>Windows</title> + + <para> + After you have downloaded and installed PHP, you have to manually + execute the batch file located in e.g. + <filename>c:\php\go-pear.bat</filename>. The setup will ask you + some questions and afterwards the PEAR Package Manager will be + installed in the path, which you have specified during installation. + Finally you have to add that installation path to your + <literal>PATH</literal> environment. Either do this manually (Start > + Control Panel > System > Environment) or run (double-click) the + newly generated <filename>PEAR_ENV.reg</filename> that's now found in the + PHP source directory. After that you can access the PEAR Package Manager + by running the command <literal>pear</literal> in a Windows Command + Prompt. + </para> + <para> + To update your PEAR installation from go-pear.org, request + &url.pear.go; in your browser and save the output to a local + file <filename>go-pear.php</filename>. You can then run + <screen> + <userinput> +php go-pear.php + </userinput> + </screen> + in a Windows Command Prompt to start the update process. + </para> + </sect2> + + <sect2> <title>Unix/Linux/BSD</title> <para> When using PHP >= 4.3.0, the PEAR Package Manager is already @@ -47,34 +77,33 @@ </sect2> <sect2> - <title>Windows</title> - + <title>Mac OS X</title> <para> - After you have downloaded and installed PHP, you have to manually - execute the batch file located in e.g. - <filename>c:\php\go-pear.bat</filename>. The setup will ask you - some questions and afterwards the PEAR Package Manager will be - installed in the path, which you have specified during installation. - Finally you have to add that installation path to your - <literal>PATH</literal> environment. Either do this manually (Start > - Control Panel > System > Environment) or run (double-click) the - newly generated <filename>PEAR_ENV.reg</filename> that's now found in the - PHP source directory. After that you can access the PEAR Package Manager - by running the command <literal>pear</literal> in a Windows Command - Prompt. + On Mac OS 10.4 and earlier, the PEAR Package Manager is already + installed in <filename>/usr/bin/pear</filename>. </para> <para> - To update your PEAR installation from go-pear.org, request - &url.pear.go; in your browser and save the output to a local - file <filename>go-pear.php</filename>. You can then run + If you would like to install a new copy, or re-install the PEAR + Package Manager use the following command: <screen> <userinput> -php go-pear.php +$ sudo curl &url.pear.go; | php </userinput> </screen> - in a Windows Command Prompt to start the update process. </para> + <note> + <para> + You can also save &url.pear.go; as <filename>go-pear.php</filename> + and run it with: + <screen> + <userinput> +php go-pear.php + </userinput> + </screen> + </para> + </note> </sect2> + <sect2> <title>PEAR in hosting environments</title> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/installation/introduction.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/guide/users/installation/introduction.xml diff -u peardoc/en/guide/users/installation/introduction.xml:1.1 peardoc/en/guide/users/installation/introduction.xml:1.2 --- peardoc/en/guide/users/installation/introduction.xml:1.1 Mon Mar 31 07:53:53 2008 +++ peardoc/en/guide/users/installation/introduction.xml Fri Apr 4 09:05:46 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 id="installation.introduction"> <title>Introduction</title> <para> @@ -7,11 +7,11 @@ <link linkend="about.pear">general structure</link> of PEAR. </para> <para> - The base installation that comes with the PHP distribution, + The base installation that comes with the PHP distribution, contains all the stuff - that is needed to run the PEAR installation tools etc. If you have + that is needed to run the PEAR installation tools etc. If you have a recent installation of PHP, you can relax: The PEAR base - installation is already there, unless you have compiled your PHP + installation is already there, unless you have compiled your PHP with the <filename>./configure</filename> flag <literal>--without-pear</literal>. </para> @@ -25,7 +25,8 @@ need to manually install the manager. </para> <para> - Apart from installing packages, the PEAR package manager also + Apart from <link linkend="guide.users.commandline.installing">installing packages</link>, + the PEAR package manager also handles some other tasks: It can create new packages on your machine, manage a registry of installed packages, check dependencies and it can interact with an <ulink http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/beforeyoubegin.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/beforeyoubegin.xml +++ peardoc/en/guide/users/commandline/beforeyoubegin.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.beforeyoubegin"> <title>Before you begin</title> <para>Always remember that PEAR has a help command:</para> <screen>$ pear help... list of commands follows .. </screen> <note> <para>Command examples will have a dollar sign <literal>$</literal> before each line that is typed. This helps to distinguish input from the output of the PEAR installer.</para> </note> <note> <para><literal>$</literal> is just an example for a command prompt. Depending on your distribution or personal preferences, your shell might display a username, often combined with the current path: <literal>joe:~/some/path></literal></para> </note> <para>Help for a command is just as easy to get:</para> <screen>$ pear help <command> $ pear help install... help for install follows ..</screen> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/channels.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/channels.xml +++ peardoc/en/guide/users/commandline/channels.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.channels"> <title>Using channels</title> <sect2 id="guide.users.commandline.channels.channels"> <title>Channels?</title> <para>Channels are alternative package sources. See the <link linkend="guide.migrating.channels">channel section</link> of the manual for more information.</para> <para>What you need to know now: By using channels, you can install packages that are not part of PEAR. Prominent PHP projects like Horde and PHPUnit distribute their software through PEAR-compatible channels.</para> </sect2> <sect2 id="guide.users.commandline.channels.discovery"> <title>Channel discovery</title> <para>Before you can use a channel, your pear installation needs to know about it. This process is called "channel discovery".</para> <para>Once you know the project's channel url, just type:</para> <screen>$ pear channel-discover http://pear.phpunit.de Adding Channel "pear.phpunit.de" succeeded</screen> <para>Downloading a channel.xml file, you can add a channel just using that file using <command>channel-add</command>:</para> <screen>$ pear channel-add my-channel.xml....</screen> <para>Using <command>list-channels</command>, you can get an overview of known channels:</para> <screen>$ pear list-channels Registered Channels: ==================== Channel Summary components.ez.no eZ Enterprise components demochanserv.bogo Simple demo channel server gnope.org PHP-Gtk2 applications pear.chiaraquartet.net Chiara Testing Channel pear.phing.info Channel for Phing build tool releases pear.php.net PHP Extension and Application Repository pear.phpunit.de PHPUnit channel server pear.symfony-project.com symfony project PEAR channel pearified.com PEAR-Compatible Extension and Application Repository pecl.php.net PHP Extension Community Library __uri Pseudo-channel for static packages</screen> <para>More insight about a channel can be gotten with <command>channel-info</command>. It prints out a description, the channel's shortcut name (alias) as well as mirror information.</para> <screen>$ pear channel-info pear.php.net Channel pear.php.net Information: ================================= Name and Server pear.php.net Alias pear Summary PHP Extension and Application Repository....</screen> </sect2> <sect2 id="guide.users.commandline.channels.packages"> <title>Work with packages on a channel</title> <para>When installing or doing anything else with a package that is not in your <link linkend="guide.users.commandline.config.options.default_channel">default channel</link>, you need to specify the channel by full name or alias:</para> <screen>$ pear install gnope/Dev_Inspector.... installation of package "Dev_Inspector" in channel "gnope" $ pear list -c pear.phpunit.de Installed packages, channel pear.phpunit.de: ============================================ Package Version State PHPUnit 3.2.5 stable</screen> <para>General rule is that when you would specify a package name, use <literal>$channel/$packagename</literal> now. All other functions with channel support have a <literal>-c</literal> option to specify the channel name or alias.</para> </sect2> <sect2 id="guide.users.commandline.channels.passwordprotected"> <title>Password protected channels</title> <para>PEAR compatible channels can be password protected. You could use this to e.g. distribute custom proprietary software to your clients, and don't want to publicy publish those packages anywhere.</para> <para>Password protection is done via a HTTP Basic Authentication (<filename>.htaccess</filename> and <filename>.htpassword</filename> on Apache). When trying to discover such a password protected channel, you will get a message like this:</para> <screen>$ pear channel-discover pear.company.com Discovery of channel "pear.company.com" failed (channel-add: Cannot open "http://pear.company.com/channel.xml" (File http://pear.company.com:80/channel.xml not valid (received: HTTP/1.1 401 Authorization Required )))</screen> <para>In this case, download the <filename>channel.xml</filename> file manually, for example with your browser or wget. A <filename>channel.xml</filename> is always in the root directory of the channel server. After that, discover the channel with the saved file:</para> <screen>$ pear channel-add /path/to/saved/channel.xml Adding Channel "pear.company.com" succeeded</screen> <para>Now the PEAR manager needs to know about the channel's username and password. We tell him by using <command>set-config</command> in connection with the channel option:</para> <screen>$ pear config-set -c pear.company.com username johndoe config-set succeeded $ pear config-set -c pear.company.com password secret config-set succeeded</screen> <para>Now test if we did everything right by showing available packages on the channel:</para> <screen>$ pear list-all -c pear.company.com Retrieving data...0% All packages [Channel pear.company.com]: ========================== Package Latest Local comp/WorldDominator 0.8.1 Tool to dominate the world</screen> <note> <para>If you changed your creditentials, you should issue a <command>pear clear-cache</command> command to make sure that the installer does not use cached data.</para> </note> </sect2> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/commands.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/commands.xml +++ peardoc/en/guide/users/commandline/commands.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.commands"> <title>Command list</title> <para>Here's a list of commands available to the pear command line tool. Many of these commands may require root access to the server.</para> <para><informaltable> <tgroup cols="2"> <thead> <row> <entry>Command</entry> <entry>Description</entry> </row> </thead> <tbody> <row> <entry>build</entry> <entry>Build the extension from source</entry> </row> <row> <entry>bundle</entry> <entry>Download and unpack a <ulink url="&url.pecl;">PECL</ulink> extension</entry> </row> <row> <entry> <link linkend="guide.users.commandline.channels.discovery">channel-add</link> </entry> <entry>Add a Channel (PEAR 1.4+)</entry> </row> <row> <entry>channel-alias</entry> <entry>Specify an alias to a channel name (PEAR 1.4+)</entry> </row> <row> <entry>channel-delete</entry> <entry>Remove a channel from the list (PEAR 1.4+)</entry> </row> <row> <entry> <link linkend="guide.users.commandline.channels.discovery">channel-discover</link> </entry> <entry>Initialize a channel from its server name (PEAR 1.4+)</entry> </row> <row> <entry>channel-info</entry> <entry>Retrieve information on a channel (PEAR 1.4+)</entry> </row> <row> <entry>channel-update</entry> <entry>Update an existing channel (PEAR 1.4+)</entry> </row> <row> <entry>clear-cache</entry> <entry>Clear the REST/XML-RPC cache</entry> </row> <row> <entry>config-create</entry> <entry>Create a default configuration file (PEAR 1.4+)</entry> </row> <row> <entry> <link linkend="guide.users.commandline.config">config-get</link> </entry> <entry>Echo a specific configuration setting</entry> </row> <row> <entry>config-help</entry> <entry>Show information about a setting</entry> </row> <row> <entry> <link linkend="guide.users.commandline.config">config-set</link> </entry> <entry>Set a specific configuration setting value</entry> </row> <row> <entry> <link linkend="guide.users.commandline.config">config-show</link> </entry> <entry>Show all configuration setting values</entry> </row> <row> <entry>convert</entry> <entry>Convert a package.xml 1.0 format to package.xml 2.0 format (PEAR 1.4+)</entry> </row> <row> <entry>cvsdiff</entry> <entry>Execute and display a "<literal>cvs diff -u</literal>" on all files within the package</entry> </row> <row> <entry>cvstag</entry> <entry>Set a CVS release tag</entry> </row> <row> <entry> <link linkend="guide.users.commandline.installing.offline">download</link> </entry> <entry>Download a package but not install it</entry> </row> <row> <entry>download-all</entry> <entry>Downloads every available package</entry> </row> <row> <entry>info</entry> <entry>Display information about a package</entry> </row> <row> <entry> <link linkend="guide.users.commandline.installing.normal">install</link> </entry> <entry>Install a package, will report with success or failure</entry> </row> <row> <entry> <link linkend="guide.users.commandline.packageinfo.list">list</link> </entry> <entry>List installed packages</entry> </row> <row> <entry> list-all </entry> <entry>List all packages, packaged and/or available</entry> </row> <row> <entry>list-channels</entry> <entry>List available channels (PEAR 1.4+)</entry> </row> <row> <entry> <link linkend="guide.users.commandline.packageinfo.files">list-files</link> </entry> <entry>List files in an installed package (PEAR 1.4+)</entry> </row> <row> <entry>list-upgrades</entry> <entry>List available upgrades for the installed packages</entry> </row> <row> <entry>login</entry> <entry>Connects and authenticates to the remote PEAR server</entry> </row> <row> <entry>logout</entry> <entry>Logs out from the remote PEAR server</entry> </row> <row> <entry>makerpm</entry> <entry>Builds a RPM spec file from a PEAR package</entry> </row> <row> <entry>package</entry> <entry>Build a package</entry> </row> <row> <entry>package-dependencies</entry> <entry>Show package dependencies</entry> </row> <row> <entry>package-validate</entry> <entry>Validate package consistency</entry> </row> <row> <entry>remote-info</entry> <entry>Information about remote packages</entry> </row> <row> <entry>remote-list</entry> <entry>List remote packages</entry> </row> <row> <entry>run-scripts</entry> <entry>Run post-install scripts bundled with a package (PEAR 1.4+)</entry> </row> <row> <entry>run-tests</entry> <entry>Run regression tests</entry> </row> <row> <entry> <link linkend="guide.users.commandline.packageinfo.searchremote">search</link> </entry> <entry>Search the remote package database</entry> </row> <row> <entry>shell-test</entry> <entry>Do a shell script test</entry> </row> <row> <entry>sign</entry> <entry>Sign a package distribution file</entry> </row> <row> <entry>uninstall</entry> <entry>Uninstall and remove a package</entry> </row> <row> <entry>update-channels</entry> <entry>Update the channel list (PEAR 1.4+)</entry> </row> <row> <entry> <link linkend="guide.users.commandline.installing.normal">upgrade</link> </entry> <entry>Upgrade a package to the current version (see also: preferred_state)</entry> </row> <row> <entry>upgrade-all</entry> <entry>Upgrade all packages (see also: list-upgrades)</entry> </row> </tbody> </tgroup> </informaltable></para> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/config.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/config.xml +++ peardoc/en/guide/users/commandline/config.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.config"> <title>Configuring your PEAR setup</title> <para>PEAR has a number of configuration options that you can change. Getting an overview about them is as easy as issuing a</para> <screen>$ pear config-show</screen> <para>The default settings suffice for novice users, there is rarely a need to change them when getting started. You can go on with <link linkend="guide.users.commandline.installing">installing packages</link>.</para> <para>Reading single values is accomplished by using <literal>config-get</literal>. The following command will show you where all the .php files of your installed pear packages reside.</para> <screen>$ pear config-get php_dir /usr/share/pear</screen> <para>Changing a value is as easy as retrieving it:</para> <screen>$ pear config-set preferred_state beta config-set succeeded</screen> <note> <para>When changing a config setting, it does not immediately get applied to already installed packages. This is especially true when changing variables like <varname>data_dir</varname>. Use <literal>$ pear upgrade --force</literal> to reinstall all packages in such cases.</para> </note> <sect2 id="guide.users.commandline.config.options"> <title>Config options</title> <para><informaltable> <tgroup cols="3"> <thead> <row> <entry>Variable Name</entry> <entry>Description</entry> <entry>Default Value</entry> </row> </thead> <tbody> <row> <entry>bin_dir</entry> <entry>Directory where executables are installed</entry> <entry><filename>/usr/bin</filename></entry> </row> <row> <entry>doc_dir</entry> <entry>Directory where documentation is installed</entry> <entry><filename>/usr/lib/php/docs</filename></entry> </row> <row> <entry>ext_dir</entry> <entry>Directory where loadable extensions are installed</entry> <entry><filename>./</filename></entry> </row> <row> <entry>php_dir</entry> <entry>Directory where PHP files are installed (like PEAR files)</entry> <entry><filename>/usr/lib/php</filename></entry> </row> <row> <entry>cache_dir</entry> <entry>PEAR installer cache directory, and used by XMLRPC</entry> <entry><filename>/tmp/pear/cache</filename></entry> </row> <row> <entry>data_dir</entry> <entry>Directory where data files are installed</entry> <entry><filename>/usr/lib/php/data</filename></entry> </row> <row> <entry>php_bin</entry> <entry>The PHP CLI or CGI binary for executing scripts</entry> <entry><filename>/usr/bin/php</filename></entry> </row> <row> <entry>test_dir</entry> <entry>Directory where regression tests are installed</entry> <entry><filename>/usr/lib/php/tests</filename></entry> </row> <row> <entry>cache_ttk</entry> <entry>Number of seconds that the local cache is used, and not updated (Time To Kill)</entry> <entry>3600</entry> </row> <row> <entry>preferred_state</entry> <entry>Preferred package state: stable, beta, alpha, devel, or snapshot</entry> <entry>stable</entry> </row> <row> <entry>umask</entry> <entry>umask used when creating files (Unix-like systems only)</entry> <entry>22</entry> </row> <row> <entry>verbose</entry> <entry>Debug log level: 0-3 where 3 is full debug mode.</entry> <entry>1</entry> </row> <row> <entry>http_proxy</entry> <entry>The optional HTTP proxy address (host:port) used when downloading packages</entry> <entry></entry> </row> <row> <entry>remote_config</entry> <entry>Remote configuration file, used to mirror a local installation on a remote server through ftp. (PEAR 1.4+)</entry> <entry></entry> </row> <row> <entry>auto_discover</entry> <entry>Auto-discover new channels from command line or dependencies</entry> <entry>0</entry> </row> <row id="guide.users.commandline.config.options.default_channel"> <entry>default_channel</entry> <entry>Default channel (PEAR 1.4+)</entry> <entry>pear.php.net (pecl.php.net if using the pecl command)</entry> </row> <row> <entry>preferred_mirror</entry> <entry>Preferred channel mirror (PEAR 1.4+)</entry> <entry>pear.php.net (pecl.php.net if using the pecl command)</entry> </row> <row> <entry>master_server</entry> <entry>PEAR server [deprecated in PEAR 1.4+]</entry> <entry>pear.php.net</entry> </row> <row> <entry>password</entry> <entry>PEAR password (used by maintainers)</entry> <entry></entry> </row> <row> <entry>sig_bin</entry> <entry>Signature handling program</entry> <entry><filename>/sw/bin/gpg</filename></entry> </row> <row> <entry>sig_keydir</entry> <entry>Signature key directory</entry> <entry><filename>/etc/pearkeys</filename></entry> </row> <row> <entry>sig_keyid</entry> <entry>The key used for signing</entry> <entry></entry> </row> <row> <entry>sig_type</entry> <entry>Package signature type (only gpg)</entry> <entry>gpg</entry> </row> <row> <entry>username</entry> <entry>PEAR username (used by maintainers)</entry> <entry></entry> </row> </tbody> </tgroup> </informaltable></para> </sect2> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/cvsinstall.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/cvsinstall.xml +++ peardoc/en/guide/users/commandline/cvsinstall.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.cvsinstall"> <title>Installing packages from CVS</title> <para>This passage will describe how to install the latest development version of a PEAR package from CVS.</para> <para>It is NOT recommended to run a package from CVS in working environments! Because CVS versions are not regular releases, this means: <itemizedlist> <listitem> <simpara>You could get no kind of help from the maintainer or anybody other.</simpara> </listitem> <listitem> <simpara>Versions in CVS may break the upgrade mechanism of the PEAR Installer.</simpara> </listitem> </itemizedlist></para> <para>You should use a package from CVS only, if: <itemizedlist> <listitem> <simpara>The maintainer recommended it for you.</simpara> </listitem> <listitem> <simpara>You want to help in development of a package.</simpara> </listitem> <listitem> <simpara>You really need a special patch or function, which is not currently released.</simpara> </listitem> </itemizedlist></para> <para>If you still want to install a package from CVS, you have to do the same steps like a package maintainer creating a new release of a package. If you have problems following the next steps, take a look into the <link linkend="guide-developers">Developers Section</link> of the manual.</para> <orderedlist> <listitem> <para>Get the package files from CVS like described in <ulink url="&url.php.anoncvs;">&url.php.anoncvs;</ulink></para> <para>The name of the module to checkout is <filename>pear/<packagename></filename>, i.e. <command> cvs -d :pserver:cvsread@cvs.php.net:/repository checkout pear/HTTP_Client</command>.</para> </listitem> <listitem> <para>Check the <filename>package.xml</filename> file, especially the dir and file entries. They must match the existing files and directory structure. If they differ, contact the package maintainer and ask for an update of the <filename>package.xml</filename>.</para> </listitem> <listitem> <para>Create a valid package using the PEAR Installer <command>pear package <path to package.xml></command></para> </listitem> <listitem> <para>If you have already installed the package: remove it to avoid version conflicts: <command>pear uninstall <package></command></para> </listitem> <listitem> <para>Install your package archive: <command>pear install <package-file></command></para> <para>Now, you have a CVS version installed!</para> </listitem> </orderedlist> <para>You should upgrade to an official release of the package as early as possible. Before you install the official release, uninstall the CVS version to avoid version conflicts.</para> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/installing.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/installing.xml +++ peardoc/en/guide/users/commandline/installing.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.installing"> <title>Installing packages</title> <para>After getting PEAR working on your machine (see <link linkend="installation">Installation</link>) you most likely want to install some packages. This guide shows people new to the PEAR command line installer how to get started.</para> <sect2 id="guide.users.commandline.installing.normal"> <title>Normal installation procedure</title> <para>The general command to install a PEAR package named "foo" is</para> <screen>$ pear install foo</screen> <para>Typing this and pressing return, the package will be downloaded and installed on your computer. It does not matter if you write the package name in lowercase, UPPERCASE or MixedCase - the installer will find the package by lowercasing the name.</para> <para>When a package is already installed, you will get the following message:</para> <screen>$ pear install foo Ignoring installed package pear/foo Nothing to install</screen> <para>This happens even if there is a newer version of the package! The correct command to upgrade to the lastest version is</para> <screen>$ pear upgrade foo upgrade ok: channel://pear.php.net/Foo-1.2.3</screen> <para>If the package already has the lastest version, you will get a message similar to the following:</para> <screen>Ignoring installed package pear/Foo Nothing to upgrade</screen> <para>In the case you deleted some file and really really want to re-install the package, you have two choices:</para> <itemizedlist> <listitem> <para>Uninstall the package, and reinstall it afterwards</para> </listitem> <listitem> <para>Force the installation</para> </listitem> </itemizedlist> <para>Forcing an command should only be done when you absolutely know what you are doing - you might in some circumstances break PEAR otherwise. Forcing something should always be the last option.</para> <screen>$ pear install -f foo $ pear upgrade -f foo</screen> </sect2> <sect2 id="guide.users.commandline.installing.unstable"> <title>Unstable alpha/beta packages</title> <para>Now and then, you will get error messages like</para> <screen>Failed to download pear/foo within preferred state "stable", latest release is version 0.1.2, stability "beta", use "channel://pear.php.net/foo-0.1.2" to install Cannot initialize 'channel://pear.php.net/foo', invalid or missing package file Package "channel://pear.php.net/foo" is not valid install failed</screen> <para>Reason for this is that PEAR by default installs stable packages only. When a package is in state <emphasis>devel</emphasis>, <emphasis>alpha</emphasis> or <emphasis>beta</emphasis> it will refuse to install them. You can easily persuade it by adding either the version number or the stability you are willing to accept:</para> <screen>$ pear install Foo-beta $ pear install Foo-alpha</screen> <para>You can also install a specific version, or upgrade to a specific version regardless of the state:</para> <screen>$ pear install Foo-1.2.3 $ pear upgrade Foo-1.2.3</screen> <sect3 id="guide.users.commandline.installing.unstable.edge"> <title>Living on the edge</title> <para>If you don't care about stability and don't want to specify the <literal>-alpha</literal> or <literal>-beta</literal> suffix everytime, you can change the global stability config option:</para> <screen>$ pear config-set preferred_state alpha config-set succeeded</screen> <para>You can switch between the following stability states (sorted by stability):</para> <itemizedlist> <listitem> <para>stable</para> </listitem> <listitem> <para>beta</para> </listitem> <listitem> <para>alpha</para> </listitem> <listitem> <para>devel</para> </listitem> </itemizedlist> </sect3> </sect2> <sect2 id="guide.users.commandline.installing.dependencies"> <title>Dependencies</title> <para>A package often requires other packages to be installed to function correctly. Such a relation is called a dependency. The PEAR installer has full support for dependencies; it can automatically install required and/or optional dependencies if you wish so.</para> <para>If you try to install a package with required dependencies, you will get an error that the installation failed. Looking deeper and actually reading the messages shows you that the package needs dependencies that are not installed on your system:</para> <screen>$ pear install html_page2 Did not download dependencies: pear/HTML_Common, use --alldeps or --onlyreqdeps to download automatically pear/HTML_Page2 requires package "pear/HTML_Common" (version >= 1.2) No valid packages found install failed</screen> <para>You have several choices:</para> <itemizedlist> <listitem> <para>Install dependent packages by hand</para> </listitem> <listitem> <para>Let PEAR automatically install necessary dependencies only</para> </listitem> <listitem> <para>Let PEAR automatically install necessary and optional dependencies</para> </listitem> </itemizedlist> <para>The first method can be a painful and daunting process, because dependent packages itself can have dependencies.</para> <para>Both other methods just require a switch to the install command, either <literal>--onlyreqdeps</literal> (install required dependencies only) or <literal>--alldeps</literal> (install all dependencies).</para> <screen>$ pear install --onlyreqdeps html_page2 WARNING: "pear/HTML_Common" is deprecated in favor of "pear/HTML_Common2" downloading HTML_Page2-0.5.0beta.tgz ... Starting to download HTML_Page2-0.5.0beta.tgz (15,467 bytes).......done: 15,467 bytes downloading HTML_Common-1.2.4.tgz ... Starting to download HTML_Common-1.2.4.tgz (4,519 bytes)....done: 4,519 bytes install ok: channel://pear.php.net/HTML_Common-1.2.4 install ok: channel://pear.php.net/HTML_Page2-0.5.0beta</screen> </sect2> <sect2 id="guide.users.commandline.installing.offline"> <title>Offline installation</title> <para>You can download individual packages for e.g. offline installation on a second machine just as you would install or upgrade a package:</para> <screen>$ pear download Foo</screen> <para>After downloading, you will have a file like <filename>Foo-1.2.3.tgz</filename> if the latest version of <classname>Foo</classname> was <literal>1.2.3</literal>. Installing it is as easy as typing</para> <screen>$ pear install Foo-1.2.3.tgz</screen> </sect2> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/manualinstallation.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/manualinstallation.xml +++ peardoc/en/guide/users/commandline/manualinstallation.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.manualinstallation"> <title>Manual package installation</title> <warning> <para>We removed this section, because, today, manually installing a package requires a deeper understanding of the way how packages are organized and what happens during the installation process. You should read the section about the <filename>package.xml</filename> in the Developers Guide (<xref linkend="developers.packagedef" /> and <xref linkend="guide.developers.package2" />), if you really want install a package without the PEAR installer.</para> <para>If you want to install PEAR on a remote host without shell access, you should look into <xref linkend="installation.shared" />.</para> </warning> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/packageinfo.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/packageinfo.xml +++ peardoc/en/guide/users/commandline/packageinfo.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.packageinfo"> <title>Getting information about packages</title> <sect2 id="guide.users.commandline.packageinfo.info"> <title>Package information</title> <para>If you simply want to get to know the installed version of a package or see its description, issue an <command>info</command> command:</para> <screen>$ pear info PEAR About pear.php.net/PEAR-1.7.1... more info follows ..</screen> </sect2> <sect2 id="guide.users.commandline.packageinfo.files"> <title>Package files</title> <para>You often don't know which files belong to a certain installed package. <command>list-files</command> is helping you here. It shows you the file's role and its full path:</para> <screen>$ pear list-files log Installed Files For log ======================= Type Install Path doc /usr/share/pear/docs/Log/docs/guide.txt.... php /usr/share/pear/Log/composite.php php /usr/share/pear/Log/console.php.... data /usr/share/pear/data/Log/misc/log.sql test /usr/share/pear/tests/Log/tests/composite.phpt.... php /usr/share/pear/Log.php</screen> </sect2> <sect2 id="guide.users.commandline.packageinfo.examples"> <title>Package examples</title> <para>While we try to document each package in the manual, many packages - with or without a manual entry - come with examples. They have the file role "<literal>doc</literal>" and can be located with <command>list-files</command>, too:</para> <screen>$ pear list-files log | grep ^doc doc /usr/share/pear/docs/Log/docs/guide.txt doc /usr/share/pear/docs/Log/examples/composite.php doc /usr/share/pear/docs/Log/examples/console.php doc /usr/share/pear/docs/Log/examples/display.php doc /usr/share/pear/docs/Log/examples/error_log.php doc /usr/share/pear/docs/Log/examples/file.php doc /usr/share/pear/docs/Log/examples/firebug.php....</screen> </sect2> <sect2 id="guide.users.commandline.packageinfo.list"> <title>List all packages</title> <para><command>list</command> shows you all installed packages with their version and stability:</para> <screen>$ pear list Installed packages, channel pear.php.net: ========================================= Package Version State Archive_Tar 1.3.2 stable Auth 1.5.4 stable Cache 1.5.4 stable Console_Getargs 1.3.4 stable Console_Getopt 1.2.3 stable....</screen> <para>To see all available packages on the channel server, use <command>remote-list</command>:</para> <screen>$ pear remote-list.... output follows ...</screen> <note> <para>This command takes some time if there are many packages on the server</para> </note> </sect2> <sect2 id="guide.users.commandline.packageinfo.searchremote"> <title>Search remote packages</title> <para>Instead of going to the PEAR website, you can use the pear installer to search for package names.</para> <screen>$ pear search w3c Retrieving data...0%. Matched packages, channel pear.php.net: ======================================= Package Stable/(Latest) Local Services_W3C_CSSValidator 0.1.0 (alpha) An Object Oriented Interface ...</screen> <para>The result list shows name, remote version and stability and the package description. Alternatively, you can use the <ulink url="&url.pear.package.browse;">package browser</ulink> on pear.php.net.</para> </sect2> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/pecl.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/pecl.xml +++ peardoc/en/guide/users/commandline/pecl.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.pecl"> <title>Installing PECL packages</title> <para>The procedure of installing PECL packages is described in the <ulink url="&url.php.manual.peclinstall;">pecl manual section</ulink> on the PHP website.</para> </sect1>
http://cvs.php.net/viewvc.cgi/peardoc/global.ent?r1=1.98&r2=1.99&diff_format=u Index: peardoc/global.ent diff -u peardoc/global.ent:1.98 peardoc/global.ent:1.99 --- peardoc/global.ent:1.98 Sun Mar 23 18:21:16 2008 +++ peardoc/global.ent Fri Apr 4 09:05:45 2008 @@ -1,6 +1,6 @@ <!-- -*- SGML -*- - $Id: global.ent,v 1.98 2008/03/23 18:21:16 amir Exp $ + $Id: global.ent,v 1.99 2008/04/04 09:05:45 cweiske Exp $ Contains global "macros" for all the XML documents. @@ -112,8 +112,9 @@ <!ENTITY url.php.anoncvs 'http://www.php.net/anoncvs.php'> <!ENTITY url.php.callback 'http://www.php.net/manual/language.pseudo-types.php'> <!ENTITY url.php.manual 'http://www.php.net/manual/'> -<!ENTITY url.php.manual.howto 'http://www.php.net/dochowto'> <!ENTITY url.php.manual.about 'http://www.php.net/manual/about.php'> +<!ENTITY url.php.manual.howto 'http://www.php.net/dochowto'> +<!ENTITY url.php.manual.peclinstall 'http://www.php.net/manual/en/install.pecl.php'> <!ENTITY url.php.mailinglists 'http://www.php.net/mailing-lists.php'> <!ENTITY url.php.cvs 'http://cvs.php.net/'> <!ENTITY url.php.cvs.pear 'http://cvs.php.net/pear/'> http://cvs.php.net/viewvc.cgi/peardoc/en/language-defs.ent?r1=1.6&r2=1.7&diff_format=u Index: peardoc/en/language-defs.ent diff -u peardoc/en/language-defs.ent:1.6 peardoc/en/language-defs.ent:1.7 --- peardoc/en/language-defs.ent:1.6 Mon Mar 31 15:24:31 2008 +++ peardoc/en/language-defs.ent Fri Apr 4 09:05:45 2008 @@ -1,9 +1,10 @@ -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!ENTITY PEARManual "PEAR Manual"> <!ENTITY Translatedby "Translated by"> <!ENTITY Date "Date:"> <!ENTITY AboutPEAR "About PEAR"> +<!ENTITY UsersGuide "User guide"> <!ENTITY DevelopersGuide "Developer Guide"> <!ENTITY UsersGuide "User Guide"> <!ENTITY NewMaintainersGuide "New Maintainers' Guide"> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/guide/users/commandline.xml diff -u peardoc/en/guide/users/commandline.xml:1.3 peardoc/en/guide/users/commandline.xml:1.4 --- peardoc/en/guide/users/commandline.xml:1.3 Thu Apr 3 14:25:14 2008 +++ peardoc/en/guide/users/commandline.xml Fri Apr 4 09:05:46 2008 @@ -1,379 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- $Revision: 1.3 $ --> -<chapter id="cli"> +<!-- $Revision: 1.4 $ --> +<chapter id="guide.users.commandline.cli"> <title>Command line installer</title> - <sect1 id="beforeyoubegin"> - <title>Before you begin</title> + <warning> + <title>Prerequisites</title> - <para>Always remember that PEAR has a help command:</para> + <para>The following description requires the latest version of the <link + linkend="installation.getting">PEAR package manager</link> to be + installed.</para> + </warning> + + <para> + This chapter shows you how to use the PEAR command line installer. + </para> + + &guide.users.commandline.beforeyoubegin; + &guide.users.commandline.config; + &guide.users.commandline.installing; + &guide.users.commandline.packageinfo; + &guide.users.commandline.channels; + &guide.users.commandline.commands; + &guide.users.commandline.manualinstallation; + &guide.users.commandline.cvsinstall; + &guide.users.commandline.pecl; - <screen>$ pear help -.. list of commands follows .. </screen> - - <note> - <para>Command examples will have a dollar sign $ before each line that - is typed. This helps to distinguish input from the output of the PEAR - installer.</para> - </note> - - <para>Help for a command is just as easy to get:</para> - - <screen>$ pear help <command> -$ pear help install -.. help for install follows ..</screen> - - <sect2> - <title>Configuring your PEAR setup</title> - - <para>PEAR has a number of configuration options that you can change. - Getting an overview about them is as easy as issuing a</para> - - <screen>$ pear config-show</screen> - - <para>The default settings suffice for novice users, there is rarely a - need to change them when getting started.</para> - - <para>Reading single values is accomplished by using - <literal>config-get</literal>. The following command will show you where - all the .php files of your installed pear packages reside.</para> - - <screen>$ pear config-get php_dir -/usr/share/pear</screen> - - <para>Changing a value is as easy as retrieving it:</para> - - <screen>$ pear config-set preferred_state beta -config-set succeeded</screen> - </sect2> - </sect1> - - <sect1 id="installing"> - <title>Installing packages</title> - - <para>After getting PEAR working on your machine (see <link - linkend="installation">Installation</link>) you most likely - want to install some packages. This guide shows people new to the PEAR - command line installer how to get started.</para> - - <sect2> - <title>Normal installation procedure</title> - - <para>The general command to install a PEAR package named "foo" - is</para> - - <screen>$ pear install foo</screen> - - <para>Typing this and pressing return, the package will be downloaded - and installed on your computer. It does not matter if you write the - package name in lowercase, UPPERCASE or MixedCase - the installer will - find the package by lowercasing the name.</para> - - <para>When a package is already installed, you will get the following - message:</para> - - <screen>$ pear install foo -Ignoring installed package pear/foo -Nothing to install</screen> - - <para>This happens even if there is a newer version of the package! The - correct command to update to the lastest version is</para> - - <screen>$ pear update foo -upgrade ok: channel://pear.php.net/Foo-1.2.3</screen> - - <para>If the package already has the lastest version, you will get a - message similar to the following:</para> - - <screen>Ignoring installed package pear/Foo -Nothing to upgrade</screen> - - <para>In the case you deleted some file and really really want to - re-install the package, you have two choices:</para> - - <itemizedlist> - <listitem> - <para>Uninstall the package, and reinstall it afterwards</para> - </listitem> - - <listitem> - <para>Force the installation</para> - </listitem> - </itemizedlist> - - <para>Forcing an command should only be done when you absolutely know - what you are doing - you might in some circumstances break PEAR - otherwise. Forcing something should always be the last option.</para> - - <screen>$ pear install -f foo -$ pear upgrade -f foo</screen> - </sect2> - - <sect2> - <title>Unstable alpha/beta packages</title> - - <para>Now and then, you will get error messages like</para> - - <screen>Failed to download pear/foo within preferred state "stable", - latest release is version 0.1.2, stability "beta", - use "channel://pear.php.net/foo-0.1.2" to install -Cannot initialize 'channel://pear.php.net/foo', invalid or missing package file -Package "channel://pear.php.net/foo" is not valid -install failed</screen> - - <para>Reason for this is that PEAR by default installs stable packages - only. When a package is in state <emphasis>devel</emphasis>, - <emphasis>alpha</emphasis> or <emphasis>beta</emphasis> it will refuse - to install them. You can easily persuade it by adding either the version - number or the stability you are willing to accept:</para> - - <screen>$ pear install Foo-beta -$ pear install Foo-alpha</screen> - - <para>You can also install a specific version, or upgrade to a specific - version regardless of the state:</para> - - <screen>$ pear install Foo-1.2.3 -$ pear upgrade Foo-1.2.3</screen> - - <sect3> - <title>Living on the edge</title> - - <para>If you don't care about stability and don't want to specify the - <literal>-alpha</literal> or <literal>-beta</literal> suffix - everytime, you can change the global stability config option: </para> - - <screen>$ pear config-set preferred_state alpha -config-set succeeded</screen> - - <para>You can switch between the following stability states (sorted by - stability):</para> - - <itemizedlist> - <listitem> - <para>stable</para> - </listitem> - - <listitem> - <para>beta</para> - </listitem> - - <listitem> - <para>alpha</para> - </listitem> - - <listitem> - <para>devel</para> - </listitem> - </itemizedlist> - </sect3> - </sect2> - - <sect2> - <title>Dependencies</title> - - <para>A package often requires other packages to be installed to - function correctly. Such a relation is called a dependency. The PEAR - installer has full support for dependencies; it can automatically - install required and/or optional dependencies if you wish so.</para> - - <para>If you try to install a package with required dependencies, you - will get an error that the installation failed. Looking deeper and - actually reading the messages shows you that the package needs - dependencies that are not installed on your system:</para> - - <screen>$ pear install html_page2 -Did not download dependencies: pear/HTML_Common, - use --alldeps or --onlyreqdeps to download automatically -pear/HTML_Page2 requires package "pear/HTML_Common" (version >= 1.2) -No valid packages found -install failed</screen> - - <para>You have several choices:</para> - - <itemizedlist> - <listitem> - <para>Install dependent packages by hand</para> - </listitem> - - <listitem> - <para>Let PEAR automatically install necessary dependencies - only</para> - </listitem> - - <listitem> - <para>Let PEAR automatically install necessary and optional - dependencies</para> - </listitem> - </itemizedlist> - - <para>The first method can be a painful and daunting process, because - dependent packages itself can have dependencies.</para> - - <para>Both other methods just require a switch to the install command, - either <literal>--onlyreqdeps</literal> (install required dependencies - only) or <literal>--alldeps</literal> (install all dependencies).</para> - - <screen>$ pear install --onlyreqdeps html_page2 -WARNING: "pear/HTML_Common" is deprecated in favor of "pear/HTML_Common2" -downloading HTML_Page2-0.5.0beta.tgz ... -Starting to download HTML_Page2-0.5.0beta.tgz (15,467 bytes) -......done: 15,467 bytes -downloading HTML_Common-1.2.4.tgz ... -Starting to download HTML_Common-1.2.4.tgz (4,519 bytes) -...done: 4,519 bytes -install ok: channel://pear.php.net/HTML_Common-1.2.4 -install ok: channel://pear.php.net/HTML_Page2-0.5.0beta</screen> - </sect2> - - <sect2> - <title>Offline installation</title> - - <para>You can download individual packages for e.g. offline installation - on a second machine just as you would install or upgrade a - package:</para> - - <screen>$ pear download Foo</screen> - - <para>After downloading, you will have a file like - <filename>Foo-1.2.3.tgz</filename> if the latest version of - <classname>Foo</classname> was <literal>1.2.3</literal>. Installing it - is as easy as typing</para> - - <screen>$ pear install Foo-1.2.3.tgz</screen> - </sect2> - </sect1> - - <sect1 id="packageinfo"> - <title>Getting information about packages</title> - - <sect2> - <title>Package information</title> - - <para>If you simply want to get to know the installed version of a - package or see its description, issue an <command>info</command> - command:</para> - - <screen>$ pear info PEAR -About pear.php.net/PEAR-1.7.1 -.. more info follows ..</screen> - </sect2> - - <sect2> - <title>Package files</title> - - <para>You often don't know which files belong to a certain installed - package. <command>list-files</command> is helping you here. It shows you - the file's role and its full path:</para> - - <screen>$ pear list-files log -Installed Files For log -======================= -Type Install Path -doc /usr/share/pear/docs/Log/docs/guide.txt -... -php /usr/share/pear/Log/composite.php -php /usr/share/pear/Log/console.php -... -data /usr/share/pear/data/Log/misc/log.sql -test /usr/share/pear/tests/Log/tests/composite.phpt -... -php /usr/share/pear/Log.php</screen> - </sect2> - - <sect2> - <title>Package examples</title> - - <para>While we try to document each package in the manual, many packages - - with or without a manual entry - come with examples. They have the - file role "<literal>doc</literal>" and can be located with - <command>list-files</command>, too:</para> - - <screen>$ pear list-files log | grep ^doc -doc /usr/share/pear/docs/Log/docs/guide.txt -doc /usr/share/pear/docs/Log/examples/composite.php -doc /usr/share/pear/docs/Log/examples/console.php -doc /usr/share/pear/docs/Log/examples/display.php -doc /usr/share/pear/docs/Log/examples/error_log.php -doc /usr/share/pear/docs/Log/examples/file.php -doc /usr/share/pear/docs/Log/examples/firebug.php -...</screen> - </sect2> - - <sect2> - <title>List all packages</title> - - <para><command>list</command> shows you all installed packages with - their version and stability:</para> - - <screen>$ pear list -Installed packages, channel pear.php.net: -========================================= -Package Version State -Archive_Tar 1.3.2 stable -Auth 1.5.4 stable -Cache 1.5.4 stable -Console_Getargs 1.3.4 stable -Console_Getopt 1.2.3 stable -...</screen> - - <para>To see all available packages on the channel server, use - <command>remote-list</command>:</para> - - <screen>$ pear remote-list -... output follows ...</screen> - - <note> - <para>This command takes some time if there are many packages on the - server</para> - </note> - </sect2> - - <sect2> - <title>Search remote packages</title> - - <para>Instead of going to the PEAR website, you can use the pear - installer to search for package names.</para> - - <screen>$ pear search w3c -Retrieving data...0%. -Matched packages, channel pear.php.net: -======================================= -Package Stable/(Latest) Local -Services_W3C_CSSValidator 0.1.0 (alpha) An Object Oriented Interface ...</screen> - - <para>The result list shows name, remote version and stability and the - package description.</para> - </sect2> - </sect1> - - <sect1 id="channels"> - <title>Using channels</title> - - <remark>FIXME</remark> - - <sect2> - <title>Channels?</title> - - <remark>FIXME</remark> - </sect2> - - <sect2> - <title>Channel discovery</title> - - <remark>FIXME</remark> - </sect2> - - <sect2> - <title>Work with packages on a channel</title> - - <remark>FIXME</remark> - </sect2> - - <sect2> - <title>Password protected channels</title> - - <remark>FIXME</remark> - </sect2> - </sect1> </chapter> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/installation.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/guide/users/installation.xml diff -u peardoc/en/guide/users/installation.xml:1.1 peardoc/en/guide/users/installation.xml:1.2 --- peardoc/en/guide/users/installation.xml:1.1 Mon Mar 31 07:53:53 2008 +++ peardoc/en/guide/users/installation.xml Fri Apr 4 09:05:46 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <chapter id="installation"> <chapterinfo> <author> @@ -10,16 +10,12 @@ </chapterinfo> <title>Installation</title> <simpara> - This chapter describes, how to install packages from PEAR. + This chapter describes how to install the PEAR package manager. </simpara> - &chapters.installation.introduction; - &chapters.installation.getting; - &chapters.installation.cli; - &chapters.installation.shared; - &chapters.installation.manually; - &chapters.installation.cvs; - &chapters.installation.pecl; + &guide.users.installation.introduction; + &guide.users.installation.getting; + &guide.users.installation.shared; </chapter> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/installation/getting.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/guide/users/installation/getting.xml diff -u peardoc/en/guide/users/installation/getting.xml:1.1 peardoc/en/guide/users/installation/getting.xml:1.2 --- peardoc/en/guide/users/installation/getting.xml:1.1 Mon Mar 31 07:53:53 2008 +++ peardoc/en/guide/users/installation/getting.xml Fri Apr 4 09:05:46 2008 @@ -1,9 +1,39 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 id="installation.getting"> <title>Getting the manager</title> <sect2> + <title>Windows</title> + + <para> + After you have downloaded and installed PHP, you have to manually + execute the batch file located in e.g. + <filename>c:\php\go-pear.bat</filename>. The setup will ask you + some questions and afterwards the PEAR Package Manager will be + installed in the path, which you have specified during installation. + Finally you have to add that installation path to your + <literal>PATH</literal> environment. Either do this manually (Start > + Control Panel > System > Environment) or run (double-click) the + newly generated <filename>PEAR_ENV.reg</filename> that's now found in the + PHP source directory. After that you can access the PEAR Package Manager + by running the command <literal>pear</literal> in a Windows Command + Prompt. + </para> + <para> + To update your PEAR installation from go-pear.org, request + &url.pear.go; in your browser and save the output to a local + file <filename>go-pear.php</filename>. You can then run + <screen> + <userinput> +php go-pear.php + </userinput> + </screen> + in a Windows Command Prompt to start the update process. + </para> + </sect2> + + <sect2> <title>Unix/Linux/BSD</title> <para> When using PHP >= 4.3.0, the PEAR Package Manager is already @@ -47,34 +77,33 @@ </sect2> <sect2> - <title>Windows</title> - + <title>Mac OS X</title> <para> - After you have downloaded and installed PHP, you have to manually - execute the batch file located in e.g. - <filename>c:\php\go-pear.bat</filename>. The setup will ask you - some questions and afterwards the PEAR Package Manager will be - installed in the path, which you have specified during installation. - Finally you have to add that installation path to your - <literal>PATH</literal> environment. Either do this manually (Start > - Control Panel > System > Environment) or run (double-click) the - newly generated <filename>PEAR_ENV.reg</filename> that's now found in the - PHP source directory. After that you can access the PEAR Package Manager - by running the command <literal>pear</literal> in a Windows Command - Prompt. + On Mac OS 10.4 and earlier, the PEAR Package Manager is already + installed in <filename>/usr/bin/pear</filename>. </para> <para> - To update your PEAR installation from go-pear.org, request - &url.pear.go; in your browser and save the output to a local - file <filename>go-pear.php</filename>. You can then run + If you would like to install a new copy, or re-install the PEAR + Package Manager use the following command: <screen> <userinput> -php go-pear.php +$ sudo curl &url.pear.go; | php </userinput> </screen> - in a Windows Command Prompt to start the update process. </para> + <note> + <para> + You can also save &url.pear.go; as <filename>go-pear.php</filename> + and run it with: + <screen> + <userinput> +php go-pear.php + </userinput> + </screen> + </para> + </note> </sect2> + <sect2> <title>PEAR in hosting environments</title> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/installation/introduction.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/guide/users/installation/introduction.xml diff -u peardoc/en/guide/users/installation/introduction.xml:1.1 peardoc/en/guide/users/installation/introduction.xml:1.2 --- peardoc/en/guide/users/installation/introduction.xml:1.1 Mon Mar 31 07:53:53 2008 +++ peardoc/en/guide/users/installation/introduction.xml Fri Apr 4 09:05:46 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 id="installation.introduction"> <title>Introduction</title> <para> @@ -7,11 +7,11 @@ <link linkend="about.pear">general structure</link> of PEAR. </para> <para> - The base installation that comes with the PHP distribution, + The base installation that comes with the PHP distribution, contains all the stuff - that is needed to run the PEAR installation tools etc. If you have + that is needed to run the PEAR installation tools etc. If you have a recent installation of PHP, you can relax: The PEAR base - installation is already there, unless you have compiled your PHP + installation is already there, unless you have compiled your PHP with the <filename>./configure</filename> flag <literal>--without-pear</literal>. </para> @@ -25,7 +25,8 @@ need to manually install the manager. </para> <para> - Apart from installing packages, the PEAR package manager also + Apart from <link linkend="guide.users.commandline.installing">installing packages</link>, + the PEAR package manager also handles some other tasks: It can create new packages on your machine, manage a registry of installed packages, check dependencies and it can interact with an <ulink http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/beforeyoubegin.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/beforeyoubegin.xml +++ peardoc/en/guide/users/commandline/beforeyoubegin.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.beforeyoubegin"> <title>Before you begin</title> <para>Always remember that PEAR has a help command:</para> <screen>$ pear help... list of commands follows .. </screen> <note> <para>Command examples will have a dollar sign <literal>$</literal> before each line that is typed. This helps to distinguish input from the output of the PEAR installer.</para> </note> <note> <para><literal>$</literal> is just an example for a command prompt. Depending on your distribution or personal preferences, your shell might display a username, often combined with the current path: <literal>joe:~/some/path></literal></para> </note> <para>Help for a command is just as easy to get:</para> <screen>$ pear help <command> $ pear help install... help for install follows ..</screen> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/channels.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/channels.xml +++ peardoc/en/guide/users/commandline/channels.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.channels"> <title>Using channels</title> <sect2 id="guide.users.commandline.channels.channels"> <title>Channels?</title> <para>Channels are alternative package sources. See the <link linkend="guide.migrating.channels">channel section</link> of the manual for more information.</para> <para>What you need to know now: By using channels, you can install packages that are not part of PEAR. Prominent PHP projects like Horde and PHPUnit distribute their software through PEAR-compatible channels.</para> </sect2> <sect2 id="guide.users.commandline.channels.discovery"> <title>Channel discovery</title> <para>Before you can use a channel, your pear installation needs to know about it. This process is called "channel discovery".</para> <para>Once you know the project's channel url, just type:</para> <screen>$ pear channel-discover http://pear.phpunit.de Adding Channel "pear.phpunit.de" succeeded</screen> <para>Downloading a channel.xml file, you can add a channel just using that file using <command>channel-add</command>:</para> <screen>$ pear channel-add my-channel.xml....</screen> <para>Using <command>list-channels</command>, you can get an overview of known channels:</para> <screen>$ pear list-channels Registered Channels: ==================== Channel Summary components.ez.no eZ Enterprise components demochanserv.bogo Simple demo channel server gnope.org PHP-Gtk2 applications pear.chiaraquartet.net Chiara Testing Channel pear.phing.info Channel for Phing build tool releases pear.php.net PHP Extension and Application Repository pear.phpunit.de PHPUnit channel server pear.symfony-project.com symfony project PEAR channel pearified.com PEAR-Compatible Extension and Application Repository pecl.php.net PHP Extension Community Library __uri Pseudo-channel for static packages</screen> <para>More insight about a channel can be gotten with <command>channel-info</command>. It prints out a description, the channel's shortcut name (alias) as well as mirror information.</para> <screen>$ pear channel-info pear.php.net Channel pear.php.net Information: ================================= Name and Server pear.php.net Alias pear Summary PHP Extension and Application Repository....</screen> </sect2> <sect2 id="guide.users.commandline.channels.packages"> <title>Work with packages on a channel</title> <para>When installing or doing anything else with a package that is not in your <link linkend="guide.users.commandline.config.options.default_channel">default channel</link>, you need to specify the channel by full name or alias:</para> <screen>$ pear install gnope/Dev_Inspector.... installation of package "Dev_Inspector" in channel "gnope" $ pear list -c pear.phpunit.de Installed packages, channel pear.phpunit.de: ============================================ Package Version State PHPUnit 3.2.5 stable</screen> <para>General rule is that when you would specify a package name, use <literal>$channel/$packagename</literal> now. All other functions with channel support have a <literal>-c</literal> option to specify the channel name or alias.</para> </sect2> <sect2 id="guide.users.commandline.channels.passwordprotected"> <title>Password protected channels</title> <para>PEAR compatible channels can be password protected. You could use this to e.g. distribute custom proprietary software to your clients, and don't want to publicy publish those packages anywhere.</para> <para>Password protection is done via a HTTP Basic Authentication (<filename>.htaccess</filename> and <filename>.htpassword</filename> on Apache). When trying to discover such a password protected channel, you will get a message like this:</para> <screen>$ pear channel-discover pear.company.com Discovery of channel "pear.company.com" failed (channel-add: Cannot open "http://pear.company.com/channel.xml" (File http://pear.company.com:80/channel.xml not valid (received: HTTP/1.1 401 Authorization Required )))</screen> <para>In this case, download the <filename>channel.xml</filename> file manually, for example with your browser or wget. A <filename>channel.xml</filename> is always in the root directory of the channel server. After that, discover the channel with the saved file:</para> <screen>$ pear channel-add /path/to/saved/channel.xml Adding Channel "pear.company.com" succeeded</screen> <para>Now the PEAR manager needs to know about the channel's username and password. We tell him by using <command>set-config</command> in connection with the channel option:</para> <screen>$ pear config-set -c pear.company.com username johndoe config-set succeeded $ pear config-set -c pear.company.com password secret config-set succeeded</screen> <para>Now test if we did everything right by showing available packages on the channel:</para> <screen>$ pear list-all -c pear.company.com Retrieving data...0% All packages [Channel pear.company.com]: ========================== Package Latest Local comp/WorldDominator 0.8.1 Tool to dominate the world</screen> <note> <para>If you changed your creditentials, you should issue a <command>pear clear-cache</command> command to make sure that the installer does not use cached data.</para> </note> </sect2> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/commands.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/commands.xml +++ peardoc/en/guide/users/commandline/commands.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.commands"> <title>Command list</title> <para>Here's a list of commands available to the pear command line tool. Many of these commands may require root access to the server.</para> <para><informaltable> <tgroup cols="2"> <thead> <row> <entry>Command</entry> <entry>Description</entry> </row> </thead> <tbody> <row> <entry>build</entry> <entry>Build the extension from source</entry> </row> <row> <entry>bundle</entry> <entry>Download and unpack a <ulink url="&url.pecl;">PECL</ulink> extension</entry> </row> <row> <entry> <link linkend="guide.users.commandline.channels.discovery">channel-add</link> </entry> <entry>Add a Channel (PEAR 1.4+)</entry> </row> <row> <entry>channel-alias</entry> <entry>Specify an alias to a channel name (PEAR 1.4+)</entry> </row> <row> <entry>channel-delete</entry> <entry>Remove a channel from the list (PEAR 1.4+)</entry> </row> <row> <entry> <link linkend="guide.users.commandline.channels.discovery">channel-discover</link> </entry> <entry>Initialize a channel from its server name (PEAR 1.4+)</entry> </row> <row> <entry>channel-info</entry> <entry>Retrieve information on a channel (PEAR 1.4+)</entry> </row> <row> <entry>channel-update</entry> <entry>Update an existing channel (PEAR 1.4+)</entry> </row> <row> <entry>clear-cache</entry> <entry>Clear the REST/XML-RPC cache</entry> </row> <row> <entry>config-create</entry> <entry>Create a default configuration file (PEAR 1.4+)</entry> </row> <row> <entry> <link linkend="guide.users.commandline.config">config-get</link> </entry> <entry>Echo a specific configuration setting</entry> </row> <row> <entry>config-help</entry> <entry>Show information about a setting</entry> </row> <row> <entry> <link linkend="guide.users.commandline.config">config-set</link> </entry> <entry>Set a specific configuration setting value</entry> </row> <row> <entry> <link linkend="guide.users.commandline.config">config-show</link> </entry> <entry>Show all configuration setting values</entry> </row> <row> <entry>convert</entry> <entry>Convert a package.xml 1.0 format to package.xml 2.0 format (PEAR 1.4+)</entry> </row> <row> <entry>cvsdiff</entry> <entry>Execute and display a "<literal>cvs diff -u</literal>" on all files within the package</entry> </row> <row> <entry>cvstag</entry> <entry>Set a CVS release tag</entry> </row> <row> <entry> <link linkend="guide.users.commandline.installing.offline">download</link> </entry> <entry>Download a package but not install it</entry> </row> <row> <entry>download-all</entry> <entry>Downloads every available package</entry> </row> <row> <entry>info</entry> <entry>Display information about a package</entry> </row> <row> <entry> <link linkend="guide.users.commandline.installing.normal">install</link> </entry> <entry>Install a package, will report with success or failure</entry> </row> <row> <entry> <link linkend="guide.users.commandline.packageinfo.list">list</link> </entry> <entry>List installed packages</entry> </row> <row> <entry> list-all </entry> <entry>List all packages, packaged and/or available</entry> </row> <row> <entry>list-channels</entry> <entry>List available channels (PEAR 1.4+)</entry> </row> <row> <entry> <link linkend="guide.users.commandline.packageinfo.files">list-files</link> </entry> <entry>List files in an installed package (PEAR 1.4+)</entry> </row> <row> <entry>list-upgrades</entry> <entry>List available upgrades for the installed packages</entry> </row> <row> <entry>login</entry> <entry>Connects and authenticates to the remote PEAR server</entry> </row> <row> <entry>logout</entry> <entry>Logs out from the remote PEAR server</entry> </row> <row> <entry>makerpm</entry> <entry>Builds a RPM spec file from a PEAR package</entry> </row> <row> <entry>package</entry> <entry>Build a package</entry> </row> <row> <entry>package-dependencies</entry> <entry>Show package dependencies</entry> </row> <row> <entry>package-validate</entry> <entry>Validate package consistency</entry> </row> <row> <entry>remote-info</entry> <entry>Information about remote packages</entry> </row> <row> <entry>remote-list</entry> <entry>List remote packages</entry> </row> <row> <entry>run-scripts</entry> <entry>Run post-install scripts bundled with a package (PEAR 1.4+)</entry> </row> <row> <entry>run-tests</entry> <entry>Run regression tests</entry> </row> <row> <entry> <link linkend="guide.users.commandline.packageinfo.searchremote">search</link> </entry> <entry>Search the remote package database</entry> </row> <row> <entry>shell-test</entry> <entry>Do a shell script test</entry> </row> <row> <entry>sign</entry> <entry>Sign a package distribution file</entry> </row> <row> <entry>uninstall</entry> <entry>Uninstall and remove a package</entry> </row> <row> <entry>update-channels</entry> <entry>Update the channel list (PEAR 1.4+)</entry> </row> <row> <entry> <link linkend="guide.users.commandline.installing.normal">upgrade</link> </entry> <entry>Upgrade a package to the current version (see also: preferred_state)</entry> </row> <row> <entry>upgrade-all</entry> <entry>Upgrade all packages (see also: list-upgrades)</entry> </row> </tbody> </tgroup> </informaltable></para> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/config.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/config.xml +++ peardoc/en/guide/users/commandline/config.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.config"> <title>Configuring your PEAR setup</title> <para>PEAR has a number of configuration options that you can change. Getting an overview about them is as easy as issuing a</para> <screen>$ pear config-show</screen> <para>The default settings suffice for novice users, there is rarely a need to change them when getting started. You can go on with <link linkend="guide.users.commandline.installing">installing packages</link>.</para> <para>Reading single values is accomplished by using <literal>config-get</literal>. The following command will show you where all the .php files of your installed pear packages reside.</para> <screen>$ pear config-get php_dir /usr/share/pear</screen> <para>Changing a value is as easy as retrieving it:</para> <screen>$ pear config-set preferred_state beta config-set succeeded</screen> <note> <para>When changing a config setting, it does not immediately get applied to already installed packages. This is especially true when changing variables like <varname>data_dir</varname>. Use <literal>$ pear upgrade --force</literal> to reinstall all packages in such cases.</para> </note> <sect2 id="guide.users.commandline.config.options"> <title>Config options</title> <para><informaltable> <tgroup cols="3"> <thead> <row> <entry>Variable Name</entry> <entry>Description</entry> <entry>Default Value</entry> </row> </thead> <tbody> <row> <entry>bin_dir</entry> <entry>Directory where executables are installed</entry> <entry><filename>/usr/bin</filename></entry> </row> <row> <entry>doc_dir</entry> <entry>Directory where documentation is installed</entry> <entry><filename>/usr/lib/php/docs</filename></entry> </row> <row> <entry>ext_dir</entry> <entry>Directory where loadable extensions are installed</entry> <entry><filename>./</filename></entry> </row> <row> <entry>php_dir</entry> <entry>Directory where PHP files are installed (like PEAR files)</entry> <entry><filename>/usr/lib/php</filename></entry> </row> <row> <entry>cache_dir</entry> <entry>PEAR installer cache directory, and used by XMLRPC</entry> <entry><filename>/tmp/pear/cache</filename></entry> </row> <row> <entry>data_dir</entry> <entry>Directory where data files are installed</entry> <entry><filename>/usr/lib/php/data</filename></entry> </row> <row> <entry>php_bin</entry> <entry>The PHP CLI or CGI binary for executing scripts</entry> <entry><filename>/usr/bin/php</filename></entry> </row> <row> <entry>test_dir</entry> <entry>Directory where regression tests are installed</entry> <entry><filename>/usr/lib/php/tests</filename></entry> </row> <row> <entry>cache_ttk</entry> <entry>Number of seconds that the local cache is used, and not updated (Time To Kill)</entry> <entry>3600</entry> </row> <row> <entry>preferred_state</entry> <entry>Preferred package state: stable, beta, alpha, devel, or snapshot</entry> <entry>stable</entry> </row> <row> <entry>umask</entry> <entry>umask used when creating files (Unix-like systems only)</entry> <entry>22</entry> </row> <row> <entry>verbose</entry> <entry>Debug log level: 0-3 where 3 is full debug mode.</entry> <entry>1</entry> </row> <row> <entry>http_proxy</entry> <entry>The optional HTTP proxy address (host:port) used when downloading packages</entry> <entry></entry> </row> <row> <entry>remote_config</entry> <entry>Remote configuration file, used to mirror a local installation on a remote server through ftp. (PEAR 1.4+)</entry> <entry></entry> </row> <row> <entry>auto_discover</entry> <entry>Auto-discover new channels from command line or dependencies</entry> <entry>0</entry> </row> <row id="guide.users.commandline.config.options.default_channel"> <entry>default_channel</entry> <entry>Default channel (PEAR 1.4+)</entry> <entry>pear.php.net (pecl.php.net if using the pecl command)</entry> </row> <row> <entry>preferred_mirror</entry> <entry>Preferred channel mirror (PEAR 1.4+)</entry> <entry>pear.php.net (pecl.php.net if using the pecl command)</entry> </row> <row> <entry>master_server</entry> <entry>PEAR server [deprecated in PEAR 1.4+]</entry> <entry>pear.php.net</entry> </row> <row> <entry>password</entry> <entry>PEAR password (used by maintainers)</entry> <entry></entry> </row> <row> <entry>sig_bin</entry> <entry>Signature handling program</entry> <entry><filename>/sw/bin/gpg</filename></entry> </row> <row> <entry>sig_keydir</entry> <entry>Signature key directory</entry> <entry><filename>/etc/pearkeys</filename></entry> </row> <row> <entry>sig_keyid</entry> <entry>The key used for signing</entry> <entry></entry> </row> <row> <entry>sig_type</entry> <entry>Package signature type (only gpg)</entry> <entry>gpg</entry> </row> <row> <entry>username</entry> <entry>PEAR username (used by maintainers)</entry> <entry></entry> </row> </tbody> </tgroup> </informaltable></para> </sect2> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/cvsinstall.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/cvsinstall.xml +++ peardoc/en/guide/users/commandline/cvsinstall.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.cvsinstall"> <title>Installing packages from CVS</title> <para>This passage will describe how to install the latest development version of a PEAR package from CVS.</para> <para>It is NOT recommended to run a package from CVS in working environments! Because CVS versions are not regular releases, this means: <itemizedlist> <listitem> <simpara>You could get no kind of help from the maintainer or anybody other.</simpara> </listitem> <listitem> <simpara>Versions in CVS may break the upgrade mechanism of the PEAR Installer.</simpara> </listitem> </itemizedlist></para> <para>You should use a package from CVS only, if: <itemizedlist> <listitem> <simpara>The maintainer recommended it for you.</simpara> </listitem> <listitem> <simpara>You want to help in development of a package.</simpara> </listitem> <listitem> <simpara>You really need a special patch or function, which is not currently released.</simpara> </listitem> </itemizedlist></para> <para>If you still want to install a package from CVS, you have to do the same steps like a package maintainer creating a new release of a package. If you have problems following the next steps, take a look into the <link linkend="guide-developers">Developers Section</link> of the manual.</para> <orderedlist> <listitem> <para>Get the package files from CVS like described in <ulink url="&url.php.anoncvs;">&url.php.anoncvs;</ulink></para> <para>The name of the module to checkout is <filename>pear/<packagename></filename>, i.e. <command> cvs -d :pserver:cvsread@cvs.php.net:/repository checkout pear/HTTP_Client</command>.</para> </listitem> <listitem> <para>Check the <filename>package.xml</filename> file, especially the dir and file entries. They must match the existing files and directory structure. If they differ, contact the package maintainer and ask for an update of the <filename>package.xml</filename>.</para> </listitem> <listitem> <para>Create a valid package using the PEAR Installer <command>pear package <path to package.xml></command></para> </listitem> <listitem> <para>If you have already installed the package: remove it to avoid version conflicts: <command>pear uninstall <package></command></para> </listitem> <listitem> <para>Install your package archive: <command>pear install <package-file></command></para> <para>Now, you have a CVS version installed!</para> </listitem> </orderedlist> <para>You should upgrade to an official release of the package as early as possible. Before you install the official release, uninstall the CVS version to avoid version conflicts.</para> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/installing.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/installing.xml +++ peardoc/en/guide/users/commandline/installing.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.installing"> <title>Installing packages</title> <para>After getting PEAR working on your machine (see <link linkend="installation">Installation</link>) you most likely want to install some packages. This guide shows people new to the PEAR command line installer how to get started.</para> <sect2 id="guide.users.commandline.installing.normal"> <title>Normal installation procedure</title> <para>The general command to install a PEAR package named "foo" is</para> <screen>$ pear install foo</screen> <para>Typing this and pressing return, the package will be downloaded and installed on your computer. It does not matter if you write the package name in lowercase, UPPERCASE or MixedCase - the installer will find the package by lowercasing the name.</para> <para>When a package is already installed, you will get the following message:</para> <screen>$ pear install foo Ignoring installed package pear/foo Nothing to install</screen> <para>This happens even if there is a newer version of the package! The correct command to upgrade to the lastest version is</para> <screen>$ pear upgrade foo upgrade ok: channel://pear.php.net/Foo-1.2.3</screen> <para>If the package already has the lastest version, you will get a message similar to the following:</para> <screen>Ignoring installed package pear/Foo Nothing to upgrade</screen> <para>In the case you deleted some file and really really want to re-install the package, you have two choices:</para> <itemizedlist> <listitem> <para>Uninstall the package, and reinstall it afterwards</para> </listitem> <listitem> <para>Force the installation</para> </listitem> </itemizedlist> <para>Forcing an command should only be done when you absolutely know what you are doing - you might in some circumstances break PEAR otherwise. Forcing something should always be the last option.</para> <screen>$ pear install -f foo $ pear upgrade -f foo</screen> </sect2> <sect2 id="guide.users.commandline.installing.unstable"> <title>Unstable alpha/beta packages</title> <para>Now and then, you will get error messages like</para> <screen>Failed to download pear/foo within preferred state "stable", latest release is version 0.1.2, stability "beta", use "channel://pear.php.net/foo-0.1.2" to install Cannot initialize 'channel://pear.php.net/foo', invalid or missing package file Package "channel://pear.php.net/foo" is not valid install failed</screen> <para>Reason for this is that PEAR by default installs stable packages only. When a package is in state <emphasis>devel</emphasis>, <emphasis>alpha</emphasis> or <emphasis>beta</emphasis> it will refuse to install them. You can easily persuade it by adding either the version number or the stability you are willing to accept:</para> <screen>$ pear install Foo-beta $ pear install Foo-alpha</screen> <para>You can also install a specific version, or upgrade to a specific version regardless of the state:</para> <screen>$ pear install Foo-1.2.3 $ pear upgrade Foo-1.2.3</screen> <sect3 id="guide.users.commandline.installing.unstable.edge"> <title>Living on the edge</title> <para>If you don't care about stability and don't want to specify the <literal>-alpha</literal> or <literal>-beta</literal> suffix everytime, you can change the global stability config option:</para> <screen>$ pear config-set preferred_state alpha config-set succeeded</screen> <para>You can switch between the following stability states (sorted by stability):</para> <itemizedlist> <listitem> <para>stable</para> </listitem> <listitem> <para>beta</para> </listitem> <listitem> <para>alpha</para> </listitem> <listitem> <para>devel</para> </listitem> </itemizedlist> </sect3> </sect2> <sect2 id="guide.users.commandline.installing.dependencies"> <title>Dependencies</title> <para>A package often requires other packages to be installed to function correctly. Such a relation is called a dependency. The PEAR installer has full support for dependencies; it can automatically install required and/or optional dependencies if you wish so.</para> <para>If you try to install a package with required dependencies, you will get an error that the installation failed. Looking deeper and actually reading the messages shows you that the package needs dependencies that are not installed on your system:</para> <screen>$ pear install html_page2 Did not download dependencies: pear/HTML_Common, use --alldeps or --onlyreqdeps to download automatically pear/HTML_Page2 requires package "pear/HTML_Common" (version >= 1.2) No valid packages found install failed</screen> <para>You have several choices:</para> <itemizedlist> <listitem> <para>Install dependent packages by hand</para> </listitem> <listitem> <para>Let PEAR automatically install necessary dependencies only</para> </listitem> <listitem> <para>Let PEAR automatically install necessary and optional dependencies</para> </listitem> </itemizedlist> <para>The first method can be a painful and daunting process, because dependent packages itself can have dependencies.</para> <para>Both other methods just require a switch to the install command, either <literal>--onlyreqdeps</literal> (install required dependencies only) or <literal>--alldeps</literal> (install all dependencies).</para> <screen>$ pear install --onlyreqdeps html_page2 WARNING: "pear/HTML_Common" is deprecated in favor of "pear/HTML_Common2" downloading HTML_Page2-0.5.0beta.tgz ... Starting to download HTML_Page2-0.5.0beta.tgz (15,467 bytes).......done: 15,467 bytes downloading HTML_Common-1.2.4.tgz ... Starting to download HTML_Common-1.2.4.tgz (4,519 bytes)....done: 4,519 bytes install ok: channel://pear.php.net/HTML_Common-1.2.4 install ok: channel://pear.php.net/HTML_Page2-0.5.0beta</screen> </sect2> <sect2 id="guide.users.commandline.installing.offline"> <title>Offline installation</title> <para>You can download individual packages for e.g. offline installation on a second machine just as you would install or upgrade a package:</para> <screen>$ pear download Foo</screen> <para>After downloading, you will have a file like <filename>Foo-1.2.3.tgz</filename> if the latest version of <classname>Foo</classname> was <literal>1.2.3</literal>. Installing it is as easy as typing</para> <screen>$ pear install Foo-1.2.3.tgz</screen> </sect2> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/manualinstallation.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/manualinstallation.xml +++ peardoc/en/guide/users/commandline/manualinstallation.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.manualinstallation"> <title>Manual package installation</title> <warning> <para>We removed this section, because, today, manually installing a package requires a deeper understanding of the way how packages are organized and what happens during the installation process. You should read the section about the <filename>package.xml</filename> in the Developers Guide (<xref linkend="developers.packagedef" /> and <xref linkend="guide.developers.package2" />), if you really want install a package without the PEAR installer.</para> <para>If you want to install PEAR on a remote host without shell access, you should look into <xref linkend="installation.shared" />.</para> </warning> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/packageinfo.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/packageinfo.xml +++ peardoc/en/guide/users/commandline/packageinfo.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.packageinfo"> <title>Getting information about packages</title> <sect2 id="guide.users.commandline.packageinfo.info"> <title>Package information</title> <para>If you simply want to get to know the installed version of a package or see its description, issue an <command>info</command> command:</para> <screen>$ pear info PEAR About pear.php.net/PEAR-1.7.1... more info follows ..</screen> </sect2> <sect2 id="guide.users.commandline.packageinfo.files"> <title>Package files</title> <para>You often don't know which files belong to a certain installed package. <command>list-files</command> is helping you here. It shows you the file's role and its full path:</para> <screen>$ pear list-files log Installed Files For log ======================= Type Install Path doc /usr/share/pear/docs/Log/docs/guide.txt.... php /usr/share/pear/Log/composite.php php /usr/share/pear/Log/console.php.... data /usr/share/pear/data/Log/misc/log.sql test /usr/share/pear/tests/Log/tests/composite.phpt.... php /usr/share/pear/Log.php</screen> </sect2> <sect2 id="guide.users.commandline.packageinfo.examples"> <title>Package examples</title> <para>While we try to document each package in the manual, many packages - with or without a manual entry - come with examples. They have the file role "<literal>doc</literal>" and can be located with <command>list-files</command>, too:</para> <screen>$ pear list-files log | grep ^doc doc /usr/share/pear/docs/Log/docs/guide.txt doc /usr/share/pear/docs/Log/examples/composite.php doc /usr/share/pear/docs/Log/examples/console.php doc /usr/share/pear/docs/Log/examples/display.php doc /usr/share/pear/docs/Log/examples/error_log.php doc /usr/share/pear/docs/Log/examples/file.php doc /usr/share/pear/docs/Log/examples/firebug.php....</screen> </sect2> <sect2 id="guide.users.commandline.packageinfo.list"> <title>List all packages</title> <para><command>list</command> shows you all installed packages with their version and stability:</para> <screen>$ pear list Installed packages, channel pear.php.net: ========================================= Package Version State Archive_Tar 1.3.2 stable Auth 1.5.4 stable Cache 1.5.4 stable Console_Getargs 1.3.4 stable Console_Getopt 1.2.3 stable....</screen> <para>To see all available packages on the channel server, use <command>remote-list</command>:</para> <screen>$ pear remote-list.... output follows ...</screen> <note> <para>This command takes some time if there are many packages on the server</para> </note> </sect2> <sect2 id="guide.users.commandline.packageinfo.searchremote"> <title>Search remote packages</title> <para>Instead of going to the PEAR website, you can use the pear installer to search for package names.</para> <screen>$ pear search w3c Retrieving data...0%. Matched packages, channel pear.php.net: ======================================= Package Stable/(Latest) Local Services_W3C_CSSValidator 0.1.0 (alpha) An Object Oriented Interface ...</screen> <para>The result list shows name, remote version and stability and the package description. Alternatively, you can use the <ulink url="&url.pear.package.browse;">package browser</ulink> on pear.php.net.</para> </sect2> </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/commandline/pecl.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/commandline/pecl.xml +++ peardoc/en/guide/users/commandline/pecl.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="guide.users.commandline.pecl"> <title>Installing PECL packages</title> <para>The procedure of installing PECL packages is described in the <ulink url="&url.php.manual.peclinstall;">pecl manual section</ulink> on the PHP website.</para> </sect1>