ÏêϸÏÈÈÝGitLabµÄ×°ÖúÍÉèÖÃÀú³Ì
ÔÚµ±½ñµÄÈí¼þ¿ª·¢ÁìÓò£¬°æ±¾¿ØÖÆÊÇÒ»ÏîºÜÊÇÖ÷ÒªµÄÊÂÇ飬¶øgitÊÇÕâ¸öÁìÓòÖÐ×îΪʢÐеİ汾¿ØÖÆϵͳ֮һ¡£¿ÉÊÇ£¬ÎªÁ˸üºÃµØÖÎÀí×Ô¼ºµÄÏîÄ¿£¬»¹ÐèÒª´î½¨Ò»Ì×gitЧÀÍÆ÷À´¾ÙÐдúÂëµÄÌá½»ºÍÖÎÀí¡£ÆäÖУ¬gitlab¾ÍÊÇÒ»¸ö¼«ºÃµÄÑ¡Ôñ¡£±¾ÎĽ«ÏêϸÏÈÈÝgitlabµÄ×°ÖúÍÉèÖÃÀú³Ì¡£
µÚÒ»²½£º×°ÖÃËùÐèÈí¼þ°ü
ÔÚ×îÏÈ×°ÖÃGitLab֮ǰ£¬ÎÒÃÇÐèÒªÏÈ×°ÖÃGitLabËùÒÀÀµµÄÈí¼þ°ü£¬°üÀ¨curl£¬policycoreutils-python£¬postfix£¨»òÕßÊÇÆäËûµÄÓʼþЧÀÍÈí¼þ°ü£©£¬openSSL-develÒÔ¼°½âѹ¹¤¾ßunzip¡£¿ÉÒÔʹÓÃÒÔÏÂÏÂÁî¾ÙÐÐ×°Öãº
sudo yum install curl policycoreutils-python postfix sudo dnf install curl policycoreutils-python-utils sudo apt-get install curl postfix
µÇ¼ºó¸´ÖÆ
È»ºó×°ÖÃOpenSSL¿â£º
sudo yum install -y openssl-devel
µÇ¼ºó¸´ÖÆ
µÚ¶þ²½£º×°ÖÃGitLab-ce
ÎÒÃÇ¿ÉÒÔ´Ó¹Ù·½µÄGitLabÏÂÔØÒ³ÃæÉÏÕÒµ½ËùÐèµÄ×°Öðü²¢ÏÂÔØ¡£¿ÉÊÇ£¬ÎªÁËÀû±ã£¬ÎÒÃÇ¿ÉÒÔʹÓùٷ½Î¬»¤µÄ×°Öþ籾¾ÙÐÐ×°Öá£Ê¹ÓÃÈçÏÂÏÂÁîÏÂÔز¢ÇÒ×°Öãº
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash sudo yum install gitlab-ce
µÇ¼ºó¸´ÖÆ
µÚÈý²½£ºÉèÖÃGitLab
×°ÖÃÍê³Éºó£¬ÎÒÃÇÐèÒª¾ÙÐÐһЩÐëÒªµÄÉèÖÃÊÂÇ飬ÈÃGitLabÄܹ»Õý³£ÊÂÇé¡£
Ê×ÏÈ£¬Æô¶¯GitLabЧÀÍÆ÷£º
sudo gitlab-ctl reconfigure
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
Õâ¸öÏÂÁ»á×Ô¶¯¾ÙÐÐһϵÁеÄÉèÖÃÊÂÇ飬°üÀ¨½¨ÉèÐëÒªµÄÓû§¡¢×é¡¢Êý¾Ý¿âµÈ¡£Õâ¸öÀú³Ì¿ÉÄÜ»á½ÏÁ¿³¤£¬ÐèÒªÄÍÐÄÆÚ´ý¡£
Æä´Î£¬ÉèÖÃGitLabµÄÍⲿ»á¿´·¨Ö·¡£Ä¬ÈÏÇéÐÎÏ£¬GitLab»á¼àÌý127.0.0.1µØµã£¬Ö»ÄÜÔÚ±¾»ú¾ÙÐлá¼û£¬ÎÒÃÇ¿ÉÒÔÐÞ¸ÄÉèÖÃÎļþ£¬ÈÃGitLabÄܹ»¼àÌýÍⲿµØµã¡£±à¼/etc/gitlab/gitlab.rbÎļþ£¬½«external_urlµÄÖµ¸ÄΪÄãµÄÏÖʵ»á¿´·¨Ö·£º
sudo vi /etc/gitlab/gitlab.rb external_url 'http://gitlab.example.com'
µÇ¼ºó¸´ÖÆ
×îºó£¬ÖØÐÂÔËÐÐÉèÖÃÏÂÁ
sudo gitlab-ctl reconfigure
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
µÚËIJ½£º×îÏÈʹÓÃGitLab
ÏÖÔÚ£¬ÎÒÃǾͿÉÒÔ·¿ªä¯ÀÀÆ÷£¬ÊäÈëÉÏÃæÉèÖõÄÍⲿ»á¿´·¨Ö·£¬¾Í¿ÉÒÔ¿´µ½GitLabµÄµÇ¼ҳÃæ¡£µÚÒ»´Î½øÈëÐèÒªÉèÖÃÖÎÀíÔ±Õ˺ÅÃÜÂ룬֮ºó¾Í¿ÉÒÔ×îÏÈʹÓÃÁË¡£
×ܽ᣺
±¾ÎÄÏêϸÏÈÈÝÁËGitLabµÄ×°ÖúÍÉèÖÃÀú³Ì£¬ÈÃÄã¿ÉÒÔ¿ìËٴһÌ××Ô¼ºµÄGitЧÀÍÆ÷¡£¿ÉÊÇ£¬ÐèÒªÌØÊâ×¢ÖØÒ»ÏÂÇå¾²ÐÔÎÊÌ⣬×èÖ¹·ºÆðÇå¾²Îó²î¡£Æ½Ê±Ê¹ÓÃÖÐҲҪעÖر¸·ÝºÍά»¤£¬ÒÔÃâÔì³ÉÊý¾ÝµÄɥʧ¡£
ÒÔÉϾÍÊÇÏêϸÏÈÈÝGitLabµÄ×°ÖúÍÉèÖÃÀú³ÌµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡