{"id":28,"date":"2018-10-10T15:28:01","date_gmt":"2018-10-10T07:28:01","guid":{"rendered":"http:\/\/localhost\/qiqi\/?p=28"},"modified":"2018-10-10T15:28:55","modified_gmt":"2018-10-10T07:28:55","slug":"gitlab-%e6%9c%ac%e5%9c%b0gitlab%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%90%ad%e5%bb%ba","status":"publish","type":"post","link":"https:\/\/adeqing.com\/index.php\/2018\/10\/10\/default\/28\/","title":{"rendered":"GitLab \u672c\u5730GitLab\u670d\u52a1\u5668\u642d\u5efa"},"content":{"rendered":"<h4>1. Install and configure the necessary dependencies<\/h4>\n<p>On CentOS 7 (and RedHat\/Oracle\/Scientific Linux 7), the commands below will also open HTTP and SSH access in the system firewall.<\/p>\n<pre class=\"command\">sudo yum install -y curl policycoreutils-python openssh-server\r\nsudo systemctl enable sshd\r\nsudo systemctl start sshd\r\nsudo firewall-cmd --permanent --add-service=http\r\nsudo systemctl reload firewalld\r\n<button class=\"btn copy-btn js-copy-btn\" title=\"\" type=\"button\" aria-label=\"Copy to clipboard\" data-clipboard-text=\"sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld \" data-placement=\"top\" data-toggle=\"tooltip\" data-original-title=\"Copy to clipboard\"><i class=\"fa fa-clipboard\"><\/i><\/button><\/pre>\n<p>Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and\u00a0<a href=\"https:\/\/docs.gitlab.com\/omnibus\/settings\/smtp.html\">configure an external SMTP server<\/a>\u00a0after GitLab has been installed.<\/p>\n<pre class=\"command\">sudo yum install postfix\r\nsudo systemctl enable postfix\r\nsudo systemctl start postfix\r\n<button class=\"btn copy-btn js-copy-btn\" title=\"\" type=\"button\" aria-label=\"Copy to clipboard\" data-clipboard-text=\"sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix \" data-placement=\"top\" data-toggle=\"tooltip\" data-original-title=\"Copy to clipboard\"><i class=\"fa fa-clipboard\"><\/i><\/button><\/pre>\n<p>During Postfix installation a configuration screen may appear. Select &#8216;Internet Site&#8217; and press enter. Use your server&#8217;s external DNS for &#8216;mail name&#8217; and press enter. If additional screens appear, continue to press enter to accept the defaults.<\/p>\n<h4>2. Add the GitLab package repository and install the package<\/h4>\n<p>Add the GitLab package repository.<\/p>\n<pre class=\"command\">curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.rpm.sh | sudo bash\r\n<button class=\"btn copy-btn js-copy-btn\" title=\"\" type=\"button\" aria-label=\"Copy to clipboard\" data-clipboard-text=\"curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.rpm.sh | sudo bash\" data-placement=\"top\" data-toggle=\"tooltip\" data-original-title=\"Copy to clipboard\"><i class=\"fa fa-clipboard\"><\/i><\/button><\/pre>\n<p>Next, install the GitLab package. Change `http:\/\/gitlab.example.com` to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL. HTTPS requires\u00a0<a href=\"https:\/\/docs.gitlab.com\/omnibus\/settings\/nginx.html#enable-https\">additional configuration<\/a>\u00a0after installation.<\/p>\n<pre class=\"command\">sudo EXTERNAL_URL=\"http:\/\/gitlab.example.com\" yum install -y gitlab-ee\r\n<button class=\"btn copy-btn js-copy-btn\" title=\"\" type=\"button\" aria-label=\"Copy to clipboard\" data-clipboard-text=\"sudo EXTERNAL_URL=&quot;http:\/\/gitlab.example.com&quot; yum install -y gitlab-ee \" data-placement=\"top\" data-toggle=\"tooltip\" data-original-title=\"Copy to clipboard\"><i class=\"fa fa-clipboard\"><\/i><\/button><\/pre>\n<h4>3. Browse to the hostname and login<\/h4>\n<p>On your first visit, you&#8217;ll be redirected to a password reset screen. Provide the password for the initial administrator account and you will be redirected back to the login screen. Use the default account&#8217;s username\u00a0<code>root<\/code>\u00a0to login.<\/p>\n<p>See our\u00a0<a href=\"https:\/\/docs.gitlab.com\/omnibus\/README.html#installation-and-configuration-using-omnibus-package\">documentation for detailed instructions on installing and configuration<\/a>.<\/p>\n<h4>4. Set up your communication preferences<\/h4>\n<p>Visit our\u00a0<a href=\"https:\/\/about.gitlab.com\/preference-center\/\">email subscription preference center<\/a>\u00a0to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.<\/p>\n<p>Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.<\/p>\n<p class=\"alert alert-warning\">IMPORTANT NOTE: If you do not opt-in to the security newsletter, you will not receive security alerts.<\/p>\n<p>&nbsp;<\/p>\n<blockquote><p>https:\/\/about.gitlab.com\/installation\/#centos-7<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>1. Install and configure the necessary dependencies On  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts\/28"}],"collection":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":3,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts\/28\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}