UbuntuÉÏÔõô´î½¨gitlabЧÀÍÆ÷
Ëæ×ÅÈí¼þ¿ª·¢Á÷³ÌµÄһֱˢУ¬°æ±¾¿ØÖƹ¤¾ß³ÉΪÁËÒªº¦µÄ×é³É²¿·Ö¡£gitÊÇÏÖÔÚ×î³£Óõİ汾¿ØÖƹ¤¾ßÖ®Ò»¡£git×î´óµÄÓŵãÔÚÓÚÂþÑÜʽ°æ±¾¿ØÖÆ£¬Ê¹µÃ¿ª·¢Ö°Ô±¿ÉÒÔÔÚ²î±ðµÄËùÔÚºÍʱ¼ä¾ÙÐÐÐ×÷¿ª·¢¡£¶øgitlabÔòÊÇÒ»¸öÓÉgit¿ØÖƺÍÖÎÀíµÄwebÓ¦ÓóÌÐò£¬ËüÌṩÁË¿ª·ÅÔ´´úÂëµÄgit´úÂëÍйܡ¢ÎÊÌâ×·×Ù¡¢ci/cdºÍwikiµÈ¹¦Ð§¡£ÔÚÕâƪÎÄÕÂÖУ¬ÎÒÃǽ«ÏÈÈÝÔõÑùÔÚubuntu²Ù×÷ϵͳÉϴgitlabЧÀÍÆ÷¡£
µÚÒ»²½£º×°ÖÃÐëÒªµÄÈí¼þ°ü
ÔÚ×îÏÈ֮ǰ£¬ÐèÒªÔÚ»úеÉÏ×°ÖÃһЩÐëÒªµÄÈí¼þ°ü¡£ÕâЩ°ü¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÀ´×°Öá£
sudo apt-get update sudo apt-get upgrade sudo apt-get install curl openssh-server ca-certificates postfix
µÇ¼ºó¸´ÖÆ
µ±ÌáÐÑÄãÉèÖÃÓʼþЧÀÍÆ÷µÄʱ¼ä£¬Ñ¡Ôñ¡°Internet Site¡±²¢»Ø¸²µ¥Ñ¡Ïî¡°General type of mail configuration¡±¡£
µÚ¶þ²½£º×°ÖÃGitLab
ÔÚ×°ÖÃGitLab֮ǰ£¬ÐèÒªÏÈÉèÖÃGitLabµÄÔ´¡£Ð½¨Îļþ/etc/apt/sources.list.d/gitlab-ce.list²¢Ð´ÈëÒÔÏÂÄÚÈÝ¡£
deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main
µÇ¼ºó¸´ÖÆ
½Ó×ÅÖ´ÐÐÒÔÏÂÏÂÁî¡£
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - sudo apt-get update sudo apt-get install gitlab-ce
µÇ¼ºó¸´ÖÆ
×¢ÖØ£ºÕâÀïʹÓõÄÊÇÇ廪´óѧµÄ¾µÏñÔ´£¬ÓÉÓÚËüµÄËÙÂÊ»á±È¹Ù·½Ô´Òª¿ì¡£
µÚÈý²½£ºÉèÖÃGitLab
×°ÖÃÍê³ÉÖ®ºó£¬ÐèÒª¾ÙÐÐһЩÉèÖ᣷¿ªGitLabÉèÖÃÎļþ/etc/gitlab/gitlab.rb¡£
sudo nano /etc/gitlab/gitlab.rb
µÇ¼ºó¸´ÖÆ
ÕÒµ½ÒÔÏÂÄÚÈÝ¡£
# gitlab_external_url 'http://gitlab.example.com'
µÇ¼ºó¸´ÖÆ
ɨ³ý×¢ÊͲ¢½«http://gitlab.example.comÌ滻ΪÄãµÄÓòÃû»òÕßЧÀÍÆ÷µÄIPµØµã¡£
gitlab_external_url 'http://your_domain_or_IP'
µÇ¼ºó¸´ÖÆ
½Ó×Å£¬ÕÒµ½ÒÔÏÂÄÚÈÝ¡£
# unicorn['port'] = 8080
µÇ¼ºó¸´ÖÆ
ɨ³ý×¢ÊͲ¢½«¶Ë¿ÚºÅ¸ÄΪ80¡£
unicorn['port'] = 80
µÇ¼ºó¸´ÖÆ
×îºó£¬Ö´ÐÐÒÔÏÂÏÂÁî²¢ÆÚ´ýGitLabÆô¶¯Íê³É¡£
sudo gitlab-ctl reconfigure
µÇ¼ºó¸´ÖÆ
µÚËIJ½£º»á¼ûGitLab
Íê³ÉÉÏÊö°ì·¨Ö®ºó£¬¿ÉÒÔÔÚä¯ÀÀÆ÷ÖÐÊäÈëhttp://your_domain_or_IPÀ´»á¼ûGitLab¡£ÔÚÊ״λá¼ûGitLabµÄʱ¼ä»áÒªÇóÄãÉèÖÃÒ»¸öÖÎÀíÔ±ÕË»§¡£ÉèÖÃÍê³ÉÖ®ºó¾Í¿ÉÒÔ×îÏÈʹÓÃGitLabÁË¡£
×ܽá
ÔÚ±¾ÎÄÖУ¬ÎÒÃÇÏÈÈÝÁËÔõÑùÔÚUbuntu²Ù×÷ϵͳÉϴGitLabЧÀÍÆ÷¡£ÔڴЧÀÍÆ÷µÄÀú³ÌÖУ¬ÎÒÃÇÐèҪװÖÃÐëÒªµÄÈí¼þ°ü¡¢ÉèÖÃGitLabµÄÔ´¡¢×°ÖÃGitLab²¢¾ÙÐÐÏà¹ØÉèÖᢻá¼ûGitLab¡£Ï£ÍûÕâƪÎÄÕÂÄܹ»¶ÔÄãÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊÇUbuntuÉÏÔõô´î½¨gitlabЧÀÍÆ÷µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡