×ðÁú¿­Ê±¹ÙÍøµÇ¼

Ïê½âÔõôÔÚLinuxЧÀÍÆ÷ÉϴGitLab

linux gitlabЧÀÍÆ÷´î½¨

GitLabÊÇ¿ªÔ´µÄGitÖÎÀíƽ̨ £¬ËüÌṩÁË´úÂë¿ÍÕ»ÖÎÀí¡¢°æ±¾¿ØÖÆ¡¢´úÂëÆÀÉóµÈ¹¦Ð§ £¬Òò´ËÊÇ´ó´ó¶¼ÍŶӾÙÐÐЭ×÷¿ª·¢µÄÊ×Ñ¡Ö®Ò»¡£ÔÚ´Ë £¬ÎÒ½«»áÏÈÈÝÔõÑùÔÚLinuxЧÀÍÆ÷ÉϴGitLab¡£

×°ÖÃÐëÒªµÄÈí¼þ

Ê×ÏÈ £¬ÎÒÃÇÐèҪװÖÃÐëÒªµÄÈí¼þ¡£ÔÚUbuntuϵͳÖÐ £¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´×°Öãº

sudo apt-get install curl openssh-server ca-certificates postfix

µÇ¼ºó¸´ÖÆ

ÆäÖÐ £¬PostfixÊÇÓÃÓÚ·¢ËÍÓʼþµÄÈí¼þ £¬ÎÒÃÇÐèÒª¶ÔËü¾ÙÐÐÉèÖá£

ÉèÖÃPostfix

ÔÚÕâÒ»²½ÖÐ £¬ÎÒÃÇÐèÒªÉèÖÃPostfixÀ´·¢ËÍÓʼþ¡£GitLabÐèÒª·¢ËÍÓʼþ×÷ΪÑéÖ¤ºÍ֪ͨµÄ·½·¨ £¬Òò´ËÕâÊDZØÐèµÄ¡£ÎÒÃÇ¿ÉÒԱ༭/etc/postfix/main.cfÎļþÀ´×ö³öÈçÏÂÐ޸ģº

myhostname = your.server.com # ÐÞ¸ÄΪÄã×Ô¼ºµÄЧÀÍÆ÷ÓòÃû
mydestination = your.server.com, localhost.localdomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0/104] [::1/128]
relayhost = 
# ÔÚÕâÀïÉèÖÃyour.server.comµÄMX¼Í¼

# ÏÂÃæÁ½ÌõÊÇ¿ªÆôSSLµÄÉèÖÃ
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_security_level = may

# ¿ªÆôSMTPÈÏÖ¤
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtp_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtp_use_tls = yes

µÇ¼ºó¸´ÖÆ

ÒÔÉÏÐÞ¸ÄÊÇ»ùÓÚUbuntuϵͳµÄPostfix £¬²î±ð°æ±¾µÄÉèÖÿÉÄÜ»áÓÐËùÇø±ð¡£½ÓÏÂÀ´ £¬ÎÒÃÇÐèÒª½¨Éè/etc/postfix/sasl_passwdÎļþ²¢¾ÙÐб༭£º

[smtp.gmail.com]:587 username@gmail.com:password

µÇ¼ºó¸´ÖÆ

ÆäÖÐ £¬[smtp.gmail.com]:587ÊÇGmailЧÀÍÆ÷µÄµØµãºÍ¶Ë¿Ú £¬ÈôÊÇÄãʹÓõÄÊÇÆäËûµÄÓʼþЧÀÍÉÌ £¬ÐèÒªÏò¸ÃЧÀÍÉÌÅÌÎÊSMTPµÄµØµãºÍ¶Ë¿Ú £¬¶øusername@gmail.comºÍpasswordÔòÊÇÄãµÄGmailÕË»§ºÍÃÜÂë £¬ÐèÒªÌ滻ΪÄã×Ô¼ºµÄ¡£

Íê³ÉÒÔÉÏÐ޸ĺó £¬ÎÒÃÇÐèÒªÓÃÒÔÏÂÏÂÁîÆô¶¯Postfix£º

sudo service postfix restart

µÇ¼ºó¸´ÖÆ

×°ÖÃGitLab

ÏÖÔÚÊÇ×°ÖÃGitLabµÄʱ¼äÁË¡£ÎÒÃÇÐèÒª»á¼ûGitLabµÄ¹Ù·½ÍøÕ¾ £¬ÏÂÔØ×îеÄGitLab×°ÖÃÎļþ £¬ÈçÏÂËùʾ£º

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

µÇ¼ºó¸´ÖÆ

ÔÚÏÂÔØÍê³Éºó £¬ÎÒÃÇÐèҪװÖÃGitLab£º

sudo apt-get install gitlab-ce

µÇ¼ºó¸´ÖÆ

×°ÖÃÍê³Éºó £¬ÎÒÃǽøÈë/etc/gitlabĿ¼ £¬²¢±à¼­gitlab.rbÎļþ£º

sudo vim /etc/gitlab/gitlab.rb

µÇ¼ºó¸´ÖÆ

ÔÚÎļþÖÐ £¬ÎÒÃÇÐèÒª¾ÙÐÐһЩ»ù±¾µÄÉèÖà £¬ÈçÏÂËùʾ£º

external_url 'http://your.server.com' # ÕâÀïÒ²ÐèÒªÐÞ¸ÄΪÄã×Ô¼ºµÄЧÀÍÆ÷ÓòÃû
#
# ÏÂÃæÊÇSMTPµÄÉèÖÃ
#
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "username@gmail.com" # ÄãµÄGmailÕË»§
gitlab_rails['smtp_password'] = "password" # GmailµÄSMTPÃÜÂë
gitlab_rails['smtp_domain'] = "smtp.gmail.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false

µÇ¼ºó¸´ÖÆ

ÔÚÐÞ¸ÄÍê³Éºó £¬ÎÒÃÇÐèÒªÖ´ÐÐÒÔÏÂÏÂÁ

sudo gitlab-ctl reconfigure

µÇ¼ºó¸´ÖÆ

ÆÚ´ýÖ´ÐÐÍê³Éºó £¬ÎÒÃǾͿÉÒÔ»á¼ûGitLabÁË£º

http://your.server.com/

µÇ¼ºó¸´ÖÆ

ÏÖÔÚ £¬ÎÒÃÇÒÑÀֳɵØÔÚЧÀÍÆ÷ÉϴÆðÁËGitLab £¬¿ÉÒÔ×îÏÈʹÓÃËü¾ÙÐÐЭ×÷¿ª·¢ÁË¡£

ÒÔÉϾÍÊÇÏê½âÔõôÔÚLinuxЧÀÍÆ÷ÉϴGitLabµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

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

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

QR code
ÍøÕ¾µØͼ