ÔõÑùÔÚ°¢ÀïÔÆÉÏ°²ÅÅ GitLab
°¢ÀïÔÆÊÇÔÆÅÌËãÁìÓòµÄÏòµ¼ÕßÖ®Ò»£¬ÔÚÔÆÅÌËãЧÀÍ·½ÃæÓµÓи»ºñµÄÂÄÀúºÍÁìÏȵÄÊÖÒÕ£¬Í¬Ê±Ìṩ¶àÖÖÔÆÅÌËãЧÀÍÒÔÖª×ã²î±ðµÄÐèÇó¡£ gitlab ÊÇÒ»¸ö¿ªÔ´µÄ´úÂëÍйÜÓëÐ×÷ƽ̨£¬Ëü¿ÉÒÔ×ÊÖúÍŶӸüºÃµØÖÎÀí´úÂë¡¢Ð×÷ºÍ¾ÙÐÐÒ»Á¬¼¯³É¡£ÏÂÃæÎÒÃÇÀ´ÏÈÈÝÔõÑùÔÚ°¢ÀïÔÆÉÏ°²ÅÅ gitlab¡£
Ò»¡¢°¢ÀïÔÆÉϽ¨ÉèʵÀý
Ê×ÏÈ£¬ÎÒÃÇÐèÒªÔÚ°¢ÀïÔÆÉϽ¨ÉèÒ»¸öÔÆЧÀÍÆ÷ʵÀý¡£¿ÉÒÔÑ¡ÔñECS¡¢ÇáÁ¿Ó¦ÓÃЧÀÍÆ÷»òÕßÈÝÆ÷ЧÀ͵Ȳî±ðµÄʵÀýÀàÐÍ£¬Æ¾Ö¤×Ô¼ºµÄÐèÇóÑ¡ÔñÏìÓ¦µÄÉèÖú͵ØÇø¡¢²Ù×÷ϵͳµÈ²ÎÊý¡£ÔÚʵÀý½¨ÉèÍê³Éºó£¬¿ÉÒÔͨ¹ý¹«ÍøIP»á¼ûʵÀý¡£
¶þ¡¢×°ÖÃ GitLab
¸üÐÂϵͳ
ÔÚʵÀý½¨ÉèÍê³Éºó£¬ÐèÒª¸üÐÂϵͳÈí¼þ°ü£¬Ê¹ÓÃÒÔÏÂÏÂÁ
sudo apt-get update sudo apt-get upgrade
µÇ¼ºó¸´ÖÆ
×°ÖÃÐëÒªÈí¼þ
GitLab ÔËÐÐÐèҪһЩÐëÒªµÄÈí¼þ£¬°üÀ¨ curl¡¢openssh-server¡¢ca-certificates¡¢postfixµÈ¡£¿ÉÒÔʹÓÃÒÔÏÂÏÂÁî×°ÖÃÕâЩÈí¼þ£º
sudo apt-get install -y curl openssh-server ca-certificates postfix
µÇ¼ºó¸´ÖÆ
Ìí¼Ó GitLab Ô´
½ÓÏÂÀ´£¬ÐèÒªÌí¼Ó GitLab µÄ¹Ù·½Ô´£¬²¢ÇÒµ¼Èë GPG ¹«Ô¿¡£¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÌí¼ÓÔ´ºÍµ¼È빫Կ£º
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886
µÇ¼ºó¸´ÖÆ
×°ÖÃ GitLab
Ìí¼ÓÔ´ºÍµ¼È빫ԿÍê³Éºó£¬ÔËÐÐÒÔÏÂÏÂÁî×°Öà GitLab£º
sudo apt-get install gitlab-ce
µÇ¼ºó¸´ÖÆ
ÉèÖÃ GitLab
GitLab ×°ÖÃÍê³Éºó£¬ÐèÒª¾ÙÐÐһЩÉèÖÃÒÔʹÆäÔËÐÐÕý³£¡£±à¼ÉèÖÃÎļþ gitlab.rb£º
sudo nano /etc/gitlab/gitlab.rb
µÇ¼ºó¸´ÖÆ
ÆäÖÐһЩÐèÒªÉèÖõIJÎÊý°üÀ¨ external_url£¬smtp_xxx µÈ¡£ÆäÖÐ external_url ÊÇ GitLab »á¿´·¨Ö·£¬¿ÉÒÔÉèÖÃΪ http://ÄãµÄЧÀÍÆ÷IP»òÓòÃû/£¬smtp_xxx ÊÇ GitLab ·¢ËÍÓʼþʱʹÓÃµÄ SMTP ЧÀÍÆ÷µÇ¼ÐÅÏ¢¡£
Æô¶¯ GitLab
Íê³ÉÉèÖúó£¬Ê¹ÓÃÒÔÏÂÏÂÁîÆô¶¯ GitLab£º
sudo gitlab-ctl reconfigure
µÇ¼ºó¸´ÖÆ
ͨ¹ýÒÔÉÏ°ì·¨£¬¾Í¿ÉÒÔÔÚ°¢ÀïÔÆÉÏÀֳɰ²ÅÅ GitLab ÁË¡£¿ÉÒÔÔÚä¯ÀÀÆ÷Öлá¼û http://ÄãµÄЧÀÍÆ÷IP»òÓòÃû/£¬ÊäÈë³õʼ»¯ºóÌìÉúµÄÖÎÀíÔ±Õ˺źÍÃÜÂë¼´¿ÉµÇ¼ GitLab¡£ÔÚ GitLab ÉÏ¿ÉÒÔ½¨ÉèÏîÄ¿¡¢ÖÎÀí´úÂë¡¢¾ÙÐÐÍŶÓÐ×÷ºÍÒ»Á¬¼¯³ÉµÈ²Ù×÷¡£
×ܽá
°¢ÀïÔÆÊÇÒ»¸öÌṩ¶àÖÖÔÆÅÌËãЧÀ͵Äƽ̨£¬ÔÚÔÆÅÌËãÁìÓòÓÐן»ºñµÄÂÄÀúºÍÁìÏȵÄÊÖÒÕ¡£Í¨¹ýÒÔÉÏ°ì·¨£¬ÎÒÃÇ¿ÉÒÔÔÚ°¢ÀïÔÆÉÏÀֳɵذ²ÅÅ GitLab¡£Í¨¹ý GitLab£¬¾ÓÉÍŶÓÐ×÷ºó£¬´úÂëµÄÖÊÁ¿¿ÉÒÔ»ñµÃÌáÉý£¬Ð§ÂÊÒ²¿ÉÒÔ»ñµÃ´ó·ùÌáÉý¡£Òò´Ë£¬°¢ÀïÔÆ GitLab °²ÅŶԿª·¢Õ߶øÑÔÊǺÜÊÇÖ÷ÒªµÄ¡£
ÐèҪעÖصÄÊÇ£¬GitLab °²ÅÅÍê³Éºó£¬ÐèÒª¾ÙÐÐһЩÇå¾²ÉèÖ㬱£»¤´úÂëÇå¾²¡£±ðµÄ£¬ÔÚʹÓà GitLab µÄÀú³ÌÖУ¬ÐèҪעÖØÊý¾Ý±¸·ÝÓë»Ö¸´ÒÔ¼°Éý¼¶¸üеÈÎÊÌ⣬ÒÔ°ü¹ÜÍŶӵĿª·¢ÔË×÷²»ÊÜÓ°Ïì¡£
ÒÔÉϾÍÊÇÔõÑùÔÚ°¢ÀïÔÆÉÏ°²ÅÅ GitLabµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡