centos´î½¨GitlabµÄÏêϸ°ì·¨£¨·ÖÏí£©
Ëæ×ÅÈí¼þ¿ª·¢µÄÒ»Ö±Éú³¤£¬´úÂë°æ±¾¿ØÖƳÉΪÁËÈκÎÒ»¸öÈí¼þ¿ª·¢ÍŶӵıر¸¹¤¾ß¡£gitlab×÷Ϊһ¿îÃâ·Ñ¡¢¿ªÔ´¡¢Ò×ÓÚ×°ÖúÍÖÎÀíµÄ´úÂëÖÎÀíƽ̨ÒѾÆÕ±éÓ¦ÓÃÓÚ¸÷¸ö¿ª·¢ÍŶÓÖС£±¾ÎĽ«ÏÈÈÝÔÚcentosϵͳÉϴgitlabµÄÏêϸ°ì·¨¡£
×¼±¸ÊÂÇé
ÔÚ×îÏÈ×°ÖÃGitlab֮ǰ£¬ÎÒÃÇÐèҪ׼±¸ºÃÒÔÏÂÊÂÇé:
×°ÖÃCentOSϵͳ²¢·¿ªSSHÔ¶³ÌµÇ¼ȨÏÞ£»
È·±£ÏµÍ³ÖÐÒÑ×°ÖÃÍêÕûµÄcurlºÍopenssh-serverЧÀÍ£»
ÔÚϵͳÖÐ×°ÖúÍÉèÖÃRubyºÍGit¡£
×°ÖÃGitlab
Ìí¼ÓGitlabÔ´
Ê×ÏÈÎÒÃÇÐèÒªÌí¼ÓGitlabµÄyumÔ´ÒÔ±ãʹÓÃyumÏÂÁî×°ÖÃGitlab¡£
$ sudo curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
×°ÖÃGitlab
Ìí¼ÓÀֳɺó£¬ÎÒÃǾͿÉÒÔʹÓÃyum×°ÖÃGitlabÁË¡£
$ sudo yum install gitlab-ce
ÉèÖÃGitlab
×°ÖÃÍêGitlabÖ®ºó£¬ÎÒÃÇÐèÒªÖ´ÐÐÒÔÏÂÏÂÁîÉèÖÃGitlabµÄ»á¿´·¨Ö·ºÍ¶Ë¿Ú£º
$ sudo vi /etc/gitlab/gitlab.rb
ÔÚ·¿ªµÄÎļþÖУ¬ÕÒµ½ÒÔÏÂÁ½ÐУº
external_url ‘http://gitlab.example.com’
gitlab_workhorse[‘listen_network’] = ‘tcp’
½«external_urlµÄµØµã¸ÄΪ¹«ÍøIPµØµã£¬ÈçÏ£º
external_url ‘http://192.168.1.100’
½«listen_networkÉèÖÃΪunix£¬²¢ÔÚlisten_addrÖÐÐÞ¸ÄΪunix:/var/opt/gitlab/gitlab-workhorse/socket¡£
gitlab_workhorse[‘listen_network’] = ‘unix’
gitlab_workhorse[‘listen_addr’] = “unix:/var/opt/gitlab/gitlab-workhorse/socket”
Æô¶¯Gitlab
Íê³ÉÉèÖÃÖ®ºó£¬ÎÒÃÇÐèÒªÖØÐÂÆô¶¯Gitlab²Å»ªÊ¹ÉèÖÃÉúЧ¡£
$ sudo gitlab-ctl reconfigure
»á¼ûGitlab
ÏÖÔÚÎÒÃÇ¿ÉÒÔʹÓÃä¯ÀÀÆ÷»á¼ûGitlabÁË£¬µØµãΪhttp://{{ip_address}}¡£»á¼ûÀֳɺ󼴿É×îÏÈʹÓÃGitlab¾ÙÐдúÂë°æ±¾ÖÎÀí¡£
×ܽá
±¾ÎļòÆÓÏÈÈÝÁËÔõÑùÔÚCentOSϵͳÉϴGitlabµÄÏêϸ°ì·¨¡£ÐèҪעÖصÄÊÇ£¬ÔÚÏÖʵʹÓÃGitlabʱ£¬ÎÒÃÇ»¹ÐèÒª½øÒ»²½ÉèÖÃGitlabµÄÓû§È¨ÏÞ¡¢HTTPSÖ¤ÊéµÈ£¬ÒÔÖª×ãÍŶӵÄÏêϸÐèÇó¡£Ï£Íû±¾ÎÄÄܹ»¶Ô¸÷ÈËÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊÇcentos´î½¨GitlabµÄÏêϸ°ì·¨£¨·ÖÏí£©µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡