Pecl Pear 設置代理

就算終端設置了代理, pecl也依然不會走這個代理, 須要給配置裏寫上php

#查看設置
pecl config-show
pear config-show
#修改設置
pecl config-set
pear config-set
➜  Cellar pecl config-show
Configuration (channel pecl.php.net):
=====================================
Auto-discover new Channels     auto_discover    <not set>
Default Channel                default_channel  pecl.php.net
HTTP Proxy Server Address      http_proxy       127.0.0.1:1087
PEAR server [DEPRECATED]       master_server    pear.php.net
Default Channel Mirror         preferred_mirror pecl.php.net
Remote Configuration File      remote_config    <not set>
PEAR executables directory     bin_dir          /usr/local/opt/php@7.1/bin
PEAR documentation directory   doc_dir          /usr/local/share/pear@7.1/doc
PHP extension directory        ext_dir          /usr/local/lib/php/pecl/20160303
PEAR directory                 php_dir          /usr/local/share/pear@7.1
PEAR Installer cache directory cache_dir        /tmp/pear/cache
PEAR configuration file        cfg_dir          /usr/local/share/pear@7.1/cfg
directory
PEAR data directory            data_dir         /usr/local/share/pear@7.1/data
PEAR Installer download        download_dir     /tmp/pear/download
directory
Systems manpage files          man_dir          /usr/local/share/man
directory
PEAR metadata directory        metadata_dir     <not set>
PHP CLI/CGI binary             php_bin          /usr/local/opt/php@7.1/bin/php
php.ini location               php_ini          /usr/local/etc/php/7.1/php.ini
--program-prefix passed to     php_prefix       <not set>
PHP's ./configure
--program-suffix passed to     php_suffix       <not set>
PHP's ./configure
PEAR Installer temp directory  temp_dir         /tmp/pear/temp
PEAR test directory            test_dir         /usr/local/share/pear@7.1/test
PEAR www files directory       www_dir          /usr/local/share/pear@7.1/htdocs
Cache TimeToLive               cache_ttl        3600
Preferred Package State        preferred_state  stable
Unix file mask                 umask            22
Debug Log Level                verbose          1
PEAR password (for             password         <not set>
maintainers)
Signature Handling Program     sig_bin          /usr/local/bin/gpg
Signature Key Directory        sig_keydir       /usr/local/etc/php/7.1/pearkeys
Signature Key Id               sig_keyid        <not set>
Package Signature Type         sig_type         gpg
PEAR username (for             username         <not set>
maintainers)
User Configuration File        Filename         /Users/seven/.pearrc
System Configuration File      Filename         /usr/local/etc/php/7.1/pear.conf

 設置代理服務器

# 127.0.0.1:1087 是我本地的http代理
pear config-set http_proxy 127.0.0.1:1087
pecl config-set http_proxy 127.0.0.1:1087

怎麼架設代理服務器, 請參考 ssr架設.net

相關文章
相關標籤/搜索