CI / CD
https://gitlab.com/gitlab-examples
Gitlab(仓库) -> Gitlab Runner(持续集成/部署) -> Remote host(远程部署主机)
11.5.1. 远程服务器配置
为远程服务器创建 www 用户,我们将使用该用户远程部署,远程启动程序。
[root@netkiller ~]# groupadd -g 80 www [root@netkiller ~]# adduser -o --uid 80 --gid 80 -G wheel -c "Web Application" www [root@netkiller ~]# id www uid=80(www) gid=80(www) groups=80(www),10(wheel) [root@netkiller ~]# PASSWORD=$(cat /dev/urandom | tr -dc [:alnum:] | head -c 32) [root@netkiller ~]# echo www:${PASSWORD} | chpasswd [root@netkiller ~]# echo "www password: ${PASSWORD}" www password: 0Uz1heY9v9KJyRKbvTi0VlAzfEoFW9GH
mkdir -p /opt/netkiller.cn/www.netkiller.cn chown www:www -R /opt/netkiller.