ÔõÑùÔÚ×Ô¼ºµÄЧÀÍÆ÷ÉÏ×°ÖÃGitlab
ÔÚÈí¼þ¿ª·¢ÁìÓòÖУ¬°æ±¾¿ØÖƹ¤¾ßµÄÖ÷ÒªÐÔ²»ÑÔ¶øÓ÷¡£ÎªÁ˸üºÃµØÖÎÀí´úÂ룬ÍŶӾ³£Ê¹ÓÃgit×÷Ϊ°æ±¾¿ØÖƹ¤¾ß¡£gitlabÊÇÒ»¸ö»ùÓÚgitµÄ¿ªÔ´°æ±¾¿ØÖÆƽ̨£¬ËüÌṩÁË´úÂëÍйܡ¢Ò»Á¬¼¯³ÉÓë°²ÅÅ¡¢ÎÊÌâ¸ú×ÙµÈһϵÁÐÏîÄ¿ÖÎÀí¹¦Ð§¡£±¾ÎĽ«ÏêϸÏÈÈÝÔõÑùÔÚ×Ô¼ºµÄЧÀÍÆ÷ÉÏ×°ÖÃgitlab¡£
È·ÈÏЧÀÍÆ÷ÉèÖÃ
ÔÚ×°ÖÃGitlab֮ǰ£¬ÄúÐèҪȷÈÏÄúµÄЧÀÍÆ÷ÊÇ·ñÖª×ãÒÔÏÂÒªÇó£º
²Ù×÷ϵͳ£ºUbuntu 16.04 LTS »ò¸ü¸ß°æ±¾¡¢Debian 9 »ò¸ü¸ß°æ±¾¡¢CentOS 7 »ò¸ü¸ß°æ±¾¡£
Äڴ棺ÖÁÉÙ 4GB RAM¡£
´æ´¢¿Õ¼ä£ºÖÁÉÙ50GB¡£
×°ÖÃÒÀÀµÏî
ÔÚ¾ÙÐÐGitlabµÄ×°ÖÃ֮ǰ£¬ÐèÒªÔÚЧÀÍÆ÷ÉÏ×°ÖÃһЩÐëÒªµÄÒÀÀµ¿â¡£µÇ¼µ½Ð§ÀÍÆ÷ºó£¬Ö´ÐÐÒÔÏÂÏÂÁ
sudo apt-get update sudo apt-get install -y curl openssh-server ca-certificates tzdata perl
µÇ¼ºó¸´ÖÆ
×°ÖÃDocker
ÓÉÓÚGitlabÊÇ»ùÓÚÈÝÆ÷ÊÖÒյģ¬Òò´ËÐèÒªÏÈ×°ÖÃDocker¡£ÔÚЧÀÍÆ÷ÉÏÖ´ÐÐÒÔÏÂÏÂÁ
curl -sSL https://get.docker.com/ | sh
µÇ¼ºó¸´ÖÆ
×°ÖÃÍêDockerºó£¬Ö´ÐÐÒÔÏÂÏÂÁÆôDockerЧÀÍ£º
sudo systemctl enable docker sudo systemctl start docker
µÇ¼ºó¸´ÖÆ
ÏÂÔز¢ÔËÐÐGitlabÈÝÆ÷
ÏÖÔÚ¿ÉÒÔʹÓÃDockerÀÈ¡²¢ÔËÐÐGitlabÈÝÆ÷ÁË¡£ÔÚЧÀÍÆ÷ÉÏÖ´ÐÐÒÔÏÂÏÂÁ
sudo docker run --detach \ --hostname gitlab.example.com \ --publish 443:443 --publish 80:80 --publish 2222:22 \ --name gitlab \ --restart always \ --volume /gitlab/config:/etc/gitlab \ --volume /gitlab/logs:/var/log/gitlab \ --volume /gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬–hostname ²ÎÊýÖ¸¶¨GitlabËùÔÚµÄÖ÷»úÃû£»–publish ²ÎÊýÖ¸¶¨ÒªÓ³ÉäµÄ¶Ë¿ÚºÅ£»–volume ²ÎÊýÖ¸¶¨GitlabÊý¾Ý´æ´¢µÄĿ¼¡£ÕâЩ²ÎÊý¿ÉÒÔƾ֤×Ô¼ºµÄÏÖÕæÏàÐξÙÐÐÐ޸ġ£
»á¼ûGitlab
GitlabÈÝÆ÷Æô¶¯ºó£¬Äú¿ÉÒÔÔÚWebä¯ÀÀÆ÷ÖÐͨ¹ý http://your_server_ip/ »òÕß https://your_server_ip/ »á¼ûGitlab¡£Ê״λá¼ûÐèÒªÉèÖÃÖÎÀíÔ±Õ˺źÍÃÜÂ룬Ȼºó¾Í¿ÉÒÔ½¨ÉèÏîÄ¿¡¢Ìí¼Ó³ÉÔ±¡¢¾ÙÐдúÂëÍйܡ¢Ò»Á¬¼¯³ÉºÍ°²ÅŵȲÙ×÷ÁË¡£
×ܽá
±¾ÎÄÏÈÈÝÁËÔõÑùÔÚ×Ô¼ºµÄЧÀÍÆ÷ÉÏ×°ÖÃGitlab£¬ÈÃÄúÄܹ»¸üºÃµØÖÎÀí´úÂëºÍ¿ª·¢Á÷³Ì¡£µ«ÐèҪעÖصÄÊÇ£¬GitlabµÄÉèÖúÍʹÓÃÐèÒªÒ»¶¨µÄÊÖÒÕÄÜÁ¦£¬ÐÂÊÖÓ¦µ±ÉóÉ÷²Ù×÷¡£
ÒÔÉϾÍÊÇÔõÑùÔÚ×Ô¼ºµÄЧÀÍÆ÷ÉÏ×°ÖÃGitlabµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡