当前位置: 首页 > Linux

Gitlab-多实例构建

时间:2023-04-06 11:07:57 Linux

Gitlab-多实例搭建操作系统:所有CentOS服务如下:节点A:OpenResty、grafana-server节点B:PGSQL、Redis节点C:Gitlab_1节点D:Gitlab_2节点E:Gitlab_3............节点N:Gitlab_n节点AOpenResty安装参考https://openresty.org/cn/inst...#安装相关依赖yuminstallpcre-developenssl-develgcccurl#下载源码包wgethttps://开放式。org/download/openresty-1.19.9.1.tar.gz#安装源码包,VERSION=1.19.9.1tar-xzvfopenresty-VERSION.tar.gzcdopenresty-VERSION/./configure--prefix=/opt/openresty\--with-luajit\--without-http_redis2_module\--with-http_iconv_module\--with-http_postgres_modulemakesudomakeinstall#启动openresty#重启服务sudo/opt/openresty/bin/openresty-sreload#停止服务sudo/opt/openresty/bin/openresty-sstopsudo/opt/openresty/bin/openrestygrafana-server安装参考https://grafana.com/docs/graf...#安装,这里是和<本地rpm包>#替换为所需版本的包sudoyuminstallinitscriptsurw-fontswgetwgetsudorpm-Uvh#启动sudosystemctldaemon-reloadsudosystemctlstartgrafana-serversudosystemctlstatusgrafana-serversudosystemctlenablegrafana-servernodeB构建redis参考https://hub.docker.com/_/redis#拉取最新的redis镜像dockerpullredis#启动redis服务dockerrun\-v:/usr/local/etc/redis\--nameredis\redis-server\/usr/local/etc/redis/redis.confbuildPGSQL参考https://hub.docker.com/_/post...#拉取最新的PGSQL镜像dockerpullpostgres#启动redis服务dockerrun\--namepostgresql-p15432:5432\-ePOSTGRES_USER=\-ePOSTGRES_DB=\-ePOSTGRES_PASSWORD=\-dpostgresnodeC~Nbuildgitlabreferencehttps://docs.gitlab.com/ee/up...#安装依赖yum-yinstallpolicycoreutilsopenssh-serveropenssh-clientspostfix#启用postfix支持gitlab发送功能#postfix启动过程会报错:fatal:parameterinet_interfaces:nolocalinterfacefoundfor::1#需要修改/etc/postfix/中的inet_interfacesmain.cf=localhost改为inet_interfaces=all保存配置重启postfix后,systemctlenablepostfix&&systemctlstartpostfix#安装gitlab#手动下载安装包#国内镜像源网站https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/rpm-ivh<包名>