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

Introduction: it's simple | JavaScript入門&応用&リファレンスなら「JavaScriptist」


Introduction: it's simple

Installing Pyrus is much simpler than installing PEAR. Installing PEAR requires downloading a separate installation and installing PEAR before you can use it to install any packages.

To install pyrus, you must follow two simple steps:

  1. Install PHP 5.3.1 or newer. Pyrus needs the phar, simplexml, libxml2, spl and pcre extensions in order to work. Fortunately, these are all enabled by default in PHP 5.3.

  2. download pyrus.phar from the website front page

That's it, pyrus has no external dependencies. Using Pyrus is also simple, one simply passes it to the command-line interface (CLI) like so:

php pyrus.phar install packagename

The first time pyrus is run on your system, it will ask where you would like to install packages. After this, one can simply use it.

To match PEAR, it is also possible to create a convenience script for accessing pyrus. Here is a sample script for unix systems:

/usr/local/bin/php -dphar.readonly=0 /home/username/pyrus.phar $*

If your system has open_basedir enabled, the script should instead look like:

/usr/local/bin/php -dphar.readonly=0 -dopen_basedir= -dsafe_mode= /home/username/pyrus.phar $*

Windows users can create a batch file similar to the unix script named pyrus.bat:

C:\php5\php -dphar.readonly=0 -dopen_basedir= -dsafe_mode= C:\php5\pyrus.phar %*

Place the shell script (on unix) or batch file (on windows) in your path, and then you can run commands like so:

pyrus install packagename


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