centos6.5ÉÏÔõôװÖÃgitlab
centos 6.5 ÊÇÒ»¿îºÜÊÇÎȹ̵IJÙ×÷ϵͳ£¬Ò»Ð©ÀϾɵÄЧÀÍÆ÷ºÍÓ¦ÓÃÈÔÔÚʹÓÃËü¡£¹ØÓÚÐèÒªÉèÖôúÂëÖÎÀíºÍÐ×÷µÄÍŶӺÍÆóÒµÀ´Ëµ£¬gitlab ÊÇÒ»¸öºÜÊÇ°ôµÄÑ¡Ôñ¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«ÏêϸÏÈÈÝÔõÑùÔÚ centos 6.5 ÉÏ×°Öà gitlab¡£
È·¶¨ÏµÍ³°æ±¾ºÍÓ²¼þÒªÇó
ÔÚ¾ÙÐÐ×°ÖÃ֮ǰ£¬ÎÒÃÇÐèÒª¼ì²éÒ»ÏÂϵͳ°æ±¾ºÍÓ²¼þÒªÇó¡£
GitLab ¹Ù·½Ö§³ÖµÄ CentOS °æ±¾Îª 6.x »ò 7.x¡£
½¨ÒéµÄ×îµÍ CPU ÄÚºËÊýΪ 2£¬ÄÚ´æΪ 4GB¡£
ÏÖÔÚ£¬ÎÒÃÇÒѾ׼±¸ºÃ×îÏÈ×°Öà GitLab¡£
×°ÖÃÒÀÀµ¿â
Ê×ÏÈ£¬ÎÒÃÇÐèҪװÖÃһЩÐëÒªµÄÒÀÀµ¿â£¬ÒÔ±ã GitLab Äܹ»ÔÚ CentOS ÉÏÔËÐС£·¿ªÖնˣ¬Ö´ÐÐÒÔÏÂÏÂÁ
sudo yum -y update sudo yum -y install curl policycoreutils openssh-server openssh-clients sudo yum -y install postfix
µÇ¼ºó¸´ÖÆ
Postfix ÊÇÒ»¸öÓʼþЧÀÍÆ÷¡£GitLab ÐèÒªÒ»¸öÓʼþЧÀÍÆ÷À´·¢ËÍÓʼþ֪ͨ£¬ÒÔÊÇÎÒÃDZØÐè×°ÖÃËü¡£
ÔÚ×°Öà postfix ʱ£¬ÏµÍ³»áÌáÐÑÄúÊäÈëÖ÷»úÃûºÍÓòÃû¡£ÎÒÃÇ¿ÉÒÔÖ±½Ó°´ Enter ¼ü£¬¼ÌÐøʹÓÃĬÈÏÉèÖá£
×°ÖÃ GitLab
ÔÚ CentOS ÉÏ×°Öà GitLab ×î¼òÆÓµÄÒªÁìÊÇʹÓà Omnibus °ü¡£Omnibus ÊÇÒ»¸öÏֳɵĽâ¾ö¼Æ»®£¬Ëü°üÀ¨ÁË GitLab ºÍËùÐèµÄËùÓÐÒÀÀµ¿â¡£Ê¹Óà Omnibus °ü£¬ÎÒÃÇ¿ÉÒÔ¿ìËÙ×°ÖúÍÉèÖà GitLab¡£
´Ó GitLab ¹ÙÍøÏÂÔØ Omnibus °ü£¬ÈôÊÇÄúʹÓõÄÊÇ CentOS 6.5 ¿ÉÒÔÑ¡ÔñÏÂÔØ GitLab 7.11.4 °æ±¾¡£ÔÚÖÕ¶ËÖУ¬½øÈëÏÂÔØĿ¼²¢Ö´ÐÐÒÔÏÂÏÂÁ
sudo rpm -i gitlab-ce-7.11.4-ce.0.el6.x86_64.rpm
µÇ¼ºó¸´ÖÆ
ÉÏÃæµÄÏÂÁװÖà GitLab¡£Æ¾Ö¤ÄúµÄÓ²¼þÉèÖúÍÍøÂçËÙÂÊ£¬×°ÖÿÉÄÜÐèÒª¼¸·ÖÖÓʱ¼ä¡£
ÉèÖÃ GitLab
×°ÖÃÍê³Éºó£¬·¿ªä¯ÀÀÆ÷£¬»á¼ûЧÀÍÆ÷µÄ IP µØµã»òÓòÃû£¬ÄúÓ¦¸Ã¿ÉÒÔ¿´µ½ GitLab µÄµÇ¼ҳÃæ¡£ÄúÐèÒªÉèÖÃÖÎÀíÔ±ÕË»§µÄÐÅÏ¢¡£
Íê³ÉÉèÖúó£¬Äú½«±»Öض¨Ïòµ½ GitLab µÄÖ÷Ò³Ãæ¡£Äú¿ÉÒÔÔÚ´Ë´¦½¨ÉèÏîÄ¿¡¢Óû§¡¢Èº×éµÈ¡£
ÉèÖ÷À»ðǽ
Ϊ°ü¹ÜЧÀÍÆ÷µÄÇå¾²ÐÔ£¬ÎÒÃÇÐèÒªÔÚ·À»ðǽÖз¿ªÒ»Ð©¶Ë¿Ú¡£GitLab ĬÈÏʹÓÃÒÔÏÂÈý¸ö¶Ë¿Ú£º
HTTP£º80
HTTPS£º443
SSH£º22
ΪÁË·¿ªÕâЩ¶Ë¿Ú£¬ÎÒÃÇÐèÒª¸üзÀ»ðǽ¹æÔò¡£Ö´ÐÐÒÔÏÂÏÂÁ
sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT sudo iptables -I INPUT 1 -p tcp --dport 443 -j ACCEPT sudo iptables -I INPUT 1 -p tcp --dport 22 -j ACCEPT sudo /etc/init.d/iptables save sudo service iptables restart
µÇ¼ºó¸´ÖÆ
ÉÏÊöÏÂÁÔÊÐíÍⲿ»á¼û HTTP¡¢HTTPS ºÍ SSH¡£
ÎÒÃÇÒѾÍê³ÉÁË GitLab µÄ×°ÖúÍÉèÖá£ÈôÊÇÄúÕýÔÚÖÎÀíÍŶӻòÐ×÷ÊÂÇ飬ÄÇô GitLab ½«ÊÇÒ»¸öºÜÊÇÓÐÓõŤ¾ß¡£
ÒÔÉϾÍÊÇcentos6.5ÉÏÔõôװÖÃgitlabµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡