Ubuntu

安装步骤

下载Ubuntu 20.04.3 LTS

Download

在vmware里面安装ubuntu

linux设置

账号密码

都叫test

安装docker

https://www.runoob.com/docker/ubuntu-docker-install.html

使用官方安装脚本自动安装

安装命令如下:

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

开启ssh

https://www.ewdna.com/2012/06/ubuntu-ssh-server.html

要安裝 ssh server, 以下兩行指令都可以
# apt-get install ssh
# apt-get install openssh-server

安裝後可以修改一些 ssh 的設定, 如port, 密碼認證, root登入等
# vim /etc/ssh/sshd_config
Port 22
PasswordAuthentication yes
PermitRootLogin yes -> 是否開放 root 登入

更改完存檔後記得重啟服務
# /etc/init.d/ssh restart

做完上面的就完成啦,是不是很簡單呢? 如果要從 windows ssh過去的話,可以試試這個超好用的 ssh 軟體: Xshell、Xftp:超好用SSH Client軟體

安装npm docker

安装rust docker

sudo docker pull rust
# rust
mkdir /home/test/rust
sudo docker run -it --mount type=bind,source=/home/test/rust,target=/home/rust rust bash

測試gitlab

sudo mkdir /srv/gitlab
export GITLAB_HOME=/srv/gitlab

sudo docker run --detach \
  --hostname gitlab.example.com \
  --publish 443:443 --publish 80:80 --publish 122:22 \
  --name gitlab \
  --restart always \
  --volume $GITLAB_HOME/config:/etc/gitlab \
  --volume $GITLAB_HOME/logs:/var/log/gitlab \
  --volume $GITLAB_HOME/data:/var/opt/gitlab \
  gitlab/gitlab-ee:latest
  
  # The initialization process may take a long time. You can track this process with:
sudo docker logs -f gitlab

#Visit the GitLab URL, and log in with username root and the password from the following command:
sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password

docker的好处有什么?

好处:

坏处呢:

Ref

https://ubuntu.com/download/desktop

https://docs.gitlab.com/ee/install/docker.html

Powered by Jekyll and Theme by solid

本站总访问量