阿里云centOS6.8下安装gitlab CE
来源:互联网 发布:汽车传动比知乎 编辑:程序博客网 时间:2024/06/07 11:15
刚刚在阿里云上搭建了gitlab,这里和大家分享一下安装过程:
我的实例是centOS6.8,具体如下
系统上之前安装过LAMP环境(即apache、mysql、php,这是为了部署wordpress),还安装了tomcat8,其中apache使用80端口、tomcat使用8080端口。
好,现在开始安装过程:
为方便直接切换到root用户,然后开始安装相关依赖
[root@iZbp14cvwowqu27clxb6pxZ ~]# yum install curl policycoreutils openssh-server openssh-clients
[root@iZbp14cvwowqu27clxb6pxZ ~]# service sshd restart
[root@iZbp14cvwowqu27clxb6pxZ ~]# yum install postfix
[root@iZbp14cvwowqu27clxb6pxZ ~]# service postfix restart
现在开始正式安装gitlab,新建 /etc/yum.repos.d/gitlab-ce.repo,内容为:
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
上面的操作是使用镜像提高下载安装的速度,继续回到命令行:
[root@iZbp14cvwowqu27clxb6pxZ ~]# yum makecache
[root@iZbp14cvwowqu27clxb6pxZ ~]# yum install gitlab-ce
至此,gitlab 安装完毕!但不要急着去启动,我们现更改一些配置
修改配置文件 /etc/gitlab/gitlab.rb中的下面两项
external_url 'http://你的外网IP:82'80端口已被Apache占用
unicorn['port'] =1986 8080端口已被Tomcat占用
[root@iZbp14cvwowqu27clxb6pxZ ~]# gitlab-ctl reconfigure更改配置文件后,重新加载使改动配置生效,并启动gitlab
检查是否安装成功并且启动正常:
出现上图所示结果就表明服务安装成功了,可以通过浏览器进行访问了,具体不在赘述,网上有很多使用教程。
如果上述安装方法未能成功,可以直接去官网下载rpm安装包,下载地址:点击打开链接
选择一个rpm版本,下载后传到服务器上,然后执行如下命令进行安装
[root@iZbp14cvwowqu27clxb6pxZ home]# rpm -i gitlab-ce-7.10.4-omnibus-1.x86_64.rpm
一些常用命令:
[root@iZbp14cvwowqu27clxb6pxZ ~]# gitlab-ctl status
[root@iZbp14cvwowqu27clxb6pxZ ~]# gitlab-ctl tail --查看所有日志
[root@iZbp14cvwowqu27clxb6pxZ ~]# gitlab-ctl tail nginx/gitlab_access.log--查看nginx访问日志
[root@iZbp14cvwowqu27clxb6pxZ ~]# gitlab-ctl tail unicorn --跟踪unicorn的状态
一些目录结构:
主配置文件:/etc/gitlab/gitlab.rb // 可以自定义一些邮件服务等
日志地址:/var/log/gitlab/ // 对应各服务的打印日志
服务地址:/var/opt/gitlab/ // 对应各服务的主目录
仓库地址:/var/opt/gitlab/git-data // 记录项目仓库等提交信息
重置配置:gitlab-ctl reconfigure // 不要乱用,会重置为最原始的配置的
重启服务:gitlab-ctl stop/start/restart/uninstall // 停止、启动、重启、卸载
默认安装:postgres、nginx、redis、unicorn ……
- 阿里云centOS6.8下安装gitlab CE
- Centos6.8下gitLab的安装
- 阿里云ECS-centos6.8下 安装配置mysql5.7
- 阿里云CentOS6下安装Nginx
- GitLab CE安装配置
- centos安装gitlab-ce
- 阿里云centos6.8安装lnmp环境
- 阿里云服务器CentOS6.8安装MySQL
- 阿里云服务器CentOS6.8安装JDK
- 阿里云服务器CentOS6.8安装Tomcat
- 阿里云centos6.8安装svn
- docker 安装gitlab-ce下ssh无法使用原因
- linux下安装配置gitlab-ce-9.0.5
- centos6下gitlab搭建
- Centos6.5 安装 gitlab
- centos6安装GitLab
- centos6.5 安装gitlab
- CentOS6安装gitlab
- 云计算安全还靠CASB
- [C++]模板类的声明与实现分离问题
- Intellij Idea 显示 Git 分支信息
- BZOJ4756: [Usaco2017 Jan]Promotion Counting
- Spring整理系列(16)——通过单元测试理解spring容器以及dubbo+zookeeper单元测试异常处理
- 阿里云centOS6.8下安装gitlab CE
- 项目实战:封装友盟,数据化监控应用
- No.8 OpenCL 性能分析——内存带宽
- oracle中如何删除数据库的实例
- 一些app源码
- 网络请求返回数据格式
- 使用tornado的异步非阻塞
- 解决Requests中文乱码
- Apache Thrift