简单几步配置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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | [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.停掉服务,修改如下配置文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | /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
接下来,就可以欢天喜地的使用了:-)

赠人玫瑰
手留余香
我们曾如此渴望命运的波澜,到最后才发现:人生最曼妙的风景,竟是内心的淡定与从容……我们曾如此期盼外界的认可,到最后才知道:世界是自己的,与他人毫无关系!-杨绛先生
如果,您希望更容易地发现我的新博客,不妨点击一下绿色通道的
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?