简单几步配置gitlab
简单几步配置gitlab
之前配置gitlab需要很多步骤,要装apache2、ruby、tomcat、mysql等一片东西。有没有更简单的方式呢?现在可以借助bitnami,简化了很多。
可以参考vpsee写的文章:http://www.vpsee.com/2012/11/install-gitlab-on-ubuntu-12-04/
cd /opt
wget https://bitnami.com/redirect/to/48156/bitnami-gitlab-7.6.2-0-linux-installer.run
./bitnami-gitlab-7.6.2-0-linux-x64-installer.run --apache_server_port 9000
步骤也可以参考:https://bitnami.com/stack/gitlab/README.txt
[root@test opt]# ./bitnami-gitlab-7.6.2-0-linux-x64-installer.run --apache_server_port 9000 The installer detects that exists a 'git' user in the system. This installer will change the configuration for this user. Do you want to continue the installation? [y/N]: y The installer detects that exists a 'gitlab_ci' user in the system. This installer will change the configuration for this user. Do you want to continue the installation? [y/N]: y ---------------------------------------------------------------------------- Welcome to the Bitnami Gitlab Stack Setup Wizard. ---------------------------------------------------------------------------- Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue. GitLab : Y (Cannot be edited) GitLab CI [Y/n] :y Is the selection above correct? [Y/n]: y ---------------------------------------------------------------------------- Installation folder Please, choose a folder to install Bitnami Gitlab Stack Select a folder [/opt/gitlab-7.6.2-0]: ---------------------------------------------------------------------------- Create Admin account Bitnami Gitlab Stack admin user creation Email Address [user@example.com]: haochuang@uetest.com Login [user]: haochuang Password : Please confirm your password : Warning: Please use alphanumeric characters only Press [Enter] to continue: ---------------------------------------------------------------------------- Create Admin account Bitnami Gitlab Stack admin user creation Email Address [haochuang@uetest.com]: ${userEmail} Login [haochuang]: ${UserAccount} Password :${UserPasswd} Please confirm your password : ---------------------------------------------------------------------------- Hostname that will be used to create internal URLs. If this value is incorrect, you may be unable to access your Gitlab installation from other computers. It is advisable to use a Domain instead of an IP address for compatibility with different browsers. Domain [127.0.1.1]: ${ServerIP} Do you want to configure mail support? [y/N]: y ---------------------------------------------------------------------------- Configure SMTP Settings This is required so your application can send notifications via email. Default email provider: [1] GMail [2] Custom Please choose an option [1] : 2 ---------------------------------------------------------------------------- Configure SMTP Settings This data is stored in the application configuration files and may be visible to others. For this reason, it is recommended that you do not use your personal account credentials. Username []: haochuang Password : Re-enter : SMTP Host []: smtp.exmail.qq.com SMTP Port []: 25 Secure connection [1] None [2] SSL [3] TLS Please choose an option [3] : 2 ---------------------------------------------------------------------------- Setup is now ready to begin installing Bitnami Gitlab Stack on your computer. Do you want to continue? [Y/n]: Y ---------------------------------------------------------------------------- Please wait while Setup installs Bitnami Gitlab Stack on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### ---------------------------------------------------------------------------- Setup has finished installing Bitnami Gitlab Stack on your computer. Info: To access the Bitnami Gitlab Stack, go to http://127.0.1.1:9000 from your browser. Press [Enter] to continue:
等待完成之后,打开 http://127.0.1.1:9000/,即可正常访问。
之前我绕了弯路,参考了这里的问题解决办法:https://community.bitnami.com/t/gitlab-http-port/20767
另外,在你开始安装的时候,可以看到很多帮助信息:./bitnami-gitlab-7.6.2-0-linux-x64-installer.run --help
如果你已经安装完成了,只是由于端口冲突,准备修改端口的话,也可以这么做:
1.停掉服务,修改如下配置文件:
/opt/gitlab-7.6.2-0/properties.ini: apache_server_port=9000 /opt/gitlab-7.6.2-0/apps/gitlab/conf/httpd-app.conf PassengerPreStart http://127.0.0.1:900012 /opt/gitlab-7.6.2-0/apps/gitlab/htdocs/config/gitlab.yml port: 9000 /opt/gitlab-7.6.2-0/apps/gitlab/gitlab-shell/config.yml http://yourIP:90006 /opt/gitlab-7.6.2-0/apps/gitlabci/gitlabci-runner/config.yml url: http://yourIP:90006 /opt/gitlab-7.6.2-0/apps/gitlabci/htdocs/config/application.yml 'http://yourIP:9000/' /opt/gitlab-7.6.2-0/apache2/conf/httpd.conf Listen 9000
2.重启服务:
/opt/gitlab-7.6.2-0/ctlscript.sh restart
3.tingzhi停止服务:
/opt/gitlab-7.6.2-0/ctlscript.sh stop
4.卸载gitlab:
./opt/gitlab-7.6.2-0/uninstall
5.查看进程:
ps -ef |grep httpd
如果还有其他问题,请在这里找日志:
/opt/gitlab-7.6.2-0/apache2/logs,主要查看 error_log 日志,根据错误信息分析问题,并逐个解决。
--------------------------------
至于使用方面,其实很简单。
给几个常用命令,供参考
Git global setup
git config --global user.name "haochuang" git config --global user.email "haochuang@aol.com"
Create a new repository
mkdir hao-homepage cd tw-homepage git init touch README.md git add README.md git commit -m "first commit" git remote add origin git@serverip:haochuang/hao-homepage.git git push -u origin master
Push an existing Git repository
cd existing_git_repo git remote add origin git@serverip:haochuang/hao-homepage.git git push -u origin master
接下来,就可以欢天喜地的使用了:-)
相关文章
- Zookeeper简单配置
- .NET Core实战项目之CMS 第二章 入门篇-快速入门ASP.NET Core看这篇就够了 [WPF]为旧版本的应用添加触控支持 js css等静态文件版本控制,一处配置多处更新.net版【原创】 C#图片处理,缩略图制作 SqlDataReader 结果集 转成 DataTable DataTable转成List集合 如何使用linq读取DataTable集合?
- Linux环境变量PS1配置
- Debian/Ubuntu系统中安装和配置UFW-简单的防火墙
- CentOS7:配置SVN服务器
- Spring Boot 2 中的默认日志管理与 Logback 配置详解
- 江帅帅:Spring Boot 底层级探索系列 03 - 简单配置
- 在eclipse中配置一个简单的spring入门项目
- 数据库配置问题导致近两亿选举投票记录泄露
- macOS SwiftUI 应用架构之全屏模式 03 保留对基本功能的访问权限和配置辅助窗口以在全屏模式下使用
- Nginx 安装配置
- Springboot+Thymeleaf+layui框架的配置与使用
- Dynamic CRM 2013学习笔记(三十八)流程1 - 操作(action)开发与配置详解
- Docker+nginx+tomcat7配置简单的负载均衡
- 二、seata + nacos 配置(windows)
- stm32中I2Cx的简单配置以及源码
- Eclipse开发C/C++程序的MinGw配置
- Unity ML-Agents 之 环境配置(Anaconda 下载安装等),简单的搭建场景实现简单训练的Demo(内含详细步骤)
- IntellJ IDEA 之 IntellJ IDEA 环境的下载安装与简单配置的简单整理
- ASP.NET Aries 入门开发教程2:配置出一个简单的列表页面
- srs流媒体录制视频-配置dvr
- 树莓派4B安装配置LibreELEC并连接到三星电视
- JDK企业级安装和配置一次成功-Array-专题视频课程
- 服务器集群自动化部署工具,自动生成 Redis+Tomcat+Nginx相关需要文件,自动配置好依赖jar包和配置文件,简单快速搭建集群环境
- 【转】Delphi"配置系统未能初始化"