安装好CentOS系统之后,我们需要对环境进行一些基本的配置,让Linux更好用

写在前面

注意:本文章是针对arm32CentOS7进行配置的,其他系统或不同架构不要尝试。

配置yum镜像源

1、首先让我们切换到root

su root

2、进入配置文件所在目录

cd /etc/yum.repos.d/

3、以防万一先备份,其实没必要

mv CentOS-Base.repo CentOS-Base.repo.bak

4、使用vi命令编辑CentOS-Base.repo文件

vi CentOS-Base.repo

替换为下面的内容

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/os/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 #released updates
[updates]
name=CentOS-$releasever - Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/updates/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/extras/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32

5、设置缓存,并更新镜像配置

yum makecache

yum -y update

安装 wget 命令

1、yum安装

yum -y install wget

2、rpm安装

wgetrpm包下载:点击下载

推荐Package镜像地址:http://mirrors.nju.edu.cn/centos-altarch/7/os/aarch64/Packages/

可以将rpm包放到挂载的目录,在系统中用mv移动工作目录

mv /mnt/linux-share/wget-1.14-18.el7_6.1.aarch64.rpm /home/sw-code/ # 注意自己的

安装rpm

rpm ivh wget-1.14-18.el7_6.1.aarch64.rpm

安装 lsof 命令

1、安装

yum -y install lsof

2、使用lsof查看端口占用情况

lsof -i tcp:80

可能用到的命令

1、top显示当前系统正在执行的进程的相关信息,包括进程ID、内存占用率、CPU占用率等

top

2、查看分区和磁盘

lsblk

3、查看空间使用情况

df -h

4、查看内存大小

free -h

最新文章

  1. ThinkPHP中的快捷函数小结
  2. tab_切换
  3. php email邮箱正则验证
  4. Delphi调用约定
  5. zw版【转发·台湾nvp系列Delphi例程】HALCON CropPart
  6. 0c-41-ARC下循环引用问题
  7. MySQL基础学习之触发器
  8. Unity 通过Animation实现控件位置的转换
  9. id 自增------删除数据后恢复到删除前自增id
  10. Android 6.0 双向通话自动录音
  11. forEach循环
  12. 在CentOS下面安装hue时报的错
  13. jconsole 连接 wildfly 10 监控
  14. Linux 用top命令查看CPU和内存使用情况
  15. 深入浅出TCP/IP协议
  16. python之路——3
  17. Flex学习笔记--多层菜单按钮
  18. Cocos2d-x-Lua演示样例项目HelloLua
  19. 使用maven-shade-plugin插件解决spark依赖冲突问题
  20. C语言中的循环语句练习

热门文章

  1. Docker Swarm(十)Portainer 集群可视化管理
  2. Linux进阶之软件管理
  3. 电路调试检测维修总结积累 20181015 板子:3060-A
  4. STM32电路设计注意
  5. clickhouse_各个引擎表的特点
  6. GO语言常用标准库04---flag读取命令行参数
  7. css——圣杯布局
  8. Python分析离散心率信号(上)
  9. 深入理解ES8的新特性SharedArrayBuffer
  10. Spring Cloud04: RestTemplate的使用