1.chrome安装
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-get update
sudo apt-get install google-chrome-stable
/usr/bin/google-chrome-stable
2.go 安装
(1.)下载go安装包
go安装包
解压到/usr/local/go
tar -zxvf xxx.tar.gz -C /usr/local/
(2.)配置环境变量
vim /etc/profile
export GOROOT=/usr/local/go #设置为go安装的路径,有些安装包会自动设置默认的goroot
export GOPATH=$HOME/gocode #默认安装包的路径
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source /etc/profile
3.git 安装
(1.)安装
apt-get update -y
apt-get upgrade -y
apt install git
git --version
(2.)配置
git config --global user.name "linuxidc"
git config --global user.email "[email protected]"
git config --list
(3.)生成公钥
ssh-keygen -t ed25519 -C "[email protected]"
或者:ssh-keygen -o -t rsa -b 4096 -C "[email protected]"
查看公钥:cat ~/.ssh/id_ed25519.pub
git相关链接
4.mysql 安装
wget http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb
sudo apt install ./mysql-apt-config_0.8.13-1_all.deb
sudo apt update
sudo apt install mysql-server
https://linuxize.com/post/how-to-install-mysql-on-debian-10/
https://wangqy.cc/2019/05/08/Deepin下安装MySQL/
http://mirrors.sohu.com/mysql/MySQL-8.0/
5.uos镜像源
vim /etc/apt/sources.list
## Generated by deepin-installer
deb https://mirrors.huaweicloud.com/deepin/ unstable main contrib non-free
deb-src https://mirrors.huaweicloud.com/deepin/ unstable main contrib non-free
sudo apt update
https://gangzai.online/2020/01/02/commands/2020-01-02-uos-系统源安装/
https://www.jinjun.top/163.html
https://mirrors.ustc.edu.cn/help/debian.html
6.golang私有仓库
export GOPRIVATE=pkg.deepin.com
7.gvm安装和使用
bash <
8.docker 安装
(1.)卸载旧版本
sudo apt-get remove docker docker-engine docker.io containerd runc
(2.)更新仓库
sudo apt-get update
sudo apt-get upgrade
(3.)安装docker
sudo apt install docker.io
(4.)启动docker
systemctl start docker
systemctl enable docker
(5.)查看版本
docker --version
(6.)配置国内镜像源
# vi /etc/docker/daemon.json
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
systemctl restart docker.service
其他镜像源:
https://cr.console.aliyun.com/
https://registry.docker-cn.com
http://hub-mirror.c.163.com
(7.)安装portainer
docker volume create portainer_data
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
(8.)安装docker-compose
1).进入https://github.com/docker/compose/releases 查看最新版本,当前版本为1.23.1
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
//国内阿里云下载
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.0/docker-compose-uname -s -uname -m > /usr/local/bin/docker-compose
//国外的下载太慢,推荐上面那种
// sudo curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
2).设置权限
sudo chmod +x /usr/local/bin/docker-compose
3).查看是否安装成功
docker-compose --version
4).安装 docker composer 自动补全命令
curl -L https://raw.githubusercontent.com/docker/compose/1.8.0/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
相关链接
https://www.howtoing.com/ubuntu-docker
https://get.daocloud.io/
https://blog.csdn.net/nklinsirui/article/details/80610058
9.java环境安装
sudo apt update
sudo apt install openjdk-8-jdk
10.harbor安装
前提:已安装docker和docker-compose
下载离线安装包: http://harbor.orientsoft.cn/
tar -zxf harbor-offline-installer-v1.5.0.tgz
cd harbor/
vim harbor.cfg
# 域名
hostname = hub.dylan.com
# 协议
ui_url_protocol = https
# 证书
ssl_cert = /data/cert/hub.dylan.com.crt
ssl_cert_key = /data/cert/hub.dylan.com.key
# 初始密码
harbor_admin_password = 123456
./install.sh
测试:
vim /etc/host //配置域名与本地IP映射
用harbor.cfg中配置的域名访问,用户名admin,密码为自己在配置文件中设置的密码。
vi /etc/docker/daemon.json
{
"registry-mirrors": [
"https://registry.docker-cn.com"
],
"insecure-registries":["172.16.35.31:1180"]
}
docker login mydomain.com
username:admin
passwd:harbor(配置文件中的密码!)
docker tag hello-image:latest mydomain.com/test/hello-image:v1
docker push mydomain.com/test/hello-image:v1
---------------------------------------------------------------------
//注意:貌似配了,无法启动,可以不配!
//vi /usr/lib/systemd/system/docker.service
//ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock --insecure-registry=172.16.35.31:1180
//systemctl daemon-reload
//systemctl restart docker
标签:uos,compose,sudo,apt,安转,https,软件,docker,com From: https://www.cnblogs.com/ban1234/p/16718777.html