Centos

Centos8 系统初始化

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
sh -c "$(curl -fsSL http://file.laijw.com/install.sh)"
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com.cnpmjs.org/zsh-users/zsh-autosuggestions.git
git clone https://github.com.cnpmjs.org/zsh-users/zsh-syntax-highlighting.git
git clone https://github.com.cnpmjs.org/zsh-users/zsh-completions.git
git clone https://github.com.cnpmjs.org/zsh-users/zsh-history-substring-search.git
git clone https://github.com.cnpmjs.org/zdharma/history-search-multi-word.git

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
yum makecache

vim ~/.zshrc

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plugins=(
  git
  dotenv
  thefuck
  frontend-search
  docker-compose
  zsh-autosuggestions
  zsh-syntax-highlighting
  zsh-completions
  z
  history-substring-search
  command-not-found
  colored-man-pages
  extract
  history-search-multi-word
)

source ~/.zshrc

宝塔面板

1
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

dnf 代替 yum

1
dnf install -y

Podman 代替 Docker

1
2
3
4
podman images
podman ps -a

vim /etc/containers/registries.conf
1
2
3
4
5
unqualified-search-registries = ["docker.io"]

[[registry]]
prefix = "docker.io"
location = "******.mirror.aliyuncs.com"

Docker 安装

Docker — 从入门到实践

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
echo "export LC_ALL=en_US.UTF-8"  >>  /etc/profile
echo "export LC_CTYPE=en_US.UTF-8"  >>  /etc/profile
source /etc/profile

yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
# 或
dnf install -y --allowerasing docker-ce

systemctl start docker
systemctl enable docker

systemctl cat docker | grep '\-\-registry\-mirror'
vim /etc/docker/daemon.json
1
2
3
4
5
6
{
  "registry-mirrors": [
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com"
  ]
}
1
2
systemctl daemon-reload
systemctl restart docker

Portainer

1
2
3
4
5
6
docker search portainer |head -n 3
docker volume create portainer_data
docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
podman images
docker ps -a
http://10.211.55.6:9000

plantUML

1
docker run -d -p 8080:8080 plantuml/plantuml-server:tomcat

安装 docker-compose

1
2
3
4
5
pip3 install docker-compose

# 或者二进制安装
curl -L https://download.fastgit.org/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

CentOS 安装 Parallels Tools

1
2
3
4
mkdir -p /media/cdrom
mount -o exec /dev/cdrom /media/cdrom
/media/cdrom/install
cd /media/psf