´øÄãÒ»²½²½ÔÚCentOS×°ÖÃGitLab
Ëæ×ÅÏÖ´úÈí¼þ¿ª·¢Á÷³ÌµÄÒ»Ö±½ø»¯£¬°æ±¾¿ØÖÆϵͳÒѾ³ÉΪÿ¸ö¿ª·¢ÍŶӱز»¿ÉÉٵŤ¾ß¡£¶øgitlab£¬×÷Ϊһ¸öÍêÕûµÄ¿ªÔ´gitÖÎÀíϵͳ£¬ÒѳÉΪÐí¶à¹«Ë¾ºÍ×éÖ¯µÄÊ×Ñ¡£¬Ê¹ÍŶÓÐͬÊÂÇéÔ½·¢¸ßЧ¿ì½Ý¡£±¾ÎĽ«´øÄãÒ»²½²½×°ÖÃgitlab£¬²¢ÔÚcentos 7²Ù×÷ϵͳÉÏÉèÖÃËü¡£
×¼±¸ÊÂÇé
ÔÚ×îÏÈ×°ÖÃGitLab֮ǰ£¬ÎÒÃÇÐèҪȷ±£ÒÔϼ¸Ïî×¼±¸ÊÂÇ飺
CentOS 7²Ù×÷ϵͳ
×°Öò¢ÉèÖúÃPostgreSQL»òMySQLÊý¾Ý¿â
×°ÖúÍÉèÖÃÓʼþЧÀÍÆ÷£¨ÈôÊÇÐèÒª£©
È·±£ÕâЩ׼±¸ÊÂÇ鶼ÒÑÍê³Éºó£¬ÎÒÃǾͿÉÒÔ×îÏÈ×°ÖÃGitLabÁË¡£
°ì·¨ 1£º×°ÖÃÒÀÀµÏî
ÎÒÃÇÐèÒªÏÈ×°ÖÃһЩÒÀÀµÏ²Å»ªÀÖ³É×°ÖÃGitLab¡£Ê¹ÓÃÒÔÏÂÏÂÁî×°ÖÃËùÐèµÄÒÀÀµÏ
sudo yum install -y curl policycoreutils openssh-server openssh-clients sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
µÇ¼ºó¸´ÖÆ
°ì·¨ 2£º×°ÖÃGitLab
ÔÚ CentOS ÉÏ×°Öà GitLab£¬ÎÒÃÇ¿ÉÒÔʹÓà Omnibus Èí¼þ°ü¡£Òª×°Öà Omnibus Èí¼þ°ü£¬ÇëʹÓÃÒÔÏÂÏÂÁ
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash sudo yum install -y gitlab-ce
µÇ¼ºó¸´ÖÆ
ÉÏÊöÏÂÁͨ¹ýGitLab Repositories×°ÖÃGitLab CE¡£
°ì·¨ 3£ºÉèÖúÍÆô¶¯GitLab
×°ÖÃÍê³Éºó£¬ÎÒÃÇÐèÒªÉèÖò¢Æô¶¯GitLab¡£Ê×ÏÈ£¬ÄúÐèÒª±à¼ÒÔÏÂÎļþ£º
sudo vi /etc/gitlab/gitlab.rb
µÇ¼ºó¸´ÖÆ
ÄúÐèҪƾ֤Äú×Ô¼ºµÄÐèÒªÉèÖÃGitLab¡£ÔÚÕâÀÎÒÃǽöÏÈÈÝһЩ»ù±¾ÉèÖã¬Äú¿ÉÒÔƾ֤ÐèÒª¾ÙÐиü¸Ä¡£
external_url 'http://gitlab.example.com' ... ... postgresql['enable'] = false mysql['enable'] = true mysql['client_encoding'] = 'utf8mb4' mysql['utf8mb4'] = true ... ... gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.gmail.com" gitlab_rails['smtp_port'] = 587 gitlab_rails['smtp_user_name'] = "gitlab@example.com" gitlab_rails['smtp_password'] = "smtp_password" gitlab_rails['smtp_domain'] = "example.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true
µÇ¼ºó¸´ÖÆ
ÔÚÄúÍê³ÉÉèÖúó£¬ÇëʹÓÃÒÔÏÂÏÂÁîÖØÆôGitLabЧÀÍ£º
sudo gitlab-ctl reconfigure sudo gitlab-ctl restart
µÇ¼ºó¸´ÖÆ
°ì·¨ 4£ºÔÚä¯ÀÀÆ÷Öлá¼ûGitLab
ÏÖÔÚÄú¿ÉÒÔÔÚä¯ÀÀÆ÷Öлá¼ûGitLab¡£ÔÚä¯ÀÀÆ÷ÖмüÈëÄú×°ÖõÄЧÀÍÆ÷µÄIPµØµã»òÓòÃû£¬ºóÃæ¼ÓÉÏ’/’ºÍ’users/sign_in’£¬ÒԵǼµ½GitLab¡£
http://<server-ip>/users/sign_in</server-ip>
µÇ¼ºó¸´ÖÆ
ÏÖÔÚ£¬Äú¿ÉÒÔʹÓÃÔ¤ÏȽç˵µÄĬÈÏÖÎÀíÔ±ÕÊ»§admin@example.comµÇ¼²¢×îÏÈʹÓÃGitLabÁË¡£¿ÉÊÇ£¬ÎªÁËÈ·±£Çå¾²ÐÔ£¬Çëƾ֤ÐèÒª½¨ÉèÒ»¸öÐÂÖÎÀíÔ±ÕÊ»§²¢É¾³ýĬÈÏÖÎÀíÔ±ÕÊ»§¡£
×ܽá
ÔÚ±¾ÆªÎÄÕÂÖУ¬ÎÒÃÇÏÈÈÝÁËÔÚ CentOS 7 ÉÏ×°Öà GitLab µÄ°ì·¨¡£ÎÒÃÇÒÀ´Î×°ÖÃÁËÒÀÀµÏʹÓà Omnibus Èí¼þ°ü×°ÖÃÁË GitLab CE £¬È»ºóÉèÖúÍÆô¶¯ÁË GitLab¡£ÏÖÔÚ£¬Äú¿ÉÒÔʹÓà GitLab ÖÎÀíÄúµÄÏîÄ¿ºÍÐͬÊÂÇéÁË¡£
ÒÔÉϾÍÊÇ´øÄãÒ»²½²½ÔÚCentOS×°ÖÃGitLabµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡