配置wget代理
在迁移Java应用包的过程中,若应用包转换失败,需要执行脚本获取相关依赖。值得注意的是,脚本执行必须在联网环境下,为了确保网络连接正常,可以通过设置代理服务器的方式来配置网络环境。
操作步骤
- 使用SSH远程登录工具,以root用户登录所属节点(即Agent节点)。
- 配置“/etc/wgetrc”文件。
vi /etc/wgetrc
- 按“i”进入编辑模式,配置以下选项。
# You can set the default proxies for Wget to use for http, https, and ftp. # They will override the value in the environment. https_proxy = http://ip:port http_proxy = http://ip:port ftp_proxy = http://ip:port # If you do not want to use proxy at all, set this to off. use_proxy = on
- “ip:port”表示代理服务器的IP地址和端口号。
- use_proxy设置为on,则表示开启了代理。
- 按“Esc”键退出编辑模式,输入:wq!,按“Enter”键保存并退出文件。
父主题: 常用操作