{"id":1135,"date":"2014-09-23T23:00:52","date_gmt":"2014-09-23T14:00:52","guid":{"rendered":"http:\/\/lovelinux.mydns.jp\/?p=1135"},"modified":"2014-11-04T23:06:56","modified_gmt":"2014-11-04T14:06:56","slug":"centos7-%e3%81%ab-gitlab-7-3-0%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/lovelinux.mydns.jp\/?p=1135","title":{"rendered":"CentOS7 \u306b gitlab 7.3.0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<h3>\u306f\u3058\u3081\u306b<\/h3>\n<p>Git\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u5171\u6709\u3057\u305f\u3044\u3051\u308c\u3069\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3082\u308d\u3082\u308d\u306e\u95a2\u4fc2\u304b\u3089\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u7f6e\u304f\u306e\u304c\u305f\u3081\u3089\u308f\u308c\u308b\u5834\u5408\u306a\u3069\u3001GitHub\u30e9\u30a4\u30af\u306aweb\u7ba1\u7406\u6a5f\u80fd\u306e\u3042\u308bGitlab\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ed6\u306b\u3082GitHub\u3092\u30af\u30ed\u30fc\u30f3\u3057\u305f\u3088\u3046\u306a\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u308c\u304c\u4e00\u756a\u30e1\u30b8\u30e3\u30fc\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u4eca\u56de\u306fCentos7\u306bGitlab 7.3.0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3>\u4eee\u5b9a<\/h3>\n<p>\u3054\u81ea\u8eab\u306e\u30c9\u30e1\u30a4\u30f3\u3092 myhost.jp \u3068\u4eee\u5b9a\u3057\u3001GitLab\u3092\u30c9\u30e1\u30a4\u30f3\u306e\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0 myhost.jp\/gitlab \u3067\u904b\u7528\u3059\u308b\u3082\u306e\u3068\u3057\u307e\u3059\u3002<\/p>\n<h3>git ,curl \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>[bash]<br \/>\n$ sudo yum install curl git<br \/>\n[\/bash]<\/p>\n<h3>git \u30e6\u30fc\u30b6\u30fc\u8ffd\u52a0<\/h3>\n<p>\u3053\u308c\u304c\u30d9\u30b9\u30c8\u306a\u65b9\u6cd5\u304b\u3001\u5c11\u3005\u7591\u554f\u3067\u3059\u304c\u3001\u4f5c\u696d\u306f\u3059\u3079\u3066\u65b0\u898f\u306b\u4f5c\u6210\u3059\u308bgit \u30e6\u30fc\u30b6\u30fc\u3067\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>git\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u304a\u4efb\u305b\u3057\u307e\u3059\u3002<br \/>\n[bash]<br \/>\n$ sudo useradd git -md \/home\/git -s \/bin\/bash<br \/>\n$ sudo passwd git<br \/>\n$ sudo nano \/etc\/suders<br \/>\n[\/bash]<\/p>\n<p>git\u30e6\u30fc\u30b6\u30fc\u3092sudo\u53ef\u80fd\u306a\u30e6\u30fc\u30b6\u30fc\u306b\u52a0\u3048\u307e\u3059\u3002<\/p>\n<p>[diff]<br \/>\n# User privilege specification<br \/>\nroot ALL=(ALL:ALL) ALL<br \/>\n+ git ALL=(ALL:ALL) ALL<\/p>\n<p>[\/diff]<\/p>\n<h3>remi,epel\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u8ffd\u52a0<\/h3>\n<p>Redis\u306a\u3069\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b remi\u3068epel\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u60c5\u5831\u304c\u5fc5\u8981\u306a\u306e\u3067\u3001rpm\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff06\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n[bash]<\/p>\n<p>$ su &#8211; git<br \/>\n$ wget http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm<br \/>\n$ wget http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/epel-release-7-0.2.noarch.rpm<br \/>\n$ sudo rpm -ivh remi-release-7.rpm epel-release-7-0.2.noarch.rpm<\/p>\n<p>[\/bash]<\/p>\n<h3>Mysql(mariadb)\u95a2\u9023\u30e2\u30b8\u30e5\u30fc\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>[bash]<br \/>\n$ sudo yum install mariadb-devel mariadb mariadb-libs mariadb-server<\/p>\n<p>[\/bash]<\/p>\n<h3>Mysql root\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a<\/h3>\n<p>[bash]<br \/>\n$ mysqladmin -u root password &#8216;mynewpassword&#8217;<\/p>\n<p>[\/bash]<\/p>\n<h3>Redis,\u95a2\u9023\u30e2\u30b8\u30e5\u30fc\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>[bash]<br \/>\n$ sudo yum install libunwind libunwind-devel gperftools-libs redis<\/p>\n<p>$ sudo yum install icu4c libicu-devel libxml2 libxml2-devel libxslt libxslt-devel cmake<\/p>\n<p>[\/bash]<\/p>\n<h3>mysql,redis\u8d77\u52d5\u3001\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<\/h3>\n<p>[bash]<\/p>\n<p>$ sudo systemctl start mariadb<br \/>\n$ sudo systemctl enable mariadb<br \/>\n$ sudo systemctl start redis<br \/>\n$ sudo systemctl enable redis<\/p>\n<p>[\/bash]<\/p>\n<h3>Ruby\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>[bash]<br \/>\n$ sudo yum install ruby<\/p>\n<p>[\/bash]<\/p>\n<h3>mysql\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u306b\u5fc5\u8981\u306a\u3082\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>[bash]<br \/>\n$ sudo yum install gcc mysql-devel ruby-devel rubygems patch gcc-c++<\/p>\n<p>[\/bash]<\/p>\n<h3>gemrc\u4f5c\u6210<\/h3>\n<p>\u3053\u308c\u306fRuby\u306e\u304a\u4f5c\u6cd5\u307f\u305f\u3044\u306a\u3082\u306e\u306a\u306e\u3067\u6c17\u306b\u305b\u305a\u306b\u3053\u306e\u901a\u308a\u3084\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[bash]<br \/>\n$ nano ~\/.gemrc<br \/>\n[\/bash]<\/p>\n<p>gem \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306a\u3069\u3092\u7701\u7565\u3057\u307e\u3059\u3002<br \/>\n[bash]<br \/>\ninstall: &#8211;no-document<br \/>\nupdate: &#8211;no-document<br \/>\n[\/bash]<\/p>\n<h3>Rails\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u3064\u3044\u3067\u306bMysql2\u306egem\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>[bash]<br \/>\n$ gem install rails mysql2 <\/p>\n<p>[\/bash]<\/p>\n<h3>gitlab-shell\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>[bash]<\/p>\n<p>$ git config &#8211;global user.name &#8220;GitLab&#8221;<br \/>\n$ git config &#8211;global user.email &#8220;gitlab@localhost&#8221;<br \/>\n$ git clone https:\/\/github.com\/gitlabhq\/gitlab-shell.git<br \/>\n$ cd gitlab-shell\/<br \/>\n$ git checkout -b 1.9.8 v1.9.8<br \/>\n$ cp config.yml.example config.yml<br \/>\n$ nano config.yml<br \/>\n[\/bash]<\/p>\n<p>\u4ee5\u4e0b\u306eURL\u6307\u5b9a\u306e\u90e8\u5206\u3092\u8abf\u6574\uff08gitlab\u3092\u30db\u30b9\u30c8\u3059\u308bURL\u3092\u8a18\u8ff0\uff09<\/p>\n<p>[diff]<br \/>\n&#8211; gitlab_url: &#8220;http:\/\/localhost\/&#8221;\u3000\u2190\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8<br \/>\n+ gitlab_url: &#8220;http:\/\/www.myhost.jp\/gitlab\/&#8221;<br \/>\n[\/diff]<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b9f\u884c<br \/>\n[bash]<br \/>\n$ .\/bin\/install<br \/>\n[\/bash]<\/p>\n<h3>gitlab\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>github\u304b\u3089\u30bd\u30fc\u30b9\u3092\u30af\u30ed\u30fc\u30f3\u3057\u307e\u3059\u3002\uff08\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304b\u306a\u308a\u6642\u9593\u98df\u3044\u307e\u3059\u3002\u5408\u8a08\uff17\uff10\uff4d\uff42\u3050\u3089\u3044\uff09<\/p>\n<p>[bash]<\/p>\n<p>$ cd \/home\/git<br \/>\n$ git clone https:\/\/github.com\/gitlabhq\/gitlabhq.git gitlab<br \/>\n$ cd gitlab<br \/>\n$ git checkout -b 7.3.0 v7.3.0<br \/>\n$ cp config\/gitlab.yml.example config\/gitlab.yml<br \/>\n$ nano config\/gitlab.yml<\/p>\n<p>[\/bash]<\/p>\n<h3>\u30db\u30b9\u30c8\u540d\u8a2d\u5b9a\uff08gitlab\u3092\u30db\u30b9\u30c8\u3059\u308bURL\u3092\u8a18\u8ff0\uff09\u3001\u76f8\u5bfe\u30eb\u30fc\u30c8\u306e\u8a2d\u5b9a<\/h3>\n<p>[diff]<br \/>\n&#8211; host: localhost<br \/>\n+ host: www.myhost.jp<br \/>\nhttps: false<br \/>\n# Uncomment and customize the last line to run in a non-root path<br \/>\n# WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this. <\/p>\n<p># Note that four settings need to be changed for this to work.<br \/>\n# 1) In your application.rb file: config.relative_url_root = &#8220;\/gitlab&#8221;<br \/>\n# 2) In your gitlab.yml file: relative_url_root: \/gitlab<br \/>\n# 3) In your unicorn.rb: ENV[&#8216;RAILS_RELATIVE_URL_ROOT&#8217;] = &#8220;\/gitlab&#8221;<br \/>\n# 4) In ..\/gitlab-shell\/config.yml: gitlab_url: &#8220;http:\/\/127.0.0.1\/gitlab&#8221;<br \/>\n# To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production<br \/>\n# <\/p>\n<p>&#8211; # relative_url_root: \/gitlab<br \/>\n+ relative_url_root: \/gitlab<\/p>\n<p>[\/diff]<\/p>\n<p>\u76f8\u5bfe\u30d1\u30b9\u306e\u8a2d\u5b9a<\/p>\n<p>[bash]<br \/>\n$ nano config\/application.rb<br \/>\n[\/bash]<\/p>\n<p>[diff]<\/p>\n<p>&#8211;    # config.relative_url_root = &#8220;\/gitlab&#8221;<br \/>\n+    config.relative_url_root = &#8220;\/gitlab&#8221;<\/p>\n<p>      \u301c\u7701\u7565\u301c<\/p>\n<p>      end<br \/>\n    end<br \/>\n  end<br \/>\nend<\/p>\n<p>+ ENV[&#8216;RAILS_RELATIVE_URL_ROOT&#8217;] = &#8220;\/gitlab&#8221;<\/p>\n<p>[\/diff]<\/p>\n<h4>Mysql\u306e\u30e6\u30fc\u30b6\u540d\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a(Production\u30e2\u30fc\u30c9)<\/h4>\n<p>[bash]<br \/>\n$ cp config\/database.yml.mysql config\/database.yml<br \/>\n$ nano config\/database.yml<\/p>\n<p>[\/bash]<\/p>\n<p>[diff]<br \/>\n    #<br \/>\n    # PRODUCTION<br \/>\n    #<br \/>\n    production:<br \/>\n      adapter: mysql2<br \/>\n      encoding: utf8<br \/>\n      reconnect: false<br \/>\n      database: gitlabhq_production<br \/>\n      pool: 10<br \/>\n&#8211;      username: git<br \/>\n&#8211;      password: &#8220;secure password&#8221;<br \/>\n+      username: root<br \/>\n+      password: &#8220;xxxxxxxxx&#8221;<br \/>\n      # host: localhost<br \/>\n      # socket: \/tmp\/mysql.sock<\/p>\n<p>[\/diff]<\/p>\n<h4>\u30d0\u30f3\u30c9\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u304b\u306a\u308a\u9577\u3044\u6642\u9593\u3092\u8981\u3057\u307e\u3059\uff09<\/h4>\n<p>[bash]<br \/>\n$ bundle install &#8211;deployment &#8211;without development test postgres<br \/>\n[\/bash]<\/p>\n<h4>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210<\/h4>\n<p>\u82f1\u8a9e\u3067\u3001\u524d\u306e\u30c7\u30fc\u30bf\u304c\u5931\u308f\u308c\u308b\u3088\u3002\u65b0\u898f\u306e\u30c7\u30fc\u30bf\u3092seed\u304b\u3089\u4f5c\u308b\u3051\u3069\u3044\u3044\uff1f\u307f\u305f\u3044\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u307e\u3059\u304c\u3001 yes \u3068\u5165\u529b\u3057\u3066\u7d9a\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[bash]<br \/>\n$ rake db:create RAILS_ENV=production<br \/>\n$ rake gitlab:setup RAILS_ENV=production<br \/>\n[\/bash]<\/p>\n<p>\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3046\u307e\u304f\u884c\u304b\u306a\u3044\u5834\u5408\u3001\u4ee5\u4e0b\u306egem\u3092\u5165\u308c\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n[bash]<br \/>\n$ gem install rb-inotify<br \/>\n[\/bash]<\/p>\n<p>\u6700\u5f8c\u306b\u51fa\u529b\u3055\u308c\u308b\u3001\u30ed\u30b0\u30a4\u30f3\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30e1\u30e2\u3063\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>login\u2026\u2026\u2026root<br \/>\npassword\u2026\u20265iveL!fe<\/p>\n<h3>passenger\u306egem\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>[bash]<br \/>\n$ sudo gem install passenger<br \/>\n[\/bash]<\/p>\n<p>\u30b3\u30f3\u30d1\u30a4\u30eb\u524d\u306b\u30c1\u30a7\u30c3\u30af\u304c\u8d70\u308a\u3001curl-config \u304c\u7121\u3044\u3088\u7684\u306a\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u305f\u5834\u5408\u306f\u3001<\/p>\n<p>[bash]<br \/>\n$ sudo yum install curl-devel<br \/>\n[\/bash]<\/p>\n<p>\u4ed6\u306e\u30a8\u30e9\u30fc\u306e\u5834\u5408\u306f\u3001\u3054\u81ea\u8eab\u3067\u304a\u8abf\u3079\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30a8\u30e9\u30fc\u304c\u6d88\u3048\u308b\u307e\u3067\u4ee5\u4e0b\u3092\u7e70\u308a\u8fd4\u3057\u3066\u307f\u308b\u3002<\/p>\n<h3>nginx\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08passenger\u9023\u643a\u7528\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\uff09<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3064\u3068\u3044\u308d\u3044\u308d\u51fa\u3066\u304d\u307e\u3059\u304c\u3001\u9069\u5f53\u306b\u9078\u629e\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\/opt\/nginx\u3000\u914d\u4e0b\u306bnginx\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>[bash]<br \/>\n$ sudo \/usr\/local\/bin\/passenger-install-nginx-module <\/p>\n<p>[\/bash]<\/p>\n<h4>\/opt\/nginx \u30d5\u30a9\u30eb\u30c0\u6a29\u9650\u8abf\u6574<\/h4>\n<p>[bash]<br \/>\n$ sudo chown nobody:nobody \/opt\/nginx -R<br \/>\n$ sudo chmod 775 \/opt\/nginx -R<br \/>\n[\/bash]<\/p>\n<h3>\u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u8a2d\u5b9a<\/h3>\n<p>\u52d5\u4f5c\u78ba\u8a8d\u306e\u524d\u306b\u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u304c\u30c7\u30d5\u30a9\u3067\u304b\u304b\u3063\u3066\u3044\u308b\u306e\u3067http\u3092\u901a\u3059\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u3002<\/p>\n<p>\u307e\u305a\u78ba\u8a8d\u3002<br \/>\n[bash]<br \/>\n$ sudo firewall-cmd &#8211;list-all<\/p>\n<p>public (default, active)<br \/>\n  interfaces: virbr0 wlp2s0<br \/>\n  sources:<br \/>\n  services: dhcpv6-client ssh<br \/>\n  ports:<br \/>\n  masquerade: no<br \/>\n  forward-ports:<br \/>\n  icmp-blocks:<br \/>\n  rich rules:<\/p>\n<p>[\/bash]<\/p>\n<p>ssh\u3068dhcp\u3057\u304b\u6709\u52b9\u3058\u3083\u306a\u3044\u306e\u3067\u3001http\u3092\u8ffd\u52a0\u3059\u308b\u3002<br \/>\n\u305d\u306e\u524d\u306b\u3069\u3093\u306a\u30b5\u30fc\u30d3\u30b9\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u3066\u3001\u4eca\u3069\u308c\u304c public\u3067\u6709\u52b9\u304b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u65b9\u6cd5\u3002<\/p>\n<p>[bash]<br \/>\n\u203b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u30b5\u30fc\u30d3\u30b9\u4e00\u89a7<br \/>\n$ sudo firewall-cmd &#8211;get-services<\/p>\n<p>\u203bpublic\u306e\u30b5\u30fc\u30d3\u30b9\u78ba\u8a8d<br \/>\n$ sudo firewall-cmd &#8211;list-service &#8211;zone=public <\/p>\n<p>[\/bash]<\/p>\n<p>nginx\u306a\u306e\u3067\u3000http\u30b5\u30fc\u30d3\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u307f\u308b<\/p>\n<p>[bash]<br \/>\n\u203b\u30b5\u30fc\u30d3\u30b9\u3092\u8ffd\u52a0\u3059\u308b<br \/>\n$ sudo firewall-cmd &#8211;add-service=http &#8211;zone=public<\/p>\n<p>\u203b\u6052\u4e45\u7684\u306b\u30b5\u30fc\u30d3\u30b9\u3092\u8ffd\u52a0\u3059\u308b<br \/>\n$ sudo firewall-cmd &#8211;add-service=http &#8211;zone=public &#8211;permanent<\/p>\n<p>[\/bash]<\/p>\n<p>\u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u518d\u8d77\u52d5<br \/>\n[bash]<br \/>\n$ sudo firewall-cmd &#8211;reload<br \/>\n[\/bash]<\/p>\n<p>http\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d<br \/>\n[bash]<br \/>\n$ sudo firewall-cmd &#8211;list-all<\/p>\n<p>public (default, active)<br \/>\n  interfaces: virbr0 wlp2s0<br \/>\n  sources:<br \/>\n  services: dhcpv6-client http ssh<br \/>\n  ports:<br \/>\n  masquerade: no<br \/>\n  forward-ports:<br \/>\n  icmp-blocks:<br \/>\n  rich rules:<\/p>\n<p>[\/bash]<\/p>\n<h3>nginx\u306e\u8a2d\u5b9a\u78ba\u8a8d\u3068\u3001\u8d77\u52d5<\/h3>\n<p>-t \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001OK\u306a\u3089\u3070\u3001\u4e00\u65e6\u8d77\u52d5\u3057\u3066\u307f\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u3067 http:\/\/localhost \u3068\u3057\u3066\u3001nginx\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u304c\u958b\u3051\u308c\u3070OK\u3002<\/p>\n<p>[bash]<br \/>\n$ sudo \/opt\/nginx\/sbin\/nginx -t<br \/>\nnginx: the configuration file \/opt\/nginx\/conf\/nginx.conf syntax is ok<br \/>\nnginx: configuration file \/opt\/nginx\/conf\/nginx.conf test is successful<\/p>\n<p>[\/bash]<\/p>\n<h4>nginx\u8d77\u52d5<\/h4>\n<p>[bash]<br \/>\n$ sudo \/opt\/nginx\/sbin\/nginx<br \/>\n[\/bash]<\/p>\n<p>\u505c\u6b62\u306f<\/p>\n<p>[bash]<br \/>\n$ ps aux |grep nginx<br \/>\n[\/bash]<\/p>\n<p>\u3068\u3057\u3066\u3001nginx: master process \u3068\u306a\u308b\u30d7\u30ed\u30bb\u30b9ID\u3092\u6bba\u3059\u3068\u6b62\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>[bash]<br \/>\n$ sudo kill pid<br \/>\n[\/bash]<\/p>\n<h3>nginx passenger\u9023\u643a\u8a2d\u5b9a<\/h3>\n<p>passenger\u306e\u5834\u6240\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u81ea\u52d5\u7684\u306b\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306e\u4ed6\u306e\u9805\u76ee\u306e\u8abf\u6574\u3002<\/p>\n<p>http:\/\/www.myhost.jp\/gitlab \u3067\u516c\u958b\u3059\u308b\u3002<\/p>\n<p>[bash]<br \/>\n$ sudo nano \/opt\/nginx\/conf\/nginx.conf<br \/>\n[\/bash]<\/p>\n<p>\u4ee5\u4e0b\u306e\u90e8\u5206\u3092\u8ffd\u8a18<\/p>\n<p>[diff mark=&#8221;2&#8243;]<br \/>\n+ user  nobody;<br \/>\n+ pid   \/opt\/nginx\/logs\/nginx.pid;<\/p>\n<p>\u301c\u7701\u7565\u301c<br \/>\n    server {<br \/>\n        listen       80;<br \/>\n        server_name  localhost;<\/p>\n<p>\u301c\u7701\u7565\u301c<br \/>\n&#8211;<br \/>\n+        location ~ ^\/gitlab {<br \/>\n+              root \/home\/git\/gitlab\/public;<br \/>\n+              #passenger_base_uri \/gitlab;<br \/>\n+              passenger_app_root \/home\/git\/gitlab;<br \/>\n+              #passenger_document_root \/home\/git\/gitlab\/public;<br \/>\n+              passenger_enabled on;<br \/>\n+              rails_env production;<br \/>\n+              access_log  \/opt\/nginx\/logs\/gitlab.access.log;<br \/>\n+              error_log  \/opt\/nginx\/logs\/gitlab.error.log;<br \/>\n+        }<\/p>\n<p>[\/diff]<\/p>\n<h3>nginx\u7528\u3000\u30b5\u30fc\u30d3\u30b9\u8d77\u52d5\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210<\/h3>\n<p>$ sudo nano \/usr\/lib\/systemd\/system\/nginx.service <\/p>\n<p>[bash]<\/p>\n<p>[Unit]<br \/>\nDescription=nginx &#8211; high performance web server<br \/>\nDocumentation=http:\/\/nginx.org\/en\/docs\/<br \/>\nAfter=network.target remote-fs.target nss-lookup.target<\/p>\n<p>[Service]<br \/>\nType=forking<br \/>\nPIDFile=\/opt\/nginx\/logs\/nginx.pid<br \/>\nExecStartPre=\/opt\/nginx\/sbin\/nginx -t -c \/opt\/nginx\/conf\/nginx.conf<br \/>\nExecStart=\/opt\/nginx\/sbin\/nginx -c \/opt\/nginx\/conf\/nginx.conf<br \/>\nExecReload=\/bin\/kill -s HUP $MAINPID<br \/>\nExecStop=\/bin\/kill -s QUIT $MAINPID<br \/>\nPrivateTmp=true<\/p>\n<p>[Install]<br \/>\nWantedBy=multi-user.target<\/p>\n<p>[\/bash]<\/p>\n<h3>\u30c7\u30fc\u30e2\u30f3\u30ea\u30ed\u30fc\u30c9\u3001nginx\u8d77\u52d5<\/h3>\n<p>[bash]<\/p>\n<p>$ sudo systemctl daemon-reload<br \/>\n$ sudo systemctl start nginx<br \/>\n$ sudo systemctl enable nginx<\/p>\n<p>[\/bash]<\/p>\n<h4>nginx\u52d5\u4f5c\u78ba\u8a8d<\/h4>\n<p>\u30b5\u30fc\u30d0\u30fc\u306eIP\u306b\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u63a5\u7d9a\u3067 nginx\u306ewelcompage\u304c\u8868\u793a\u3055\u308c\u308c\u3070\u3001nginx\u306e\u52d5\u4f5c\u306fOK<\/p>\n<p>http:\/\/192.168.x.x<\/p>\n<h4>nginx(nobody)\u30e6\u30fc\u30b6\u30fc\u3092git\u30b0\u30eb\u30fc\u30d7\u306b\u52a0\u3048\u308b<\/h4>\n<p>nginx\u304c \/home\/git\/repositories\u3000\u30d5\u30a9\u30eb\u30c0\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u6a29\u9650\u3092\u8abf\u6574\u3057\u307e\u3059\u3002<\/p>\n<p>[bash]<br \/>\n$ sudo usermod -aG git nobody<\/p>\n<p>[\/bash]<\/p>\n<p>\u30b0\u30eb\u30fc\u30d7\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u304c\u306a\u3044\u3068 \/home\/git \u914d\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3088\u3046\u306a\u306e\u3067<br \/>\ngit\u306ehome \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6a29\u9650\u8abf\u6574\uff08700 ->> 710\uff09<br \/>\n[bash]<br \/>\n$ sudo chmod 710 \/home\/git<\/p>\n<p>[\/bash]<\/p>\n<h3>SELinux\u3092\u7121\u52b9\u5316<\/h3>\n<p>[bash]<br \/>\n$ sudo nano \/etc\/sysconfig\/selinux<br \/>\n[\/bash]<\/p>\n<p>[bash]<br \/>\n-SELINUX=enforcing<br \/>\n+SELINUX=disabled<br \/>\n[\/bash]<\/p>\n<p>\u4e00\u65e6\u30ea\u30d6\u30fc\u30c8\u3057\u3066\u304f\u3060\u3055\u3044<br \/>\n[bash]<br \/>\n$ sudo reboot<br \/>\n[\/bash]<\/p>\n<h3>\u30a2\u30bb\u30c3\u30c8\u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30eb<\/h3>\n<p>[bash]<br \/>\n$ su &#8211; git<br \/>\n$ cd \/home\/git\/gitlab<br \/>\n$ bundle exec rake assets:precompile RAILS_ENV=production<br \/>\n[\/bash]<\/p>\n<h3>sidekiq\u30c7\u30fc\u30e2\u30f3\u8d77\u52d5\u306e\u8a2d\u5b9a<\/h3>\n<p>[bash]<br \/>\n$ sudo gem install bundle<\/p>\n<p>$ wget https:\/\/github.com\/gitlabhq\/gitlab-recipes\/raw\/master\/init\/systemd\/gitlab-sidekiq.service<\/p>\n<p>[\/bash]<\/p>\n<p>\u8d77\u52d5\u30d5\u30a1\u30a4\u30eb\u3092\u5fae\u8abf\u6574\u3057\u307e\u3059\u3002<br \/>\n[bash]<br \/>\n$ nano gitlab-sidekiq.service<br \/>\n[\/bash]<\/p>\n<p>\/usr\/bin\/bundle \u3068\u306a\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u3092 \/usr\/local\/bin\u306b\u5909\u66f4<\/p>\n<p>[diff]<br \/>\n&#8211; ExecStart=\/usr\/bin\/bundle exec &#8220;sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e production -P tmp\/pids\/sidekiq.pid -d -L log\/sidekiq.log >> log\/sidekiq.log 2>&#038;1&#8221;<br \/>\n&#8211; ExecStop=\/usr\/bin\/bundle exec &#8220;sidekiqctl stop \/home\/git\/gitlab\/tmp\/pids\/sidekiq.pid >> \/home\/git\/gitlab\/log\/sidekiq.log 2>&#038;1&#8221;<\/p>\n<p>+ ExecStart=\/usr\/local\/bin\/bundle exec &#8220;sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e production -P tmp\/pids\/sidekiq.pid -d -L log\/sidekiq.log >> log\/sidekiq.log 2>&#038;1&#8221;<br \/>\n+ ExecStop=\/usr\/local\/bin\/bundle exec &#8220;sidekiqctl stop \/home\/git\/gitlab\/tmp\/pids\/sidekiq.pid >> \/home\/git\/gitlab\/log\/sidekiq.log 2>&#038;1&#8221;<\/p>\n<p>[\/diff]<\/p>\n<h3>\u8d77\u52d5\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc\uff06\u6a29\u9650\u5909\u66f4<\/h3>\n<p>[bash]<br \/>\n$ sudo mv gitlab-sidekiq.service \/usr\/lib\/systemd\/system\/<\/p>\n<p>$ sudo chmod 644 \/usr\/lib\/systemd\/system\/gitlab-sidekiq.service<\/p>\n<p>[\/bash]<\/p>\n<h3>sidekiq(Gitlab)\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\u3001\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<\/h3>\n<p>[bash]<br \/>\n$ sudo systemctl daemon-reload<\/p>\n<p>$ sudo systemctl start gitlab-sidekiq.service<br \/>\n$ sudo systemctl enable gitlab-sidekiq.service<\/p>\n<p>[\/bash]<\/p>\n<h3>\u52d5\u4f5c\u78ba\u8a8d<\/h3>\n<p>\u30d6\u30e9\u30a6\u30b6\u30fc\u3067Gitlab\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u304b\u306a\u308a\u9577\u6642\u9593\u5f85\u305f\u3055\u308c\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u6c17\u9577\u306b\u5f85\u3061\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>http:\/\/myhost.jp\/gitlab<\/p>\n<p><a href=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-GitLab-Chromium.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-GitLab-Chromium.png\" alt=\"Screenshot-GitLab - Chromium\" width=\"620\" height=\"513\" class=\"alignnone size-large wp-image-1110\" \/><\/a><\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u6642\u306b\u30e1\u30e2\u3063\u3066\u304a\u3044\u305fID\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u307f\u308b<\/p>\n<p>login&#8230;&#8230;&#8230;root<br \/>\npassword&#8230;&#8230;5iveL!fe<\/p>\n<h3>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff08\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\uff09\u306e\u4f5c\u6210<\/h3>\n<p>\u3053\u3053\u304b\u3089\u306fGUI\u306a\u306e\u3067\u3001\u64cd\u4f5c\u306f\u7c21\u5358\u3067\u3059\u3002<br \/>\n\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-Admin-area-GitLab-Chromium.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-Admin-area-GitLab-Chromium.png\" alt=\"Screenshot-Admin area | GitLab - Chromium\" width=\"961\" height=\"662\" class=\"alignnone size-full wp-image-1109\" \/><\/a><\/p>\n<p><a href=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-New-Project-GitLab-Chromium1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-New-Project-GitLab-Chromium1.png\" alt=\"Screenshot-New Project | GitLab - Chromium\" width=\"982\" height=\"736\" class=\"alignnone size-full wp-image-1114\" \/><\/a><\/p>\n<p>\u5b9f\u969b\u306b\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d<\/p>\n<p>[bash]<br \/>\n$ ls \/home\/git\/repositories\/root\/<br \/>\nabc.git  abc.wiki.git<br \/>\n[\/bash]<\/p>\n<p>\u3082\u3057\u6b63\u3057\u304f\u4f5c\u6210\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u4f55\u3089\u304b\u306e\u4e0d\u5177\u5408\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u306e\u3067\u3001Gitlab\u3092\u518d\u8d77\u52d5\u3057\u307e\u3057\u3087\u3046\u3002\uff08\u518d\u8d77\u52d5\u5f8c\u3001\u518d\u5ea6\u30d6\u30e9\u30a6\u30b6\u30fc\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u3092\u884c\u3044\u3001\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p>[bash]<br \/>\n$ sudo systemctl restart gitlab-sidekiq.service<br \/>\n[\/bash]<\/p>\n<h3>git\u306e\u30d9\u30a2\u30ea\u30dd\u30b8\u30c8\u30ea\u518d\u4f5c\u6210<\/h3>\n<p>GUI\u304b\u3089\u4f5c\u3063\u305fgit\u306ebare\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u304c\u306a\u306b\u304b\u304a\u304b\u3057\u3044\u3088\u3046\u3067\u3059\u3002<br \/>\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a9\u30eb\u30c0\u306b\u3042\u308b\u5168\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u65e6\u6d88\u53bb\u3057\u3066\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067bare\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u3092\u518d\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/p>\n<p>[bash]<br \/>\ncd \/home\/git\/repositories\/xxx\/xyz.git<br \/>\nrm * -fr<br \/>\ngit init &#8211;bare<\/p>\n<p>[\/bash]<\/p>\n<h3>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3057\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u306bPush\u3057\u3066\u307f\u308b<\/h3>\n<p>\u9069\u5f53\u306a\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u3001\u305d\u3053\u3067Git\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\u3002\u65b0\u898f\u306bREADME\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001Gitlab\u306bPush\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n(origin\u306e\u3000URL\u306f ssh\u63a5\u7d9a\u306a\u306e\u3067\u3001host\u540d:repositories\/xxxx\/abc.git)<\/p>\n<p>repositories\u306f\u3044\u3089\u306a\u3044\u306f\u305a\u306a\u3093\u3067\u3059\u304c\u3001\u3053\u308c\u3092\u4ed8\u3051\u306a\u3044\u3068\u3046\u307e\u304f\u52d5\u4f5c\u3057\u307e\u305b\u3093\u3002<br \/>\n\u8a73\u3057\u3044\u3068\u3053\u308d\u306f\u826f\u304f\u5206\u304b\u3063\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u3053\u308c\u3067\u6211\u6162\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-mito-abc-GitLab-Chromium.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-mito-abc-GitLab-Chromium.png\" alt=\"Screenshot-mito - abc | GitLab - Chromium\" width=\"620\" height=\"500\" class=\"alignnone size-large wp-image-1115\" \/><\/a><\/p>\n<p>[bash]<br \/>\n$ mkdir abc<br \/>\n$ cd abc<br \/>\n$ git init<br \/>\nInitialized empty Git repository in \/home\/hiro\/workspace\/abc\/.git\/<\/p>\n<p>$ git config user.name &#8220;myname&#8221;<br \/>\n$ git config user.email &#8220;myname@myhost.jp&#8221;<br \/>\n$ git remote add origin git@myhost.jp:repositories\/root\/abc.git<\/p>\n<p>$ echo &#8220;helllo!&#8221; >>README<br \/>\n$ git add README<br \/>\n$ git commit -m &#8220;first commit&#8221;<br \/>\n$ git push -u origin master<\/p>\n<p>[\/bash]<\/p>\n<h3>\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u30b3\u30df\u30c3\u30c8\u5185\u5bb9\u78ba\u8a8d<\/h3>\n<p><a href=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-mito-abc-GitLab-Chromium-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/09\/Screenshot-mito-abc-GitLab-Chromium-1.png\" alt=\"Screenshot-mito - abc | GitLab - Chromium-1\" width=\"620\" height=\"500\" class=\"alignnone size-large wp-image-1116\" \/><\/a><\/p>\n<p>\u4ee5\u4e0a\u3067\u3059\u3002\u304a\u75b2\u308c\u3055\u307e\u3067\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b Git\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u5171\u6709\u3057\u305f\u3044\u3051\u308c\u3069\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3082\u308d\u3082\u308d\u306e\u95a2\u4fc2\u304b\u3089\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u7f6e\u304f\u306e\u304c\u305f\u3081\u3089\u308f\u308c\u308b\u5834\u5408\u306a\u3069\u3001GitHub\u30e9\u30a4\u30af\u306aweb\u7ba1\u7406\u6a5f\u80fd\u306e\u3042\u308bGitlab\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ed6\u306b\u3082GitHub\u3092\u30af\u30ed\u30fc\u30f3\u3057\u305f\u3088\u3046\u306a\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u308c\u304c\u4e00\u756a\u30e1\u30b8\u30e3\u30fc\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u4eca\u56de\u306fCentos7\u306bGitlab 7.3.0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u4eee\u5b9a \u3054\u81ea\u8eab\u306e\u30c9\u30e1\u30a4\u30f3\u3092 myhost.jp \u3068\u4eee\u5b9a\u3057\u3001GitLab\u3092\u30c9\u30e1\u30a4\u30f3\u306e\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0 myhost.jp\/gitlab \u3067\u904b\u7528\u3059\u308b\u3082\u306e\u3068\u3057\u307e\u3059\u3002 git ,curl \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb [bash] $ sudo yum install curl git [\/bash] git \u30e6\u30fc\u30b6\u30fc\u8ffd\u52a0 \u3053\u308c\u304c\u30d9\u30b9\u30c8\u306a\u65b9\u6cd5\u304b\u3001\u5c11\u3005\u7591\u554f\u3067\u3059\u304c\u3001\u4f5c\u696d\u306f\u3059\u3079\u3066\u65b0\u898f\u306b\u4f5c\u6210\u3059\u308bgit \u30e6\u30fc\u30b6\u30fc\u3067\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002 git\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u304a\u4efb\u305b\u3057\u307e\u3059\u3002 [bash] $ sudo useradd git -md \/home\/git -s \/bin\/bash $ sudo passwd git $ sudo nano \/etc\/suders [\/bash] git\u30e6\u30fc\u30b6\u30fc\u3092sudo\u53ef\u80fd\u306a\u30e6\u30fc\u30b6\u30fc\u306b\u52a0\u3048\u307e\u3059\u3002 [diff] # User privilege specification root ALL=(ALL:ALL) ALL + git ALL=(ALL:ALL) ALL [\/diff] remi,epel\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u8ffd\u52a0 Redis\u306a\u3069\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b remi\u3068epel\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u60c5\u5831\u304c\u5fc5\u8981\u306a\u306e\u3067\u3001rpm\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff06\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb [bash] $ su &#8211; git $ wget http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm $ wget http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/epel-release-7-0.2.noarch.rpm $ sudo rpm -ivh remi-release-7.rpm epel-release-7-0.2.noarch.rpm [\/bash] Mysql(mariadb)\u95a2\u9023\u30e2\u30b8\u30e5\u30fc\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb [bash] $ sudo yum install mariadb-devel mariadb mariadb-libs mariadb-server [\/bash] Mysql root\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a [bash] $ mysqladmin -u root password &#8216;mynewpassword&#8217; [\/bash] Redis,\u95a2\u9023\u30e2\u30b8\u30e5\u30fc\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb [bash] $ sudo yum install libunwind libunwind-devel gperftools-libs redis $ sudo yum install icu4c libicu-devel libxml2 libxml2-devel libxslt libxslt-devel cmake [\/bash] mysql,redis\u8d77\u52d5\u3001\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a [bash] $ sudo systemctl start mariadb $ sudo systemctl enable mariadb $ sudo systemctl start redis $ sudo systemctl enable redis [\/bash] Ruby\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb [bash] $ sudo yum install ruby [\/bash] mysql\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u306b\u5fc5\u8981\u306a\u3082\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb [bash] $ sudo yum install gcc mysql-devel ruby-devel rubygems patch gcc-c++ [\/bash] gemrc\u4f5c\u6210 \u3053\u308c\u306fRuby\u306e\u304a\u4f5c\u6cd5\u307f\u305f\u3044\u306a\u3082\u306e\u306a\u306e\u3067\u6c17\u306b\u305b\u305a\u306b\u3053\u306e\u901a\u308a\u3084\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002 [bash] $ nano ~\/.gemrc [\/bash] gem \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306a\u3069\u3092\u7701\u7565\u3057\u307e\u3059\u3002 [bash] install: &#8211;no-document update: &#8211;no-document [\/bash] Rails\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u3064\u3044\u3067\u306bMysql2\u306egem\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb [bash] $ gem install rails mysql2 [\/bash] gitlab-shell\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb [bash] $ git config &#8211;global user.name &#8220;GitLab&#8221; $ git config &#8211;global user.email &#8220;gitlab@localhost&#8221; $ git clone https:\/\/github.com\/gitlabhq\/gitlab-shell.git $ cd gitlab-shell\/ $ git checkout -b 1.9.8 v1.9.8 $ cp config.yml.example config.yml $ nano config.yml [\/bash] \u4ee5\u4e0b\u306eURL\u6307\u5b9a\u306e\u90e8\u5206\u3092\u8abf\u6574\uff08gitlab\u3092\u30db\u30b9\u30c8\u3059\u308bURL\u3092\u8a18\u8ff0\uff09 [diff] &#8211; gitlab_url: &#8220;http:\/\/localhost\/&#8221;\u3000\u2190\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8 + gitlab_url: &#8220;http:\/\/www.myhost.jp\/gitlab\/&#8221; [\/diff] \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b9f\u884c [bash] $ .\/bin\/install [\/bash] gitlab\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb github\u304b\u3089\u30bd\u30fc\u30b9\u3092\u30af\u30ed\u30fc\u30f3\u3057\u307e\u3059\u3002\uff08\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304b\u306a\u308a\u6642\u9593\u98df\u3044\u307e\u3059\u3002\u5408\u8a08\uff17\uff10\uff4d\uff42\u3050\u3089\u3044\uff09 [bash] $ cd \/home\/git $ git clone https:\/\/github.com\/gitlabhq\/gitlabhq.git gitlab $ cd gitlab $ git checkout -b 7.3.0 v7.3.0 $ cp config\/gitlab.yml.example config\/gitlab.yml $ nano config\/gitlab.yml [\/bash] \u30db\u30b9\u30c8\u540d\u8a2d\u5b9a\uff08gitlab\u3092\u30db\u30b9\u30c8\u3059\u308bURL\u3092\u8a18\u8ff0\uff09\u3001\u76f8\u5bfe\u30eb\u30fc\u30c8\u306e\u8a2d\u5b9a [diff] &#8211; host: localhost + host: www.myhost.jp https: false # Uncomment and customize the last line to run in a non-root path # WARNING: We recommend creating a FQDN to host GitLab in a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1053,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[4],"tags":[25,51,12],"class_list":{"0":"post-1135","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-4","8":"tag-centos","9":"tag-centos7","10":"tag-gitlab"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/1135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1135"}],"version-history":[{"count":1,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/1135\/revisions"}],"predecessor-version":[{"id":1136,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/1135\/revisions\/1136"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/media\/1053"}],"wp:attachment":[{"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}