Configuring a Proxy for Wget
During system migration, you may need to access the Internet to obtain resource files, such as the target component packages of the database and middleware, or run scripts to obtain dependencies when the application package fails to be converted. To ensure normal network connection, you can prepare the network environment by setting a proxy server.
Procedure
- Use an SSH tool to remotely log in to the target node as the root user.
For source package migration, you need to configure a proxy on the server (DevKit installation node) to download Vastbase-transform.jar. In other scenarios, you need to configure a proxy on the agent (migration project node).
- Open the /etc/wgetrc file.
vi /etc/wgetrc
- Press i to enter the insert mode and set the following configuration items:
# 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 indicates the IP address and port of the proxy server.
- Set use_proxy to on to enable the proxy function.
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- After the configuration is complete, check whether the Internet is connected. The following uses nginx-1.24.0.tar.gz as an example.
wget https://mirrors.huaweicloud.com/kunpeng/archive/Kunpeng_Middleware/nginx-1.24.0.tar.gz
The Internet is reachable if the following information is displayed:
--2025-06-05 19:32:39-- https://mirrors.huaweicloud.com/kunpeng/archive/Kunpeng_Middleware/nginx-1.24.0.tar.gz Connecting to xx.xx.xx.xx:20122... connected. Proxy request sent, awaiting response... 200 OK Length: 4825268 (4.6M) [application/octet-stream] Saving to: 'nginx-1.24.0.tar.gz' nginx-1.24.0.tar.gz 100%[======================================================>] 4.60M 5.72MB/s in 0.8s 2025-06-05 19:32:41 (5.72 MB/s) - 'nginx-1.24.0.tar.gz' saved [4825268/4825268]
Parent topic: Configuration Before Using the Tool