CentOS 基本操作

开启网络功能

  1. 修改网卡配置文件
sed -i 's/ONBOOT=no/ONBOOT=yes/g' /etc/sysconfig/network-scripts/ifcfg-ens33
  1. 重启网络服务
service network restart

配置 yum 代理

  1. 修改配置文件
echo "proxy=http://127.0.0.1:1080" >> /etc/yum.conf
  1. 清除缓存
yum clean all

rm -rf /var/cache/yum/*
  1. 缓存软件仓库
yum makecache

安装 docker

  1. 安装 yum 工具
yum install -y yum-utils
  1. 添加软件源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
  1. 安装最新版 docker
yum install docker-ce docker-ce-cli containerd.io
  1. 配置 docker 代理
mkdir -p /etc/systemd/system/docker.service.d

echo -e "[Service]\nEnvironment=\"HTTPS_PROXY=http://127.0.0.1:1080/\"" > /etc/systemd/system/docker.service.d/http-proxy.conf
  1. 重启 docker
systemctl restart docker
  1. docker 开机自启
systemctl enable docker

安装 neofetch

  1. 安装 epel-release
yum install epel-release
  1. 添加软件源
curl -o /etc/yum.repos.d/konimex-neofetch-epel-7.repo https://copr.fedorainfracloud.org/coprs/konimex/neofetch/repo/epel-7/konimex-neofetch-epel-7.repo
  1. 使用包管理器安装 neofetch
yum install neofetch

安装 git

  1. 安装 git
yum install git
  1. 配置用户信息
git config --global user.name "username"

git config --global user.email useremail@qq.com 
  1. 配置 git 代理
git config --global http.proxy 'socks5://127.0.0.1:1080'

git config --global https.proxy 'socks5://127.0.0.1:1080'

安装 ffmpeg

  1. 安装 yum 工具
yum install -y yum-utils
  1. 安装 epel-release
yum install epel-release
  1. 添加软件源
# 首选
yum-config-manager --add-repo=https://negativo17.org/repos/epel-multimedia.repo

# 备用
yum install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
  1. 安装 ffmpeg4.4
yum install ffmpeg

安装 php

  1. 安装 yum 工具
yum install -y yum-utils
  1. 安装 epel-release
yum install epel-release
  1. 添加软件源
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
  1. 启用 php7.3 仓库
yum-config-manager --enable remi-php73
  1. 安装 php 以及常用模块
yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值