Pecl Pear 设置代理

就算终端设置了代理, pecl也依然不会走这个代理, 需要给配置里写上

#查看设置
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/[email protected]/bin
PEAR documentation directory   doc_dir          /usr/local/share/[email protected]/doc
PHP extension directory        ext_dir          /usr/local/lib/php/pecl/20160303
PEAR directory                 php_dir          /usr/local/share/[email protected]
PEAR Installer cache directory cache_dir        /tmp/pear/cache
PEAR configuration file        cfg_dir          /usr/local/share/[email protected]/cfg
directory
PEAR data directory            data_dir         /usr/local/share/[email protected]/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/[email protected]/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/[email protected]/test
PEAR www files directory       www_dir          /usr/local/share/[email protected]/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架设

猜你喜欢

转载自my.oschina.net/u/130139/blog/1808860