ÔõÑùÔÚlinuxЧÀÍÆ÷ÉϴgitlabЧÀÍÆ÷
Ëæ×ÅÐÅÏ¢»¯µÄÒ»Ö±Éú³¤£¬gitÒѾ²»ÔÙÊdzÌÐòÔ±ÃÇÉú²úÁ¦µÄרÊô¹¤¾ß£¬Ô½À´Ô½¶àµÄÆóÒµºÍÏîÄ¿ÍŶӶ¼Ñ¡ÔñʹÓÃgitÐ×÷¿ª·¢ÏîÄ¿£¬Îª°ü¹Ü´úÂëµÄ¿É×·ËÝÐÔºÍÇå¾²ÐÔ£¬Ðí¶àÍŶӶ¼»áÑ¡ÔñʹÓÃ˽ÓÐgitЧÀÍÆ÷À´ÖÎÀí¿ª·¢ÀúÊ·¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚlinuxЧÀÍÆ÷ÉϴgitlabЧÀÍÆ÷¡£
ÇéÐÎ×¼±¸
±¾ÎÄʹÓõÄÊÇubuntu 18.04£¬ÈôÊÇÄúʹÓõÄÊÇÆäËû¿¯Ðа棬ÇëÈ·±£ÒÔÏÂ×¼±¸ÊÂÇéÒѾÍê³É£º
һ̨װÖÃÁËlinuxϵͳµÄЧÀÍÆ÷¡£
È·±£Ð§ÀÍÆ÷µÄÍøÂçÒѾÁ¬Í¨£¬¿ÉÒÔ»á¼ûÍâÍø¡£
È·±£ÒѾװÖÃÁËÐëÒªµÄÒÀÀµ¿â£º openssh-server, ca-certificates, curl, postfix¡£Äú¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´×°ÖÃÒÀÀµ¿â£º
sudo apt-get install -y openssh-server ca-certificates curl postfix
µÇ¼ºó¸´ÖÆ
×°ÖÃGitLab
Ìí¼ÓGitLabÉçÇø°æÈí¼þÔ´£º
curl https://packages.gitlab.com/gpg.key 2>&1 | sudo apt-key add - sudo curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
µÇ¼ºó¸´ÖÆ
×°ÖÃGitLab£º
sudo apt-get install gitlab-ce
µÇ¼ºó¸´ÖÆ
×°ÖÃÀú³Ì¿ÉÄÜÐèÒªÆÚ´ýһЩʱ¼ä£¬×°ÖÃÀֳɺóÄú¿ÉÒÔÔÚÖÕ¶ËÀïÊäÈëÒÔÏÂÏÂÁîÀ´Æô¶¯GitLab£º
sudo gitlab-ctl reconfigure
µÇ¼ºó¸´ÖÆ
ä¯ÀÀÆ÷Öлá¼ûGitLab£º
ĬÈÏÇéÐÎÏ£¬GitLab¼àÌýµÄ¶Ë¿ÚÊÇ80£¬Òò´ËÄú¿ÉÒÔÔÚä¯ÀÀÆ÷ÖÐÊäÈëÄúЧÀÍÆ÷µÄµØµã¼ÓÉÏ80¶Ë¿ÚÀ´»á¼ûGitLabÒ³Ãæ¡£ÈôÊÇÄúµÄЧÀÍÆ÷ʹÓõÄÊÇ°¢ÀïÔƵÈÔÆÖ÷»ú£¬ÐèÒªÏÈÔÚÔÆƽ̨ÉÏ¿ª·Å80¶Ë¿Ú¡£
http://<server>:80/</server>
µÇ¼ºó¸´ÖÆ
Äú½«¿´µ½GitLabµÄ½Ó´ýÒ³Ã棬ÒÔ¼°¹ØÓÚGitLabµÄһЩÐÅÏ¢¡£
ÉèÖÃGitLab
Äú¿ÉÒÔͨ¹ýÒÔÏ°취À´ÉèÖÃGitLab£º
×¢²áÖÎÀíÔ±Õ˺ţº
ÔÚGitLab½Ó´ýÒ³ÃæÖУ¬µ¥»÷”Register a new GitLab administrator account”£¬ÌîдÄúµÄÖÎÀíÔ±ÐÅÏ¢£¬È»ºóµ¥»÷¡°Create account¡±À´×¢²áÖÎÀíÔ±Õ˺š£
¸ü¸ÄÖÎÀíÔ±ÃÜÂ룺
×¢²áÍê³Éºó£¬µ¥»÷ÓÒÉϽǵÄÖÎÀíԱͷÏñ£¬È»ºóÑ¡Ôñ¡°Settings¡±£¬ÔÚ×ó²à¡°Account¡±ÖÐÑ¡Ôñ¡°Password¡±À´¸ü¸ÄÖÎÀíÔ±ÃÜÂë¡£
½¨ÉèÏîÄ¿£º
µã»÷ÓÒÉϽǵġ°+¡±Í¼±ê£¬Ñ¡Ôñ¡°New project¡±£¬ÌîдÏîÄ¿µÄÃû³ÆºÍÐÎòµÈÐÅÏ¢£¬È»ºóµ¥»÷¡°Create project¡±À´½¨ÉèÏîÄ¿¡£
ÖÎÀíÏîÄ¿£º
ÔÚÏîÄ¿Ò³ÃæÖУ¬Äú¿ÉÒÔ¶ÔÏîÄ¿¾ÙÐÐÖÎÀí£¬°üÀ¨Ìí¼Ó³ÉÔ±¡¢ÖÎÀí·ÖÖ§ºÍÌá½»ÀúÊ·µÈ¡£ÎªÁË°ü¹ÜÏîÄ¿µÄÇå¾²ÐÔ£¬Äú¿ÉÒÔÑ¡ÔñΪÏîÄ¿ÉèÖûá¼ûȨÏÞ£¬ÔÚÏîÄ¿ÉèÖÃÖÐÉèÖÃÔÊÐí¡£
×ܽá
ͨ¹ý±¾ÎĵÄÏÈÈÝ£¬ÄúÒѾ¿ÉÒÔÔÚlinuxЧÀÍÆ÷ÉϴGitLabЧÀÍÆ÷£¬²¢Àֳɵؽ¨ÉèÏîÄ¿²¢¾ÙÐÐÖÎÀí¡£GitLabÊÇÒ»¸ö»ùÓÚgitµÄÇ¿Ê¢Ð×÷¹¤¾ß£¬¿ÉÒÔ×ÊÖúÍŶӸüºÃµØÖÎÀíÏîÄ¿£¬Ìá¸ß¿ª·¢Ð§ÂÊ¡£ÎÒÃÇÏ£Íû±¾ÎĶÔÄúÓÐËù×ÊÖú£¬×£ÄúÔÚGitLabµÄʹÓÃÖÐÈ¡µÃÀֳɣ¡
ÒÔÉϾÍÊÇÔõÑùÔÚlinuxЧÀÍÆ÷ÉϴgitlabЧÀÍÆ÷µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡