gitlabÔõô±àÒë×°ÖÃ
ÔÚÕâ¸ö¿Æ¼¼Ê±´ú£¬Èí¼þ¿ª·¢³ÉΪÁËÒ»¸öÈÈÃÅ»°Ìâ¡£gitlabÊÇÒ»ÖÖ¸ßЧÂʵİ汾¿ØÖÆϵͳ£¬»ñµÃÔ½À´Ô½¶à¿ª·¢ÕßÃǵÄÇàíù¡£ÄÇô£¬gitlabµÄ±àÒë×°ÖÃÊÇÔõôʵÏÖµÄÄØ£¿ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«ÎªÄúÏÈÈÝgitlabµÄ±àÒë×°ÖÃÒªÁì¡£
Ò»¡¢×¼±¸ÊÂÇé
ÔÚ×îÏȱàÒëGitlab֮ǰ£¬ÇëÈ·±£Äú×°ÖÃÁËÒÔÏÂÐëÒªµÄÈí¼þ£º
Ruby 2.5+
Git 2.x
Redis 2.8+
PostgreSQL 9.5+
Node.js 8.16+
Yarn
Curl
Development Tools
£¨ËµÃ÷£º¿ª·¢ÕßÃÇÒ²¿ÉÒÔÔÚ¹ÙÍøÉÏÏÂÔØÒѾ±àÒëºÃµÄ°æ±¾¡££©
¶þ¡¢ÏÂÔØGitlabÔ´´úÂë
Äú¿ÉÒÔÔÚGitlab¹Ù·½ÍøÕ¾ÉÏÏÂÔØGitlabÔ´´úÂë°ü£¬ÏÂÔØÏÂÀ´ºó½âѹÖÁÖ¸¶¨Ä¿Â¼¡£ÀýÈ磬ÎÒÃǽ«GitlabÔ´´úÂë°ü½âѹÖÁ/usr/local/gitlabĿ¼Ï¡£
$ cd /usr/local
$ sudo curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-13.12.0-ce.0.el7.x86_64.rpm/download.deb
$ sudo apt-get install gitlab-ce-14.0.0-ce.0.el7.x86_64.rpm
Èý¡¢ÉèÖü°×°ÖÃGitlabЧÀÍ
ÐÞ¸ÄÉèÖÃÎļþ
Ê×ÏÈ£¬ÄúÐèÒªÐÞ¸ÄGitlabÉèÖÃÎļþ¡£Äú¿ÉÒÔƾ֤ÒÔÏ·½·¨¾ÙÐÐÐ޸ģº
$ cd /etc/gitlab
$ sudo vi gitlab.rb
È»ºó£¬½«ÒÔÏÂÉèÖôúÂëÌí¼ÓÖÁgitlab.rbÖУ¬²¢ÐÞ¸ÄÄúÐèÒªµÄÉèÖãº
ÍâÍø»á¼û£º£¨°ü¹Ü443¶Ë¿Ú·¿ª£©
external_url ‘https://gitlab.example.com’
SSL¼ÓÃÜÉèÖãº
nginx[‘redirect_http_to_https’] = true
nginx[‘ssl_certificate’] = “/etc/gitlab/ssl/gitlab.example.com.crt”
nginx[‘ssl_certificate_key’] = “/etc/gitlab/ssl/gitlab.example.com.key”
PostgreSQLÉèÖãº
postgresql[‘enable’] = true
postgresql[‘listen_address’] = ‘localhost’
postgresql[‘data_dir’] = “/var/opt/gitlab/postgresql/data”
SMTPÉèÖãº
gitlab_rails[‘smtp_enable’] = true
gitlab_rails[‘smtp_address’] = “smtp.example.com”
gitlab_rails[‘smtp_port’] = 25
gitlab_rails[‘smtp_user_name’] = “smtp_user”
gitlab_rails[‘smtp_password’] = “smtp_password”
gitlab_rails[‘smtp_domain’] = “example.com”
gitlab_rails[‘smtp_authentication’] = “login”
gitlab_rails[‘smtp_enable_starttls_auto’] = true
gitlab_rails[‘smtp_tls’] = false
ÔËÐÐÖÚËùÖÜÖªµÄÏÂÁî
$ sudo gitlab-ctl reconfigure
¸ÃÏÂÁƾ֤ÄúÉèÖúõÄgitlab.rbÎļþ¾ÙÐÐһϵÁвÙ×÷£¬×°ÖÃÒÀÀµ°ü²¢Æô¶¯GitlabЧÀÍ¡£
Éó²é×°ÖÃ״̬
Äú¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÀ´Éó²éGitlabЧÀ͵Ä×°ÖÃ״̬£º
$ sudo gitlab-ctl status
¸ÃÏÂÁî¿ÉÒÔÉó²éGitlabЧÀ͵ÄËùÓÐ×é¼þÊÇ·ñ¶¼Õý³£ÔËÐС£
ËÄ¡¢»á¼ûGitlabЧÀÍ
ÔÚÄúÍê³ÉÁËÒÔÉÏ°ì·¨Ö®ºó£¬Äú¾Í¿ÉÒÔͨ¹ýÄúËùÉèÖõÄÍⲿ»á¼ûÁ´½Ó£¨external_url£©À´»á¼ûGitlabЧÀÍÁË¡£
С½á£º
¹ØÓÚÈí¼þ¿ª·¢Ö°Ô±À´Ëµ£¬GitlabµÄ±àÒë×°ÖÃÊÇ×î»ù±¾µÄ²Ù×÷¡£±¾ÎÄÏÈÈÝÁËÔõÑùÏÂÔØGitlabÔ´´úÂë¡¢ÉèÖÃÒÔ¼°×°ÖÃGitlabЧÀÍ£¬Ï£Íû¹ØÓÚʹÓÃÕßÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊÇgitlabÔõô±àÒë×°ÖõÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡