centosÉÏÔõôװÖÃÉèÖÃgitlab£¨ÒªÁìÏê½â£©
ÔÚ¾ÙÐÐÈí¼þ¿ª·¢Ê±£¬°æ±¾¿ØÖÆÊÇÒ»Ïî±Ø²»¿ÉÉÙµÄʹÃü£¬ÓÐÖúÓÚÍŶÓÐ×÷ºÍ´úÂëÖÎÀí¡£gitlabÊÇÒ»¸öÊ¢ÐеĿªÔ´Èí¼þ£¬ÓÉÓÚÆäÈËÐÔ»¯µÄ½çÃæºÍÇ¿Ê¢µÄ¹¦Ð§£¬¹ãÊܽӴý¡£±¾ÎĽ«Îª¸÷ÈËÏÈÈÝÔõÑùÔÚcentosÉÏ×°ÖÃgitlab²¢¾ÙÐÐÉèÖá£
Ò»¡¢×°ÖÃGitLabËùÐèµÄÇéÐÎ
ÔÚ×°ÖÃGitLab֮ǰ£¬ÎÒÃÇÐèҪװÖÃһЩÐëÒªµÄÈí¼þ°ü£º
ʹÓÃÒÔÏÂÏÂÁîÀ´¸üÐÂyumÈí¼þ¿ÍÕ»£º
sudo yum -y update
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
×°ÖÃPostfixÓʼþЧÀÍÆ÷£º
sudo yum -y install postfix sudo systemctl enable postfix sudo systemctl start postfix
µÇ¼ºó¸´ÖÆ
×°ÖÃOpenSSL£º
sudo yum -y install openssl-devel
µÇ¼ºó¸´ÖÆ
×°ÖÃwget£º
sudo yum -y install wget
µÇ¼ºó¸´ÖÆ
¶þ¡¢×°Öò¢ÉèÖÃGitLab
Ê×ÏÈ£¬¸üÐÂЧÀÍÆ÷ÒÔ»ñÈ¡×îа汾µÄËùÓÐÈí¼þ°ü£º
sudo yum -y update
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
Ìí¼ÓGitLabÈí¼þ¿ÍÕ»£º
sudo wget https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh sudo chmod +x script.rpm.sh sudo ./script.rpm.sh
µÇ¼ºó¸´ÖÆ
×°ÖÃGitLab£º
sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ee
µÇ¼ºó¸´ÖÆ
£¨×¢ÖØ£º½«¡°https://gitlab.example.com¡±¸ü¸ÄΪÄú×Ô¼ºµÄÓòÃû£©
ÔÚ×°ÖÃÍê³Éºó£¬Ê¹ÓÃÒÔÏÂÏÂÁîÆô¶¯GitLabЧÀÍ£º
sudo systemctl start gitlab-runsvdir.service
µÇ¼ºó¸´ÖÆ
ÉèÖÃGitLabÖÎÀíÔ±ÃÜÂ룺
sudo gitlab-ctl reconfigure sudo gitlab-rake gitlab:setup
µÇ¼ºó¸´ÖÆ
×°ÖÃÍê³Éºó£¬Äú¿ÉÒÔ»á¼ûhttps://gitlab.example.com ÖÎÀíGitLab¡£ÔÚµÚÒ»´ÎµÇ¼ʱ£¬ÄúÐèҪʹÓÃÖÎÀíÔ±ÃÜÂë¾ÙÐеǼ¡£
Èý¡¢ÉèÖÃGitLab
ÐÞ¸ÄGitLabĬÈϵÄSSH¶Ë¿ÚºÅΪж˿Ú
sudo vim /etc/gitlab/gitlab.rb
µÇ¼ºó¸´ÖÆ
ÔÚ±à¼Æ÷ÖУ¬ÕÒµ½ÒÔÏÂÐв¢ÐÞ¸ÄΪËùÐèµÄ¶Ë¿ÚºÅ£º
#gitlab_rails['gitlab_shell_ssh_port'] = 22 gitlab_rails['gitlab_shell_ssh_port'] = 1234
µÇ¼ºó¸´ÖÆ
£¨×¢ÖØ£º½«1234¸ü¸ÄΪÄúҪʹÓõÄж˿ںţ©
ʹ¸ü¸ÄÉúЧ
sudo gitlab-ctl reconfigure
µÇ¼ºó¸´ÖÆ
ÔÚ·À»ðǽÖз¿ªÐ¶˿ڣ¨ÈôÊÇÐèÒª£©
sudo firewall-cmd --permanent --zone=public --add-port=1234/tcp sudo firewall-cmd --reload
µÇ¼ºó¸´ÖÆ
ËÄ¡¢×ܽá
ÔÚ×°ÖúÍÉèÖÃGitLabʱ£¬ÇëʼÖÕ¼Ç×ÅÈ·±£Äú×°ÖÃÁË×îа汾²¢×¼È·ÉèÖÃËùÓÐÉèÖá£Í¨¹ý׼ȷʹÓÃGitLab£¬Äú¿ÉÒÔÌá¸ßÍŶӵÄÉú²úÁ¦£¬²¢¸üÇáËɵØÖÎÀíºÍ¸ú×Ù´úÂëµÄ°æ±¾¿ØÖÆ¡£
ÒÔÉϾÍÊÇcentosÉÏÔõôװÖÃÉèÖÃgitlab£¨ÒªÁìÏê½â£©µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡