CentOS 7ÏÂÔõÑù×°ÖÃGitLabЧÀÍÆ÷
gitlabÊÇÒ»¸ö»ùÓÚgitµÄ´úÂëÍйÜÓë°æ±¾¿ØÖÆƽ̨£¬²»µ«Ìṩһ¸öÇ¿Ê¢µÄ´úÂëÐ×÷ƽ̨£¬»¹¼¯³ÉÁËci/cd¹¦Ð§£¬ÆóÒµÓû§¿ÉÒÔ½è´ËʵÏÖ¸ßЧµÄÈí¼þ¿ª·¢¡¢Ò»Á¬¼¯³É¡¢Ò»Á¬½»¸¶¡£±¾ÎĽ«ÏÈÈÝÔÚcentos 7ÖÐÔõÑù×°ÖÃgitlabЧÀÍÆ÷¡£
°ì·¨Ò»£º×°ÖÃÐëÒªµÄÒÀÀµÏî
Ê×ÏÈ£¬ÎÒÃÇҪװÖÃһЩÐëÒªµÄÒÀÀµÏÒÔ±ãÄܹ»ÔÚÎÒÃǵÄϵͳÉϱàÒëºÍ×°ÖÃÈí¼þ°ü¡£ÒÔÏÂÊÇ×°ÖÃËùÐèÒÀÀµÏîµÄÏÂÁ
sudo yum install curl policycoreutils openssh-server openssh-clients sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo systemctl reload firewalld
µÇ¼ºó¸´ÖÆ
°ì·¨¶þ£ºÌí¼ÓGitLab´æ´¢¿â²¢×°ÖÃGitLab
ÓÉÓÚGitLab²»ÔÚCentOSÈí¼þÔ´ÖУ¬ÎÒÃÇÐèÒªÊÖ¶¯Ìí¼ÓGitLab´æ´¢¿â¡£ÒÔÏÂÊÇÌí¼Ó´æ´¢¿âµÄÏÂÁ
sudo curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
µÇ¼ºó¸´ÖÆ
½Ó×Å£¬Ê¹ÓÃÒÔÏÂÏÂÁî×°ÖÃGitLab£º
sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ce
µÇ¼ºó¸´ÖÆ
ÔÚÉÏÃæµÄÏÂÁîÖУ¬ÐèÒª½«http://gitlab.example.comÌ滻ΪÄúµÄGitLabЧÀÍÆ÷µÄÖ÷»úÃû»òIPµØµã¡£
°ì·¨Èý£ºÉèÖÃGitLab
ÔÚ×°ÖÃGitLabºó£¬ÐèÒª¶ÔÆä¾ÙÐÐһЩ»ù±¾ÉèÖã¬ÈçÉèÖÃSMTPºÍÕÊ»§ºÍÃÜÂëµÈ¡£Äú¿ÉÒÔͨ¹ý±à¼ÒÔÏÂÎļþ¾ÙÐÐÉèÖãº
sudo vi /etc/gitlab/gitlab.rb
µÇ¼ºó¸´ÖÆ
ÔÚÉèÖÃSMTPʱ£¬¿ÉÒÔʹÓÃÒÔÏÂÉèÖãº
gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.qq.com" gitlab_rails['smtp_port'] = 465 gitlab_rails['smtp_user_name'] = "yourname@qq.com" gitlab_rails['smtp_password'] = "yourpassword" gitlab_rails['smtp_domain'] = "smtp.qq.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true gitlab_rails['smtp_tls'] = true
µÇ¼ºó¸´ÖÆ
Çë×¢ÖØ£¬ÉÏÊöÉèÖÃÖУ¬ÐèÒª½«smtp_addressÌ滻ΪÄúµÄSMTPЧÀÍÆ÷µØµã£¬½«smtp_user_nameºÍsmtp_passwordÌ滻ΪÄúµÄSMTPÕÊ»§ºÍÃÜÂë¡£
Ìá½»¸ü¸Äºó£¬Ê¹ÓÃÒÔÏÂÏÂÁîÖØÐÂÉèÖÃGitLab£º
sudo gitlab-ctl reconfigure
µÇ¼ºó¸´ÖÆ
°ì·¨ËÄ£º»á¼ûGitLab
ÏÖÔÚ£¬Äú¿ÉÒÔͨ¹ýä¯ÀÀÆ÷»á¼ûGitLabÁË¡£½öÐèÔڵصãÀ¸ÖÐÊäÈëÄúµÄЧÀÍÆ÷IPµØµã»òÖ÷»úÃû£¬¼´¿É·¿ªGitLab½çÃ档Ȼºó£¬Äú¿ÉÒÔʹÓÃÖÎÀíÔ±ÕÊ»§µÇ¼²¢×îÏÈʹÓÃGitLab¡£
×ܽá
×°ÖÃGitLabЧÀÍÆ÷²¢²»ÖØ´ó£¬Ö»Ðèƾ֤ÉÏÊö°ì·¨ÖðÒ»Ö´Ðм´¿É¡£ÎÞÂÛÄúÊÇ´óÐÍÆóÒÃ÷ÈÕÕ¾É×ÔÁ¦¿ª·¢Ö°Ô±£¬GitLab×÷Ϊ´úÂëÐ×÷ºÍ°æ±¾¿ØÖÆƽ̨¶¼ÎªÄúÌṩÁËÇ¿Ê¢µÄ¹¤¾ß£¬Ö§³ÖÒªº¦ÓªÒµÁ÷³ÌºÍÎÞаµÄ¿ª·¢·½·¨¡£
ÒÔÉϾÍÊÇCentOS 7ÏÂÔõÑù×°ÖÃGitLabЧÀÍÆ÷µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡