首页 > 代码库 > 简单几步配置gitlab

简单几步配置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 9000The 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]: yThe 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] :yIs the selection above correct? [Y/n]: y----------------------------------------------------------------------------Installation folderPlease, choose a folder to install Bitnami Gitlab StackSelect a folder [/opt/gitlab-7.6.2-0]: ----------------------------------------------------------------------------Create Admin accountBitnami Gitlab Stack admin user creationEmail Address [user@example.com]: haochuang@uetest.comLogin [user]: haochuangPassword :Please confirm your password :Warning: Please use alphanumeric characters onlyPress [Enter] to continue:        ----------------------------------------------------------------------------Create Admin accountBitnami Gitlab Stack admin user creationEmail 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 SettingsThis is required so your application can send notifications via email.Default email provider:[1] GMail[2] CustomPlease choose an option [1] : 2----------------------------------------------------------------------------Configure SMTP SettingsThis 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 []: haochuangPassword :Re-enter :SMTP Host []: smtp.exmail.qq.comSMTP Port []: 25Secure connection[1] None[2] SSL[3] TLSPlease 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 tohttp://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.confPassengerPreStart http://127.0.0.1:900012/opt/gitlab-7.6.2-0/apps/gitlab/htdocs/config/gitlab.ymlport: 9000/opt/gitlab-7.6.2-0/apps/gitlab/gitlab-shell/config.ymlhttp://yourIP:90006/opt/gitlab-7.6.2-0/apps/gitlabci/gitlabci-runner/config.ymlurl: 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.confListen 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 日志,根据错误信息分析问题,并逐个解决。

简单几步配置gitlab