---
title: 配置网络代理
description: "部署MariaDB过程中需要连接外网。如果环境无法访问外网，需要配置网络代理；如果环境可以访问外网，则请跳过本章节。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdbs/ecosystemEnable/MariaDB/openmind_mariadb1039_02_0004.html
sourcePath: /source/zh/kunpengdbs/ecosystemEnable/MariaDB/openmind_mariadb1039_02_0004.html
indexId: 8cffca3035103617475f820803efe0b154cf69fbb896527c4f974746ba43eb8779
---
# 配置网络代理

部署MariaDB过程中需要连接外网。如果环境无法访问外网，需要配置网络代理；如果环境可以访问外网，则请跳过本章节。

1. 使用curl命令访问任意网站，若能显示网站信息则表示代理配置成功，可以访问外网。
2. 修改profile文件。

  a. 打开“/etc/profile”文件。
    1 vim /etc/profile

  b. 按“i”进入编辑模式，在“/etc/profile”文件中增加以下内容。用户名、密码、代理IP地址和代理端口等信息，请根据实际情况填写。
    1 2 3 export http_proxy="http://用户名:密码@代理IP地址:代理端口" export https_proxy=$http_proxy export no_proxy=127.0.0.1,.huawei.com,localhost,local,.local

  c. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
  d. 使代理生效。
    1 source /etc/profile

3. 使用curl命令访问任意网站，若能显示网站信息则表示代理配置成功，可以访问外网。
