远方的灯塔 - 专注于服务端技术分享 远方的灯塔 - 专注于服务端技术分享
首页
  • Java SE
  • Struts2
  • Hibernate
  • MyBatis
  • JAX-WS
  • 并发
  • 分布式
  • Git
  • 文章分类
  • 文章标签
  • 文章归档
  • 《C程序设计语言》
心情随笔
友情链接
给我留言 (opens new window)
关于我
GitHub (opens new window)

Terwer Green

一个后端老菜鸟
首页
  • Java SE
  • Struts2
  • Hibernate
  • MyBatis
  • JAX-WS
  • 并发
  • 分布式
  • Git
  • 文章分类
  • 文章标签
  • 文章归档
  • 《C程序设计语言》
心情随笔
友情链接
给我留言 (opens new window)
关于我
GitHub (opens new window)
  • JavaSE

  • 开源框架

  • Linux

    • Paralle_Desktop安装CentOS7
    • CentOS7基本配置
      • 设置中科大源
      • 安装开发工具包、系统软件
      • 安装开发工具
      • 安装Vim等工具
      • 安装zsh
      • 安装on-my-zsh
      • 参考
    • CentOS7安装与配置MySQL
  • Struts2

  • Hibernate

  • Webservice

  • 分布式

  • 分布式框架

  • 后端开发
  • Linux
terwer
2022-09-30
目录

CentOS7基本配置

# 设置中科大源

注意:需要先切换root用户

su -
1
# ===================================
# 镜像源设置开始
# ===================================
# 添加中科大centos7镜像源
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak \
    && sed -e 's|^mirrorlist=|#mirrorlist=|g' \
         -e 's|^#baseurl=http://mirror.centos.org/centos|baseurl=https://mirrors.ustc.edu.cn/centos|g' \
         -i.bak \
         /etc/yum.repos.d/CentOS-Base.repo

yum makecache \
    && yum clean all
1
2
3
4
5
6
7
8
9
10
11
12

# 安装开发工具包、系统软件

# 安装epel源
yum install epel-release -y

# 安装DNF
yum install dnf -y
# 安装dnf插件及neofetch
dnf install dnf-plugins-core -y
dnf copr enable konimex/neofetch -y
dnf install neofetch -y
1
2
3
4
5
6
7
8
9

# 安装开发工具

# 安装开发工具
dnf groupinstall "Development Tools" -y

# dnf groupinstall "X Window System" -y \
#     && dnf groupinstall xfce -y \
#     && dnf install pixman pixman-devel libXfont -y

# 升级git2
dnf install \
    https://repo.ius.io/ius-release-el7.rpm \
    https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
    -y
dnf remove git -y
dnf install git236 -y
1
2
3
4
5
6
7
8
9
10
11
12
13
14

# 安装Vim等工具

# 安装其他工具包
dnf install sudo \
    vim \
    net-tools \
    wget \
    -y
1
2
3
4
5
6

# 安装zsh

 dnf install zsh -y
1

# 安装on-my-zsh

# 给root用户安装oh-my-zsh
git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh \
    && cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
    && git clone https://gitee.com/playerfs/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \
    && git clone https://gitee.com/playerfs/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting \
    && sed -i 's/^plugins=(/plugins=(zsh-autosuggestions zsh-syntax-highlighting /' ~/.zshrc \
    && chsh -s /bin/zsh

# 为普通用户再安装一次oh-my-zsh
git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh \
    && cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
    && git clone https://gitee.com/playerfs/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \
    && git clone https://gitee.com/playerfs/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting \
    && sed -i 's/^plugins=(/plugins=(zsh-autosuggestions zsh-syntax-highlighting /' ~/.zshrc
# 添加自定义环境变量
echo "source ~/my_profile.sh" >> ~/.zshrc
chsh -s /bin/zsh

vim ~/my_profile.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

‍

# 参考

https://github.com/terwer/portable-centos-7-workstation/blob/main/centos-7-vnc/Dockerfile (opens new window)

‍

编辑 (opens new window)
#中科大#软件源#mirror#install#zsh
上次更新: 2023/02/22, 13:47:25
Paralle_Desktop安装CentOS7
CentOS7安装与配置MySQL

← Paralle_Desktop安装CentOS7 CentOS7安装与配置MySQL→

最近更新
01
解决css部分border被圆角切掉之后圆角的边框消失问题
03-18
02
使用TypeScript开发一个自定义的Node-js前端开发脚手架
03-08
03
Github-Actions使用release-please实现自动发版
03-06
更多文章>
Theme by Vdoing | Copyright © 2011-2023 Terwer Green | MIT License | 粤ICP备2022020721号-1 | 百度统计
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式