ÔõôÔÚCentOS7ÉÏ×°ÖÃGitlabCE
ÔÚÒ»Ñùƽ³£µÄÈí¼þ¿ª·¢ÖУ¬´úÂë°æ±¾ÖÎÀíÊǺÜÊÇÖ÷ÒªµÄÒ»»·½Ú¡£gitÊÇÏÖÔÚ×îÊ¢ÐеĴúÂë°æ±¾ÖÎÀí¹¤¾ßÖ®Ò»£¬¶øgitlabceÊÇgitlabµÄ¿ªÔ´°æ±¾£¬¿ÉÒÔÔÚ×Ô¼ºµÄЧÀÍÆ÷ÉÏ°²ÅÅ£¬Àû±ãµØÖÎÀí×Ô¼ºµÄ´úÂë¿â¡£±¾ÎĽ«ÏÈÈÝÔÚcentos 7ÉÏ×°ÖÃgitlabceµÄÀú³Ì¡£
Ò»¡¢×¼±¸ÊÂÇé
ÔÚ×îÏÈ×°ÖÃÇ°£¬ÐèҪȷ±£Ð§ÀÍÆ÷ÉÏ×°ÖÃÁËÒÔÏÂÈí¼þ°ü£º
yum-utils
curl
policycoreutils-python
ÈôÊÇûÓÐ×°Ö㬿ÉÒÔʹÓÃÒÔÏÂÏÂÁî×°Öãº
sudo yum install -y yum-utils curl policycoreutils-python
µÇ¼ºó¸´ÖÆ
½Ó×Å£¬ÐèÒªÌí¼ÓGitlabCEÈí¼þÔ´¡£¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
sudo curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
µÇ¼ºó¸´ÖÆ
¶þ¡¢×°ÖÃGitlabCE
×°ÖÃGitlabCE
ʹÓÃÒÔÏÂÏÂÁî×°ÖÃGitlabCE£º
sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ce
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬¡°http://gitlab.example.com¡±Ó¦¸ÃÌæ»»³É×Ô¼ºµÄGitlabµØµã¡£
Æô¶¯GitlabCE
ʹÓÃÒÔÏÂÏÂÁîÆô¶¯GitlabCE£º
sudo systemctl start gitlab-runsvdir.service
µÇ¼ºó¸´ÖÆ
¿ª»ú×ÔÆô¶¯
ʹÓÃÒÔÏÂÏÂÁîÉèÖÃGitlabCE¿ª»ú×ÔÆô¶¯£º
sudo systemctl enable gitlab-runsvdir.service
µÇ¼ºó¸´ÖÆ
Èý¡¢ÉèÖÃGitlabCE
·À»ðǽÉèÖÃ
ÈôÊÇЧÀÍÆ÷ÉÏÆôÓÃÁË·À»ðǽ£¬ÐèÒª¿ª·ÅGitlabCEµÄ¶Ë¿Ú£¬¼´HTTP£¨80£©ºÍHTTPS£¨443£©¶Ë¿Ú¡£¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ·Å¶Ë¿Ú£º
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo systemctl reload firewalld
µÇ¼ºó¸´ÖÆ
ÉèÖÃSMTPЧÀÍÆ÷
ÔÚGitlabCEÖУ¬¿ÉÒÔʹÓÃSMTPЧÀÍÆ÷·¢ËÍÓʼþ£¬ÈçÃÜÂëÖØÖá¢ÐÂÓû§×¢²áµÈµÈ¡£ÐèҪƾ֤×Ô¼ºµÄSMTPЧÀÍÆ÷ÉèÖÃÓʼþÉèÖ᣿ÉÒÔÔÚ¡°/etc/gitlab/gitlab.rb¡±ÎļþÖÐÐÞ¸ÄÒÔÏÂÉèÖãº
gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.example.com" gitlab_rails['smtp_port'] = 25 gitlab_rails['smtp_user_name'] = "user@example.com" gitlab_rails['smtp_password'] = "password" gitlab_rails['smtp_domain'] = "example.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬¡°smtp.example.com¡±Ó¦¸ÃÌæ»»³É×Ô¼ºµÄSMTPЧÀÍÆ÷µØµã£¬¡°user@example.com¡±ºÍ¡°password¡±»®·ÖÌæ»»³ÉSMTPЧÀÍÆ÷µÄÓû§ÃûºÍÃÜÂ룬¡°example.com¡±Ìæ»»³ÉSMTPЧÀÍÆ÷µÄÓòÃû¡£
ÐÞ¸ÄÉèÖúó£¬ÐèÒªÖØмÓÔØÉèÖãº
sudo gitlab-ctl reconfigure
µÇ¼ºó¸´ÖÆ
ÐÞ¸ÄÖÎÀíÔ±ÃÜÂë
Ê״εǼGitlabCEʱ£¬»á×Ô¶¯½¨ÉèÒ»¸öÖÎÀíÔ±ÕË»§²¢Ìṩ³õʼÃÜÂ롣ΪÁËÇå¾²Æð¼û£¬Ó¦¸Ã¾¡¿ìÐÞ¸ÄÖÎÀíÔ±ÃÜÂë¡£¿ÉÒÔÔڵǼGitlabCEºó£¬ÔÚ¡°Admin Area¡± -> ¡°Overview¡± -> ¡°Change Your Password¡±ÖÐÐÞ¸ÄÃÜÂë¡£
ËÄ¡¢×ܽá
±¾ÎÄÏÈÈÝÁËÔÚCentOS 7ÉÏ×°ÖÃGitlabCEµÄÀú³Ì£¬°üÀ¨Ìí¼ÓGitlabCEÈí¼þÔ´¡¢×°ÖÃGitlabCE¡¢ÉèÖÃGitlabCEµÈ¡£Ï£Íû±¾ÎĶԶÁÕßÔÚ×°ÖÃGitlabCEʱÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊÇÔõôÔÚCentOS7ÉÏ×°ÖÃGitlabCEµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡