PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

install - install a package | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

install - install a package

Introduction

The install command is used to install packages and accepts a list of package names to install as arguments. Unlike upgrade, the install command will only install new packages.

Install recognizes several different ways of specifying a package:

Ways of specifying a package for installation
Package type Local/Remote Example
package.xml file Local php pyrus.phar install /path/to/package.xml
Package release archive Local php pyrus.phar install /path/to/PackageName-1.2.3.tgz
Static url Remote php pyrus.phar install http://example.com/PackageName-1.2.3.tgz
Abstract package Remote php pyrus.phar install PackageName

Abstract Packages are documented here.

--optionaldeps

By default, required package dependencies are also installed. To also automatically install optional dependencies (not dependency groups, but dependencies specified using the <optional> tag in package.xml), pass the -o or --optionaldeps option to the install command:

php pyrus.phar install -o PackageName

--plugin

Plugins (documented here) must be explicitly installed with the -p or --plugin option. Plugins are installed into the location specified by the plugins_dir configuration variable, which defaults to the same location that the user configuration file is located ($HOME/.pear in unix, <My Documents>\pear on windows).

php pyrus.phar install -p PEAR2_Pyrus_Developer

--packagingroot

Developers packaging RPMs or other forms of distribution for OS vendors should use the -r or --packagingroot option to install a package into a subdirectory for creating the RPM.

php pyrus.phar install -r /home/myuser/package PackageName

For the example above, if the default Pyrus installation is in /usr/local/lib/pear, all files will be installed into /home/myuser/package/usr/local/lib/pear. Another way of understanding this is that the packagingroot option instructs Pyrus to treat /home/myuser/package as if it were the root directory /.

Developers packaging RPMs or other forms of distribution for OS vendors should use the -r or --packagingroot option to install a package into a subdirectory for creating the RPM.

php pyrus.phar install -r /home/myuser/package PackageName

--force

The --force or -f option can be used to force installation if there are errors. For instance, this can be used to override problems in dependency validation, or to force installation of a package that is not stable enough. As such, it should be used sparingly if at all. Better is to request a specific version for installation.

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「install - install a package」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | install - install a package」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: