×ðÁú¿­Ê±

centosÉÏÔõôһ¼ü×°ÖÃgitlab £¿ÒªÁìÏÈÈÝ

gitlabÊÇÒ»¸öweb½çÃæµÄgit¿ÍÕ»ÖÎÀí¹¤¾ß£¬Ëü¿ÉÒÔ½«git¿ÍÕ»¡¢´úÂëÖÎÀí¡¢ÎÊÌâ¸ú×Ù¡¢ci/cd¡¢wiki¡¢¹¹½¨ºÍ²âÊԵȹ¦Ð§¼¯³ÉÔÚÒ»¸öƽ̨ÉÏ¡£ËüÖ§³Ö¶à¸öÏîÄ¿µÄÖÎÀí£¬¾ßÓÐÇ¿Ê¢µÄ·ÖÖ§ºÍºÏ²¢¹¦Ð§£¬»¹ÌṩÁËÍêÕûµÄapi½Ó¿Ú£¬ÒÔ¹©ÆäËû¹¤¾ß»òÏîÄ¿¼¯³É¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«ÏÈÈÝÔõÑùÔÚcentosÉÏʹÓÃÒ»¼ü¾ç±¾¾ÙÐÐgitlabµÄ×°Öá£

Ò»¡¢×°ÖÃÇ°×¼±¸

ÔÚ×îÏÈ×°ÖÃGitLab֮ǰ£¬ÐèҪװÖÃһЩÐëÒªµÄÈí¼þ°ü£¬ÒÔ¼°ÉèÖÃ׼ȷµÄʱÇø¡£ÊäÈëÒÔÏÂÏÂÁ

yum -y install curl policycoreutils openssh-server openssh-clients
systemctl enable sshd
systemctl start sshd
firewall-cmd --permanent --add-service=http --add-service=https
systemctl reload firewalld
yum -y install postfix
systemctl enable postfix
systemctl start postfix
timedatectl set-timezone Asia/Shanghai

µÇ¼ºó¸´ÖÆ

¶þ¡¢×°ÖÃGitLab

ÎÒÃÇ¿ÉÒÔͨ¹ýÏÂÃæµÄ½ÅÔ­À´×°ÖÃGitLab£º

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee

µÇ¼ºó¸´ÖÆ

ÒÔÉϵÄÏÂÁ´ÓGitLab¹Ù·½ÍøÕ¾ÏÂÔØ×°Öðü£¬×°Öðü½«×Ô¶¯Ìí¼Óµ½ÏµÍ³µÄÈí¼þÔ´ÖС£ÕâÀïµÄEXTERNAL_URL±äÁ¿Ö¸¶¨ÁËGitLabµÄ»á¼ûURLµØµã£¬Õâ¸ö±äÁ¿ÐèҪƾ֤ÏÖÕæÏàÐÎÉèÖá£

ÔÚ×°ÖÃÍê³Éºó£¬GitLab½«»á×Ô¶¯Æô¶¯£¬²¢¼àÌýÔÚHTTPºÍHTTPSЭÒéµÄ¶Ë¿ÚÉÏ£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÉó²éGitLabµÄ״̬£º

sudo gitlab-ctl status

µÇ¼ºó¸´ÖÆ

ÈôÊÇ״̬Õý³££¬Ôò¿ÉÒÔͨ¹ý»á¼ûÖ¸¶¨µÄURLµØµã£¨Èçhttp://gitlab.example.com£©À´»á¼ûGitLab¡£

Èý¡¢³£¼ûÎÊÌâ

ÔõÑùÐÞ¸ÄGitLabµÄ¼àÌý¶Ë¿Ú £¿

ÔÚĬÈÏÇéÐÎÏ£¬GitLab»á¼àÌýÔÚHTTPºÍHTTPSЭÒéµÄ¶Ë¿ÚÉÏ£¬»®·ÖΪ80ºÍ443¡£ÈôÊÇÎÒÃÇÐèÒªÐ޸ļàÌý¶Ë¿Ú£¬¿ÉÒÔÔÚ/etc/gitlab/gitlab.rbÎļþÖоÙÐÐÐ޸ġ£ÀýÈ磬½«HTTP¶Ë¿ÚºÅÐÞ¸ÄΪ8080£º

external_url "http://gitlab.example.com:8080"

µÇ¼ºó¸´ÖÆ

ÐÞ¸ÄÍê±Ïºó£¬ÐèÒªÖ´ÐÐÒÔÏÂÏÂÁîʹÉèÖÃÉúЧ£º

sudo gitlab-ctl reconfigure

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÔõÑùÐÞ¸ÄGitLabµÄÊý¾Ý´æ´¢Â·¾¶ £¿

ÔÚĬÈÏÇéÐÎÏ£¬GitLabµÄÊý¾Ý´æ´¢Â·¾¶Îª/var/opt/gitlab£¬ÈôÊÇÎÒÃÇÐèÒªÐÞ¸ÄÊý¾Ý´æ´¢Â·¾¶£¬¿ÉÒÔÔÚ/etc/gitlab/gitlab.rbÎļþÖоÙÐÐÐ޸ġ£ÀýÈ磬½«Êý¾Ý´æ´¢Â·¾¶ÐÞ¸ÄΪ/opt/gitlab£º

git_data_dir "/opt/gitlab/git-data"

µÇ¼ºó¸´ÖÆ

ÐÞ¸ÄÍê±Ïºó£¬ÐèÒªÖ´ÐÐÒÔÏÂÏÂÁîʹÉèÖÃÉúЧ£º

sudo gitlab-ctl reconfigure

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ËÄ¡¢×ܽá

ͨ¹ý±¾ÎĵÄÏÈÈÝ£¬ÎÒÃÇ¿ÉÒÔ¿´µ½CentOSÉÏ×°ÖÃGitLabºÜÊǼòÆÓ£¬Ö»ÐèҪʹÓÃÒ»Ðо籾ºÍ¼¸¸öÏÂÁî¼´¿ÉÍê³É¡£GitLab¾ßÓÐÇ¿Ê¢µÄ´úÂëÖÎÀíºÍÏîÄ¿ÖÎÀí¹¦Ð§£¬Äܹ»×ÊÖú¿ª·¢ÕßÌá¸ßЧÂÊ£¬ïÔÌ­¹ýʧ¡£Í¬Ê±£¬GitLabÒ²ÌṩÁ˸»ºñµÄAPI½Ó¿ÚºÍ²å¼þϵͳ£¬¿ÉÒÔÓëÆäËûÏîÄ¿»ò¹¤¾ß¾ÙÐм¯³É£¬´Ó¶øʵÏÖÔ½·¢¸ßЧµÄ¿ª·¢Á÷³Ì¡£

ÒÔÉϾÍÊÇcentosÉÏÔõôһ¼ü×°ÖÃgitlab £¿ÒªÁìÏÈÈݵÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

13452372176

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿