In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Sometimes, we can not connect to the external network directly, we may need to connect to the proxy server in order to access the external network, install the software package and upgrade the program. At this time, we need to configure some proxy settings to ensure that the network is normal.
I. Global server environment variables
Set the global proxy as follows:
Modify the / etc/profile file to add the following:
Http_proxy= http://username:password@yourproxy:8080/ftp_proxy=http://username:password@yourproxy:8080/export http_proxyexport ftp_proxy
If there is no password limit, the above can be modified to:
Http_proxy= http://yourproxy:8080/ftp_proxy=http://yourproxy:8080/export http_proxyexport ftp_proxy
If it is only for a user, modify the ~ / .bash_profile file to add the same content
After the modification is completed, log out and log back in.
II. Yum proxy settings
Open the yum configuration file with a vi editor, in general: vi / etc/yum.conf
After opening the configuration file of yum, add the protocol, address and port of the proxy server at the end of the file, and the user name and password of the authenticated user if the proxy server requires user authentication.
Proxy server does not require authentication: plus proxy= protocol: / / proxy server address: Port (e.g. proxy= http://192.168.1.1:80)
The proxy server needs to authenticate the user: plus proxy= protocol: / / proxy server address: Port (e.g. proxy= http://192.168.1.1:80)
Proxy_username= proxy server username proxy_password= proxy server password
After saving and exiting, you can easily install the software using yum.
3. Git proxy settings git config-- global https.proxy https://proxyuser:proxypassword@ip/ domain name: portgit config-- global http.proxy http://proxyuser:proxypassword@ip/ domain name: port
Example:
Suppose someone works for Baidu, the company proxy server is (proxy.baidu.com), the port is (8080), and the agent configuration is as follows
1. Authentication configuration is required for proxy server
Git config-- global https.proxy https://username:password@proxy.baidu.com:8080
2. The proxy server does not need authentication configuration.
Git config-- global https.proxy https://proxy.baidu.com:8080
4. Some special characters in the agent configuration
If there are special characters such as @ in the password, there will be an error, such as
Git config-- global http.proxy http://username:abc@123@proxy.baidu.com:8080
When parsing, it will parse from the first @, prompting @ 123@proxyhk.huawei.com to find it. At this time, you need to deal with the special symbols in it, and use percentage encoding (Percent-encoding) to convert and convert the special characters.
The list is as follows:
!-- >% 21 #-- >% 23 $- >% 24 &->% 26'- >% 27 (-->% 28)-- >% 29 *->% 2A +->% 2B,-- >% 2C/-- >% 2F:-- >% 3A -- >% 3B =-- >% 3D?-- >% 3F@-- >% 40 [-->% 5B]-- >% 5D
For example: agent account: admin
Agent password: abc@123br/ > Agent account: admin
Agent password: abc@123
Proxy server: http://172.31.101.102:8080
When performing a global proxy, you need to configure as follows
Http://admin:abc%40123@172.31.101.120:8080
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.