×ðÁú¿­Ê±¹ÙÍøµÇ¼

ÔõÑùÔÚMacµçÄÔÉϴGitLabЧÀÍÆ÷

½üÄêÀ´ £¬Ëæ×Å»¥ÁªÍøÊÖÒÕµÄѸÃÍÉú³¤ £¬Ô½À´Ô½¶àµÄ¿ª·¢Ö°Ô±×îÏÈʹÓà git ¾ÙÐдúÂëÖÎÀí¡£git ÊÇÒ»¸öÃâ·Ñ¡¢¿ªÔ´µÄÂþÑÜʽ°æ±¾¿ØÖÆϵͳ £¬Ëü¿ÉÒÔʵÏÖÍŶÓЭ×÷¡¢°æ±¾ÖÎÀíµÈÖ÷Òª¹¦Ð§¡£ÔÚ git µÄÖڶ๤¾ßÖÐ £¬gitlab ÊÇÏÖÔÚ×îÊܽӴýµÄÒ»¿î £¬ËüÌṩÁËÍêÕûµÄ´úÂëÖÎÀí¡¢×Ô¶¯»¯²âÊԺͰ²ÅÅÁ÷³ÌµÈ¹¦Ð§ £¬²¢ÇÒºÜÊÇÒ×ÓÚʹÓᣱ¾ÎĽ«ÏêϸÏÈÈÝÔõÑùÔÚ mac µçÄÔÉϴ gitlab ЧÀÍÆ÷ £¬ÒÔ±ãÓÚ×Ô¼º»òÍŶӾÙÐдúÂëÖÎÀí¡£

Ò»¡¢×°ÖÃÒÀÀµÈí¼þ

´î½¨ GitLab ЧÀÍÆ÷ÐèÒªÏÈ×°ÖÃÏà¹ØÈí¼þ¡£ÔÚ Mac ÉÏ £¬¿ÉÒÔʹÓà Homebrew Õâ¸ö°ü¹ÜÀíÆ÷À´×°ÖÃÕâЩÈí¼þ¡£

×°Öà Homebrew °ü¹ÜÀíÆ÷¡£·­¿ªÖÕ¶Ë £¬ÊäÈëÒÔÏÂÏÂÁ

ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

ÆÚ´ý×°ÖÃÍê³Éºó £¬ÊäÈë brew -v £¬¼´¿ÉÉó²é Homebrew °æ±¾ÐÅÏ¢¡£

×°Öà GIT¡£ÊäÈëÒÔÏÂÏÂÁ

brew install git

ÆÚ´ý×°ÖÃÍê³Éºó £¬ÊäÈë git –version £¬¼´¿ÉÉó²é Git °æ±¾ÐÅÏ¢¡£

×°Öà Postfix¡£GitLab ÐèÒªÒ»¸öÓʼþЧÀÍÆ÷À´·¢ËÍÓʼþ֪ͨ £¬ÕâÀïʹÓà Postfix¡£ÊäÈëÒÔÏÂÏÂÁ

brew install postfix

×°ÖÃÍê³Éºó £¬Ö´ÐÐÒÔÏÂÏÂÁîÀ´Æô¶¯ Postfix£º

sudo launchctl start org.postfix.master

×°Öà SSH¡£ÊäÈëÒÔÏÂÏÂÁ

brew install openssh

×°ÖÃÍê³Éºó £¬ÊäÈë ssh -V £¬¼´¿ÉÉó²é SSH °æ±¾ÐÅÏ¢¡£

¶þ¡¢ÏÂÔز¢×°Öà GitLab

ÏÂÔØ GitLab ×°Öðü¡£ÔÚä¯ÀÀÆ÷Öз­¿ª GitLab ¹ÙÍø£¨https://about.gitlab.com/install/£© £¬µã»÷×îÏ·½µÄÒªÇó½ÏÉٵİ汾 £¬È»ºóÏÂÔضÔÓ¦µÄ Mac °æ±¾¡£

×°Öà GitLab¡£ÔÚÖÕ¶ËÖÐÇл»µ½ÏÂÔØµÄ GitLab ×°ÖðüËùÔÚµÄĿ¼ £¬ÊäÈëÒÔÏÂÏÂÁ

sudo dpkg -i gitlab-ce-*.deb

ÆÚ´ý×°ÖÃÍê³Éºó £¬ÊäÈë gitlab-ctl reconfigure ÏÂÁî £¬¼´¿ÉÍê³É GitLab µÄ×°Öúͳõʼ»¯¡£

Èý¡¢ÉèÖà GitLab

µÇ¼ GitLab¡£ÔÚä¯ÀÀÆ÷ÖÐÊäÈë http://localhost:8080 £¬¼´¿É»á¼û GitLab¡£ÔÚÊ״λá¼ûʱ £¬ÏµÍ³½«ÌáÐÑÄúÉèÖÃÖÎÀíÔ±ÕË»§ºÍÃÜÂë¡£

ÐÞ¸Ä GitLab ÉèÖá£ÔÚÖÕ¶ËÖÐÊäÈë sudo vi /etc/gitlab/gitlab.rb ÏÂÁî £¬¼´¿É½øÈë GitLab µÄÉèÖÃÎļþ¡£ÔÚÎļþÖÐËÑË÷¡°external_url¡±Ò»´Ê £¬ÐÞ¸ÄØʺóÃæµÄ URL µØµãΪÄúµÄ GitLab IP µØµã»òÓòÃû¡£ÀýÈç £¬ÈôÊÇÄúµÄµçÄÔ IP µØµãÊÇ192.168.0.100 £¬ÄÇô¿ÉÒÔ½«¸ÃÉèÖÃÏîÐÞ¸ÄΪ£º

external_url ‘http://192.168.0.100:8080’

ÉúÑIJ¢¹Ø±ÕÉèÖÃÎļþ £¬ÊäÈë gitlab-ctl reconfigure ÏÂÁî £¬ÒÔ¼¤»îеÄÉèÖá£

ÉèÖà GitLab SMTP Óʼþ²ÎÊý¡£ÔÚÖÕ¶ËÖÐÊäÈë sudo vi /etc/gitlab/gitlab.rb ÏÂÁî £¬ÕÒµ½¡°smtp_settings¡±ÉèÖÃÏî £¬ÉèÖÃÏà¹ØµÄ SMTP ЧÀͲÎÊý¡£ÀýÈç £¬ÈôÊÇÄúʹÓà Gmail SMTP ЧÀÍÆ÷ £¬¿ÉÒÔ½«¸ÃÉèÖÃÏîÐÞ¸ÄΪ£º

gitlab_rails[‘smtp_address’] = “smtp.gmail.com”

gitlab_rails[‘smtp_port’] = 587

gitlab_rails[‘smtp_user_name’] = “your_gmail_account”

gitlab_rails[‘smtp_password’] = “your_gmail_password”

gitlab_rails[‘smtp_enable_starttls_auto’] = true

gitlab_rails[‘smtp_tls’] = false

ÉúÑIJ¢¹Ø±ÕÉèÖÃÎļþ £¬ÊäÈë gitlab-ctl reconfigure ÏÂÁî £¬ÒÔ¼¤»îеÄÉèÖá£

ËÄ¡¢Ê¹Óà GitLab

½¨ÉèеÄÏîÄ¿¡£ÔÚ GitLab Ö÷Ò³ÖÐ £¬µã»÷¡°New Project¡±°´Å¥ £¬ÊäÈëÏîÄ¿ÃûºÍÐÎò £¬Ñ¡ÔñÏîÄ¿µÄ»á¼ûȨÏ޺ͰæȨЭÒé £¬È»ºóµã»÷¡°Create project¡±¼´¿ÉÍê³ÉÏîÄ¿µÄ½¨Éè¡£

¾ÙÐдúÂëÖÎÀíºÍЭ×÷¡£ÔÚÏîÄ¿Ò³ÃæÖÐ £¬µã»÷¡°Repository¡±±êÇ©Ò³ £¬¼´¿ÉÉó²é²¢±à¼­ÏîÄ¿µÄËùÓдúÂë¡£ÔÚ¡°Merge Requests¡±±êÇ©Ò³ £¬¿ÉÒÔÉó²éºÍÏìÓ¦ÆäËûÍŶӳÉÔ±µÄ´úÂëºÏ²¢ÇëÇó¡£ÔÚ¡°Issues¡±±êÇ©Ò³ £¬¿ÉÒÔ½¨ÉèºÍÖÎÀíÏîÄ¿µÄÎÊÌâºÍʹÃü¡£

ÒÔÉϾÍÊÇÔÚ Mac Éϴ GitLab ЧÀÍÆ÷µÄËùÓÐÀú³Ì¡£½èÖú GitLab £¬ÍŶӳÉÔ±¿ÉÒÔ¸ßЧµØЭͬ¿ª·¢ºÍÖÎÀí´úÂë £¬Ìá¸ß¿ª·¢Ð§ÂʺʹúÂëÖÊÁ¿¡£ÈôÊÇÄúÏë¸üÉîÈëµØѧϰ GitLab £¬¿ÉÒÔÉó²é GitLab ¹Ù·½Îĵµ£¨https://docs.gitlab.com/£©»ò¼ÓÈë GitLab ¹Ù·½Åàѵ¿Î³Ì¡£×£ÄúÔÚ GitLab Öпª·¢Óä¿ì£¡

ÒÔÉϾÍÊÇÔõÑùÔÚMacµçÄÔÉϴGitLabЧÀÍÆ÷µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ