CentOS中设置系统级代理
- font size decrease font size increase font size
YUM代理设置
编辑/etc/yum.conf,在最后加入
# Proxy
proxy=http://username:password@proxy_ip:port/
也可以使用proxy_username和proxy_password来配置代理的用户名和密码
这样的配置完成后,所有的用户在使用yum时,都会使用代理,可以说是全局代理。
如果需要为单独的用户配置代理,可以在用户的~/.bash_profile中设置。
Wget的代理设置
编辑/etc/wgetrc,在最后加入
# Proxy
http_proxy=http://username:password@proxy_ip:port/
ftp_proxy=http://username:password@proxy_ip:port/
系统全局代理
如果需要为某个用户设置一个系统级的代理,可以在~/.bash_profile中设置:
http_proxy="http://username:password@proxy_ip:port"
export_http_proxy
上面的设置只对某个用户生效,如果要对所有系统用户生效,写在/etc/profile中就可以了。
( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 415968 | {main}( ) | .../index.php:0 |
2 | 0.1630 | 4721336 | Joomla\CMS\Application\SiteApplication->execute( ) | .../index.php:49 |
3 | 0.1630 | 4721336 | Joomla\CMS\Application\SiteApplication->doExecute( ) | .../CMSApplication.php:196 |
4 | 0.4812 | 12449648 | Joomla\CMS\Application\SiteApplication->dispatch( ) | .../SiteApplication.php:233 |
5 | 0.4818 | 12474168 | Joomla\CMS\Component\ComponentHelper::renderComponent( ) | .../SiteApplication.php:194 |
6 | 0.4928 | 12529496 | Joomla\CMS\Component\ComponentHelper::executeComponent( ) | .../ComponentHelper.php:377 |
7 | 0.4932 | 12558320 | require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ) | .../ComponentHelper.php:402 |
8 | 0.5007 | 12993728 | K2ControllerItem->execute( ) | .../k2.php:64 |
9 | 0.5007 | 12993728 | K2ControllerItem->display( ) | .../BaseController.php:710 |
10 | 0.5236 | 13718928 | K2ControllerItem->display( ) | .../item.php:78 |
11 | 0.5236 | 13718928 | K2ControllerItem->display( ) | .../controller.php:19 |
12 | 0.5387 | 14115296 | Joomla\CMS\Cache\Controller\ViewController->get( ) | .../BaseController.php:663 |
13 | 0.5521 | 14135664 | K2ViewItem->display( ) | .../ViewController.php:102 |
14 | 0.6273 | 17082072 | K2ViewItem->display( ) | .../view.html.php:742 |
15 | 0.6273 | 17082072 | K2ViewItem->loadTemplate( ) | .../HtmlView.php:230 |
16 | 0.6297 | 17262272 | include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ) | .../HtmlView.php:701 |
- Published in CentOS 6
- Read 2470 times
( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0002 | 415968 | {main}( ) | .../index.php:0 |
2 | 0.1630 | 4721336 | Joomla\CMS\Application\SiteApplication->execute( ) | .../index.php:49 |
3 | 0.1630 | 4721336 | Joomla\CMS\Application\SiteApplication->doExecute( ) | .../CMSApplication.php:196 |
4 | 0.4812 | 12449648 | Joomla\CMS\Application\SiteApplication->dispatch( ) | .../SiteApplication.php:233 |
5 | 0.4818 | 12474168 | Joomla\CMS\Component\ComponentHelper::renderComponent( ) | .../SiteApplication.php:194 |
6 | 0.4928 | 12529496 | Joomla\CMS\Component\ComponentHelper::executeComponent( ) | .../ComponentHelper.php:377 |
7 | 0.4932 | 12558320 | require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ) | .../ComponentHelper.php:402 |
8 | 0.5007 | 12993728 | K2ControllerItem->execute( ) | .../k2.php:64 |
9 | 0.5007 | 12993728 | K2ControllerItem->display( ) | .../BaseController.php:710 |
10 | 0.5236 | 13718928 | K2ControllerItem->display( ) | .../item.php:78 |
11 | 0.5236 | 13718928 | K2ControllerItem->display( ) | .../controller.php:19 |
12 | 0.5387 | 14115296 | Joomla\CMS\Cache\Controller\ViewController->get( ) | .../BaseController.php:663 |
13 | 0.5521 | 14135664 | K2ViewItem->display( ) | .../ViewController.php:102 |
14 | 0.6273 | 17082072 | K2ViewItem->display( ) | .../view.html.php:742 |
15 | 0.6273 | 17082072 | K2ViewItem->loadTemplate( ) | .../HtmlView.php:230 |
16 | 0.6297 | 17262272 | include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ) | .../HtmlView.php:701 |