深度軟件安裝(一)


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 "root@linuxidc.net"
git config --list

(3.)生成公鑰
ssh-keygen -t ed25519 -C "email@example.com"
或者:ssh-keygen -o -t rsa -b 4096 -C "email@example.com"

查看公鑰: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.鏡像源

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 < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
gvm install go1.13
gvm use go1.13 --default

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

11.設置允許root登錄

設置root登錄

相關鏈接:

https://www.cnblogs.com/wn1m/p/11284733.html

火焰截圖

sudo apt-get install flameshot

快捷鍵設置: 
命令:flameshot gui

** 相關鏈接:**
https://www.jianshu.com/p/1a0743bd7cea
官網: https://flameshot.js.org/
github: https://github.com/lupoDharkael/flameshot


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM