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

ÁÄÁÄGitLabµÄ×°Öð취

gitlabÊÇÒ»¸ö»ùÓÚgitµÄÔÚÏß´úÂëÍйܡ¢°æ±¾¿ØÖÆ¡¢ÏîÄ¿ÖÎÀíºÍЭ×÷¹¤¾ß¡£Ëü²»µ«ÌṩÁËÍêÕûµÄgit¿ÍÕ»ÖÎÀí¹¦Ð§ £¬ÕÕ¾ÉÒ»¸öÍêÕûµÄci/cd¼¯³Éƽ̨ £¬ÌṩÁË´úÂëÉóÔÄ¡¢´úÂëÖÎÀí¡¢²âÊÔ¡¢´úÂë¹¹½¨¡¢°²ÅŵÈһϵÁÐÓ¦Óà £¬Ê¹µÃ¿ª·¢ÍŶÓÔÚ´úÂ뿪·¢¡¢²âÊÔ¡¢°²Åż°´úÂëά»¤µÈ·½ÃæÔ½·¢¸ßЧºÍЭ×÷¡£±¾ÎĽ«ÏÈÈÝgitlabµÄ×°Öð취¡£

Ò»¡¢×°ÖÃÐëÒªµÄÈí¼þ°ü

ÔÚ×°ÖÃ֮ǰ £¬ÐèÒªÏÈ×°ÖÃÔËÐÐGitLabËù±ØÐèµÄÈí¼þ°ü £¬°üÀ¨curl¡¢openssh-server¡¢ca-certificates¡¢ºÍÓʼþЧÀÍÆ÷£¨SMTP£©¡£ÓÃÒÔÏÂÏÂÁîÀ´×°ÖÃÒÔÉÏÈí¼þ°ü£º

sudo apt-get install curl openssh-server ca-certificates postfix

µÇ¼ºó¸´ÖÆ

ÔÚ×°ÖÃʱ´ú»áÌáÐÑÄãÑ¡ÔñÒ»¸öÓʼþÉèÖÃÀàÐÍ £¬Ä¬ÈÏÒ»Ñùƽ³£Ñ¡Ôñ¡°Internet Site¡±¼´¿É¡£

¶þ¡¢Ìí¼ÓGitLabÈí¼þÔ´

ÏÂÒ»²½ÊÇÌí¼ÓGitLab¹Ù·½Èí¼þÔ´¡£½«ÒÔÏÂÏÂÁÖƵ½ÖÕ¶ËÖÐÖ´ÐУº

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

µÇ¼ºó¸´ÖÆ

ÈôÊÇÄãµÄϵͳÊÇ Debian 7£¨Wheezy) £¬Ê¹ÓÃÒÔÏÂÏÂÁ

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo os=debian dist=wheezy bash

µÇ¼ºó¸´ÖÆ

Èý¡¢×°ÖÃ GitLab

ÔÚÌí¼ÓÈí¼þÔ´ºó £¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁî×°Öà GitLab£º

sudo apt-get install gitlab-ce

µÇ¼ºó¸´ÖÆ

Õâ¸öÀú³Ì¿ÉÄÜÐèҪһЩʱ¼ä £¬ÓÉÓÚËüÐèÒªÏÂÔØ GitLab µÄ×°Öðü²¢¾ÙÐÐ×°Öá£

ËÄ¡¢ÉèÖÃGitLab

×°ÖÃÍê³Éºó½«GitLabÉèÖÃÎļþ /etc/gitlab/gitlab.rb »®·Ö·­¿ª £¬°´ÐèÐ޸ġ£³£ÓõÄÉèÖðüÀ¨£º

ÉèÖÃÓʼþЧÀÍÆ÷£º¿ÉÒÔʹÓÃÍⲿÓʼþЧÀÍÆ÷ £¬Ò²¿ÉÒÔʹÓÃÍâµØÉèÖõÄSMTP¡£ÔÚ gitlab.rb ÎļþÖÐÐÞ¸Ä

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.server.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "smtp-user"
gitlab_rails['smtp_password'] = "smtp-password"
gitlab_rails['smtp_domain'] = "smtp.server.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = false
gitlab_rails['smtp_tls'] = true
gitlab_rails['smtp_openssl_verify_mode'] = 'peer'

µÇ¼ºó¸´ÖÆ

ÐèҪƾ֤ÏÖÕæÏàÐÎÌîд SMTP ЧÀÍÆ÷µÄµØµã¡¢¶Ë¿Ú¡¢ÈÏÖ¤ÐÅÏ¢µÈ¡£

ÐÞ¸ÄGitLab¼àÌýµÄ¶Ë¿Ú£ºÔÚ /etc/gitlab/gitlab.rb ÎļþÖÐÕÒµ½ external_url £¬²»Ê¹Óà 80 ¶Ë¿Úʱ £¬ÐèÒªÐ޸ijÉÒÔÏÂÃûÌãº

external_url 'http://gitlab.example.com:8080'

µÇ¼ºó¸´ÖÆ

ÆäÖÐĬÈϵĶ˿ÚÊÇ 80 ºÍ 443¡£

¹³×Ó£¨hooks£©µÄ±àд£º¿ÉÒÔÔÚ /opt/gitlab/embedded/service/gitlab-shell/hooks Öнç˵¹³×Ӿ籾¡£

Îå¡¢ÖØÆôGitLab

ÔÚÐÞ¸ÄÉèÖÃÎļþºó £¬ÐèÒªÖØÆôGitLabʹÆäÉúЧ¡£ÓÃÒÔÏÂÏÂÁîÖØÆô GitLab£º

sudo gitlab-ctl reconfigure

µÇ¼ºó¸´ÖÆ

Ò²¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÖØÆôËùÓÐ GitLab ×é¼þ£º

sudo gitlab-ctl restart

µÇ¼ºó¸´ÖÆ

ÕâÑù £¬Ò»¸öGitLab×°ÖúÃÁË £¬¿ÉÒÔÔÚ Web ä¯ÀÀÆ÷ÖÐÊäÈë http://your_server_ip »á¼û GitLab ЧÀÍÆ÷¡£

×ܽá

ÒÔÉÏÊÇÔÚUbuntuϵͳϵÄGitLab×°ÖÃÀú³Ì¡£ÔÚÆäËû²Ù×÷ϵͳÏ £¬×°ÖÃÀú³Ì¿ÉÄÜÓÐЩÐí²î±ð £¬¿ÉÊÇ»ù±¾°ì·¨ÊÇÏàËƵÄ¡£Ï£Íû±¾ÆªÎÄÕÂÄܹ»ÓÐÖúÓÚÄúÔÚÇéÐÎÖÐ×°ÖÃGitLab¡£

ÒÔÉϾÍÊÇÁÄÁÄGitLabµÄ×°Öð취µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

QR code
ÍøÕ¾µØͼ