ÔõÑù×°ÖúÍÉèÖÃGitLabЧÀÍÆ÷
Ò»¡¢¼ò½é
GitLabÊÇÒ»¿î¿ªÔ´µÄ´úÂëÍйÜƽ̨£¬Ìṩ´úÂëÖÎÀí¡¢ÎÊÌâ¸ú×Ù¡¢CI/CDµÈ¹¦Ð§£¬±»ÆÕ±éÓÃÓÚÍŶÓÐ×÷¿ª·¢¡£ÔÚÏÖʵÏîÄ¿ÖУ¬ÎªÁ˸üºÃµØÖÎÀí´úÂ룬Ðí¶à¹«Ë¾Ñ¡Ôñ×Ô½¨GitLabЧÀÍÆ÷£¬±¾ÎĽ«ÏÈÈÝÔõÑù×°ÖúÍÉèÖÃGitLabЧÀÍÆ÷¡£
¶þ¡¢ÇéÐÎ×¼±¸
ÔÚ×îÏÈ×°ÖÃ֮ǰ£¬ÐèҪ׼±¸ÒÔÏÂÇéÐΣº
LinuxЧÀÍÆ÷
Å䱸4GBÒÔÉÏÄÚ´æºÍ100GBÒÔÉÏ´ÅÅÌ¿Õ¼äµÄЧÀÍÆ÷
¾ß±¸sudoȨÏÞµÄÓû§Õ˺Å
´øÓÐÀο¿IPµØµã»òÕß°ó¶¨ÁËÓòÃûµÄЧÀÍÆ÷
¿ª·ÅÁË80ºÍ443¶Ë¿ÚµÄЧÀÍÆ÷
Èý¡¢×°ÖÃ
×°ÖÃÐëÒªµÄÒÀÀµ°ü
×°ÖÃGitLab֮ǰ£¬ÐèҪװÖÃÒÔÏÂÒÀÀµ°ü£º
sudo apt-get install curl openssh-server ca-certificates postfix
µÇ¼ºó¸´ÖÆ
ÔÚ×°ÖÃÀú³ÌÖУ¬»áÈÃÄãÉèÖÃPostfix£¬Ñ¡ÔñInternet Site¼´¿É¡£
Ìí¼ÓGitLab¿ÍÕ»²¢×°ÖÃ
Ìí¼ÓGitLab¹Ù·½¿ÍÕ»µ½UbuntuµÄ´æ´¢¿âÖУº
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
µÇ¼ºó¸´ÖÆ
×°ÖÃGitLab£º
sudo apt-get install gitlab-ce
µÇ¼ºó¸´ÖÆ
ÐÞ¸ÄÉèÖÃÎļþ
ÐÞ¸Ä/etc/gitlab/gitlab.rbÎļþ£¬½«external_urlÉèÖÃΪÄãµÄIPµØµã»òÕßÓòÃû£º
external_url 'http://gitlab.example.com'
µÇ¼ºó¸´ÖÆ
Æô¶¯GitLab
Æô¶¯GitLab²¢Ê¹Æ俪»ú×ÔÆô¶¯£º
sudo gitlab-ctl reconfigure sudo gitlab-ctl start
µÇ¼ºó¸´ÖÆ
ÏÖÔÚ£¬GitLabÒѾÀÖ³É×°ÖúÍÆô¶¯ÁË¡£
ËÄ¡¢ÉèÖÃ
ÏÖÔÚÒѾÀÖ³É×°ÖúÍÆô¶¯GitLab£¬½ÓÏÂÀ´ÐèÒª¾ÙÐÐһЩÉèÖá£
ÐÞ¸ÄÖÎÀíÔ±ÃÜÂë
³õʼÖÎÀíÔ±Õ˺ÅΪroot£¬ÐèÒªÐÞ¸ÄÃÜÂ룺
½øÈëGitLabÍøÕ¾£¬µã»÷ÓÒÉϽǵÄÍ·Ïñ£¬Ñ¡Ôñ¡°Settings¡±¡£
µã»÷×ó²àÀ¸µÄ¡°Account¡±£¬È»ºóÔÚÏ·½ÐÞ¸ÄÃÜÂë¡£
½¨ÉèÐÂÓû§
ÔÚ¡°Settings¡±Ò³ÃæµÄ¡°Members¡±Ñ¡ÏÖУ¬¿ÉÒÔ½¨ÉèÐÂÓû§²¢ÎªÆäÊÚȨ¡£
µã»÷¡°Invite¡±°´Å¥£¬ÊäÈëÐÂÓû§µÄÓʼþµØµã£¬Õâ¸öÓû§»áÊÕµ½Ò»·âÓʼþ£¬µã»÷Á´½Óºó¾Í¿ÉÒÔ¼ÓÈëÄãµÄGitLabÏîÄ¿ÁË¡£
½¨ÉèÏîÄ¿
ÔÚGitLabµÄÖ÷Ò³ÉÏ£¬¿ÉÒÔ½¨ÉèÐÂÏîÄ¿¡£
µã»÷Ö÷Ò³Éϵġ°New Project¡±°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖÐÊäÈëÏîÄ¿Ãû³Æ¡¢ÐÎòµÈÐÅÏ¢£¬È»ºóµã»÷¡°Create Project¡±°´Å¥¼´¿É¡£
ËÄ¡¢×ܽá
ͨ¹ýÒÔÉÏ°ì·¨£¬ÄãÒѾÀÖ³É×°Öá¢ÉèÖúÍʹÓÃÁËGitLab¡£³ý´ËÖ®Í⣬GitLab»¹ÌṩÖîÈçCI/CD¡¢ÎÊÌâ¸ú×ٵȹ¦Ð§£¬¿ÉÒÔƾ֤ÐèÒª¾ÙÐÐÉèÖᣲ»¹ýÐèҪעÖصÄÊÇ£¬GitLabÔËÐеÄÓ²¼þÉèÖÃÒª×㹻ǿʢ£¬²»È»¿ÉÄܻᵼÖÂÐÔÄÜÎÊÌâ¡£
ÒÔÉϾÍÊÇÔõÑù×°ÖúÍÉèÖÃGitLabЧÀÍÆ÷µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡