documents:quick:quick-0019
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン | |||
| documents:quick:quick-0019 [2024/11/01 16:25] – ↷ 移動操作に合わせてリンクを書き換えました。 k896951 | documents:quick:quick-0019 [2026/05/07 22:20] (現在) – ↷ 移動操作に合わせてリンクを書き換えました。 k896951 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | ====== FreeBSDのパッケージでGitのリモートリポジトリをクイックセットアップ ====== | ||
| + | 2017/ | ||
| + | FreeBSDのpkgコマンドでお手軽に[[http:// | ||
| + | portsでソースからコンパイルするより速いし、ちゃちゃっと準備するにはおすすめ。git自体の話はしない。 | ||
| + | |||
| + | 今回は ezjail でJailをこしらえてその中にインストールします。FreeBSDのパッケージだと、Tomcat7で動作するサーブレットとしてインストールされるので、 | ||
| + | 既にTomcatを動作させているような場合はJailで隔離してインストールした方が良いです。 | ||
| + | |||
| + | ===== gitblitインストール前の準備 ===== | ||
| + | |||
| + | Jailにインストールする場合、事前に設定しておく内容。\\ | ||
| + | 既にJailインスタンス git が作成され起動しているものとします。 | ||
| + | |||
| + | ==== Jailホスト、Jailの設定 ==== | ||
| + | |||
| + | Jailの通信許可を設定します。 | ||
| + | [[documents: | ||
| + | |||
| + | ===== gitblitインストール ===== | ||
| + | |||
| + | Jailにインストールする場合はJailにログインしておきます。 | ||
| + | |||
| + | ==== gitblitパッケージをインストール ==== | ||
| + | |||
| + | pkgコマンドのsearchサブコマンドで git を検索するとわんさか出てきます。 | ||
| + | パッケージ gitblit-1.8.0 " | ||
| + | これをインストールします。依存関係のあるパッケージも同時にインストールされます。 | ||
| + | |||
| + | < | ||
| + | root@git:~ # pkg search git | ||
| + | bzr-git-0.6.8_1 | ||
| + | cave9-0.4.1.git20150408 | ||
| + | cgit-1.1_1 | ||
| + | digitemp-3.6.0 | ||
| + | easygit-0.98 | ||
| + | fusefs-gitfs-0.4.5.1 | ||
| + | geany-plugin-git-changebar-1.29 Geany plugin: highlight changed files tracked with Git | ||
| + | git-2.11.0_3 | ||
| + | git-bzr-ng-git20140423 | ||
| + | git-cinnabar-0.4.0 | ||
| + | git-codereview-0.0.0.2016030201 Command-line tool for working with Gerrit | ||
| + | git-cola-2.6 | ||
| + | git-cvs-0.1.0 | ||
| + | git-extras-4.2.0 | ||
| + | git-gui-2.11.0_3 | ||
| + | git-lfs-1.5.4 | ||
| + | git-lite-2.11.0_3 | ||
| + | git-merge-changelog-20140202 | ||
| + | git-modes-emacs25-1.2.2_1, | ||
| + | git-review-1.25.0 | ||
| + | git-subversion-2.11.0_3 | ||
| + | gitblit-1.8.0 | ||
| + | gitea-1.0.0 | ||
| + | gitflow-1.8.0 | ||
| + | gitg-3.19.6_1 | ||
| + | gitg0-0.0.8_2 | ||
| + | github-backup-utils-2.7.1 | ||
| + | gitlab-8.11.11_6 | ||
| + | gitlab-shell-3.4.0_1 | ||
| + | gitlab-workhorse-0.7.11 | ||
| + | gitlist-0.5.0 | ||
| + | gitolite-3.6.6, | ||
| + | gitolite2-2.3.1_1 | ||
| + | gitphp-0.2.8_1 | ||
| + | gittrac-2.0.1_1 | ||
| + | griels-quest-git20150512 | ||
| + | gtk-digital-cream-theme-1.0_8 | ||
| + | gtk-digital-harmony-theme-1.1_8 Another popular theme for GNOME desktop | ||
| + | hs-git-annex-5.20150727_1 | ||
| + | hs-gitit-0.11.1 | ||
| + | libgit2-0.24.0 | ||
| + | libgit2-glib-0.24.0_1 | ||
| + | libvterm-git20160104 | ||
| + | magit-emacs25-2.8.0 | ||
| + | metacity-digital-cream-theme-1.0_8 Neat and clean theme for GNOME desktop | ||
| + | metacity-digital-harmony-theme-1.1_8 Another popular theme for GNOME desktop | ||
| + | multicat-git20161007 | ||
| + | p5-Algorithm-CheckDigits-1.3.2 Perl extension to generate and test check digits | ||
| + | p5-App-GitGot-1.333 | ||
| + | p5-App-GitHub-1.0.1_1 | ||
| + | p5-Config-GitLike-1.16 | ||
| + | p5-Git-PurePerl-0.53 | ||
| + | p5-Git-Repository-1.320 | ||
| + | p5-Git-Repository-Plugin-Log-1.314 Add a log() method to Git:: | ||
| + | p5-Git-Sub-0.161810 | ||
| + | p5-Git-Version-Compare-1.004 | ||
| + | p5-Git-Wrapper-0.047 | ||
| + | p5-GitDDL-0.03 | ||
| + | p5-GitDDL-Migrator-0.08 | ||
| + | p5-Net-GitHub-0.86 | ||
| + | p5-Test-Requires-Git-1.007 | ||
| + | p5-WWW-GitHub-Gist-0.17_1 | ||
| + | p5-github_creator-0.15_1 | ||
| + | pear-SebastianBergmann_Git-1.2.0 Simple wrapper for Git | ||
| + | pear-VersionControl_Git-0.4.4 | ||
| + | py27-GitPython-1.0.1 | ||
| + | py27-django-taggit-0.15.0_1 | ||
| + | py27-git-up-1.3.0 | ||
| + | py27-gitdb-0.6.4_2 | ||
| + | py27-gitless-0.8.5 | ||
| + | py27-gitosis-0.2.20090917_1 | ||
| + | py27-hg-git-0.8.5.20161206 | ||
| + | py27-pygit2-0.24.1 | ||
| + | py27-pygithub-1.26.0 | ||
| + | py27-python-digitalocean-1.8 | ||
| + | py27-setuptools-git-1.1 | ||
| + | py27-wsgitools-0.3 | ||
| + | qgit-qt4-2.3_1 | ||
| + | rubygem-gemnasium-gitlab-service-0.2.6 Gemnasium support for GitLab projects | ||
| + | rubygem-git-1.2.9.1 | ||
| + | rubygem-git-version-bump-0.15.1 Manage your app version entirely via git tags | ||
| + | rubygem-github-linguist-5.0.0 | ||
| + | rubygem-github-markdown-0.6.9 | ||
| + | rubygem-github-markup-1.4.0_1 | ||
| + | rubygem-github_api-0.14.5 | ||
| + | rubygem-gitlab-flowdock-git-hook-1.0.1 GitLab-patched Git Post-Receive hook for Flowdock | ||
| + | rubygem-gitlab-gollum-lib-1.1.0_3 Simple, Git-powered wiki with a sweet API and local frontend | ||
| + | rubygem-gitlab-grack-2.0.2_2 | ||
| + | rubygem-gitlab-grit-2.8.1_1 | ||
| + | rubygem-gitlab-linguist-3.0.1 | ||
| + | rubygem-gitlab-markup-1.5.0 | ||
| + | rubygem-gitlab-pygments.rb-0.5.4_1 Exposes the pygments syntax highlighter to Ruby | ||
| + | rubygem-gitlab_emoji-0.3.1_1 | ||
| + | rubygem-gitlab_git-10.7.0, | ||
| + | rubygem-gitlab_meta-7.0 | ||
| + | rubygem-gitlab_omniauth-ldap-1.2.1 LDAP strategy for OmniAuth | ||
| + | rubygem-html-pipeline-gitlab-0.2.0 Extension filters for html-pipeline used by GitLab | ||
| + | rubygem-omniauth-github-1.1.2 | ||
| + | rubygem-omniauth-github-discourse-1.1.2 Fork of Official OmniAuth strategy for GitHub | ||
| + | rubygem-omniauth-gitlab-1.0.2 | ||
| + | rubygem-svn2git-2.4.0 | ||
| + | sagittarius-scheme-0.7.11 | ||
| + | stagit-0.4 | ||
| + | svn2git-1.0.11.a.20151201 | ||
| + | uwsgitop-0.10 | ||
| + | xtgyoretsu-git20140822 | ||
| + | root@git:~ # | ||
| + | root@git:~ # pkg install gitblit-1.8.0 | ||
| + | Updating FreeBSD repository catalogue... | ||
| + | FreeBSD repository is up-to-date. | ||
| + | All repositories are up-to-date. | ||
| + | The following 36 package(s) will be affected (of 0 checked): | ||
| + | |||
| + | New packages to be INSTALLED: | ||
| + | gitblit: 1.8.0 | ||
| + | openjdk8: 8.112.16_2 | ||
| + | libXt: 1.1.5,1 | ||
| + | xproto: 7.0.31 | ||
| + | libSM: 1.2.2_3,1 | ||
| + | libICE: 1.0.9_1,1 | ||
| + | libX11: 1.6.4,1 | ||
| + | libXdmcp: 1.1.2 | ||
| + | libxcb: 1.12 | ||
| + | libxml2: 2.9.4 | ||
| + | libpthread-stubs: | ||
| + | libXau: 1.0.8_3 | ||
| + | kbproto: 1.0.7 | ||
| + | libXtst: 1.2.3 | ||
| + | recordproto: | ||
| + | inputproto: 2.3.2 | ||
| + | libXext: 1.3.3_1,1 | ||
| + | xextproto: 7.3.0 | ||
| + | libXi: 1.7.8,1 | ||
| + | libXfixes: 5.0.3 | ||
| + | fixesproto: 5.0 | ||
| + | giflib: 5.1.4 | ||
| + | java-zoneinfo: | ||
| + | libXrender: 0.9.10 | ||
| + | renderproto: | ||
| + | freetype2: 2.6.3 | ||
| + | fontconfig: 2.12.1,1 | ||
| + | expat: 2.2.0_1 | ||
| + | alsa-lib: 1.1.2 | ||
| + | dejavu: 2.37 | ||
| + | mkfontdir: 1.0.7 | ||
| + | mkfontscale: | ||
| + | libfontenc: 1.1.3 | ||
| + | javavmwrapper: | ||
| + | tomcat7: 7.0.73 | ||
| + | jakarta-commons-daemon: | ||
| + | |||
| + | Number of packages to be installed: 36 | ||
| + | |||
| + | The process will require 260 MiB more space. | ||
| + | 110 MiB to be downloaded. | ||
| + | |||
| + | Proceed with this action? [y/N]: y | ||
| + | [git] Fetching gitblit-1.8.0.txz: | ||
| + | [git] Fetching openjdk8-8.112.16_2.txz: | ||
| + | |||
| + | : | ||
| + | : | ||
| + | |||
| + | [git] [34/36] Installing jakarta-commons-daemon-1.0.15... | ||
| + | [git] [34/36] Extracting jakarta-commons-daemon-1.0.15: | ||
| + | [git] [35/36] Installing tomcat7-7.0.73... | ||
| + | [git] [35/36] Extracting tomcat7-7.0.73: | ||
| + | [git] [36/36] Installing gitblit-1.8.0... | ||
| + | ===> Creating groups. | ||
| + | Using existing group ' | ||
| + | ===> Creating users | ||
| + | Using existing user ' | ||
| + | [git] [36/36] Extracting gitblit-1.8.0: | ||
| + | Message from dejavu-2.37: | ||
| + | Make sure that the freetype module is loaded. | ||
| + | line to the " | ||
| + | |||
| + | Load " | ||
| + | |||
| + | Add the following line to the " | ||
| + | |||
| + | FontPath "/ | ||
| + | |||
| + | Note: your X Windows configuration file is typically / | ||
| + | if you are using XFree86, and / | ||
| + | Message from openjdk8-8.112.16_2: | ||
| + | ====================================================================== | ||
| + | |||
| + | This OpenJDK implementation requires fdescfs(5) mounted on /dev/fd and | ||
| + | procfs(5) mounted on /proc. | ||
| + | |||
| + | If you have not done it yet, please do the following: | ||
| + | |||
| + | mount -t fdescfs fdesc /dev/fd | ||
| + | mount -t procfs proc /proc | ||
| + | |||
| + | To make it permanent, you need the following lines in /etc/fstab: | ||
| + | |||
| + | fdesc / | ||
| + | proc /proc | ||
| + | |||
| + | ====================================================================== | ||
| + | Message from gitblit-1.8.0: | ||
| + | ************************************************************************ | ||
| + | |||
| + | By default, Gitblit stores all data (users, settings, | ||
| + | repositories, | ||
| + | Specifying an alternate " | ||
| + | upgrades in the future. | ||
| + | |||
| + | You can specify " | ||
| + | - via GITBLIT_HOME, | ||
| + | - via web.xml, or | ||
| + | - via JNDI. | ||
| + | |||
| + | For value of " | ||
| + | |||
| + | You can login with the default administrator credentials: | ||
| + | admin / admin | ||
| + | |||
| + | !!!MAKE SURE TO CHANGE THE ADMINISTRATOR USERNAME AND/OR PASSWORD!!! | ||
| + | |||
| + | |||
| + | More informations: | ||
| + | http:// | ||
| + | |||
| + | ************************************************************************ | ||
| + | root@git:~ # | ||
| + | </ | ||
| + | |||
| + | openJDKがインストールされていることからもわかりますように、gitblitはJava製です。そしてTomcat7がインストールされていることから、このFreeBSDのパッケージではサーブレットとして動作するもののようです。 | ||
| + | |||
| + | |||
| + | ==== / | ||
| + | |||
| + | 指示は出てこなかったのですがTomcat7を動作させるために / | ||
| + | |||
| + | <code txt / | ||
| + | tomcat7_enable=" | ||
| + | </ | ||
| + | |||
| + | ==== Tomcat7の tomcat-users.xml ファイルの編集 ==== | ||
| + | |||
| + | Tomcat7は / | ||
| + | |||
| + | Tomcat7のサーバーステータスアプリやAPPマネージャを使いたい場合には、ユーザ " | ||
| + | |||
| + | <code txt / | ||
| + | <role rolename=" | ||
| + | <role rolename=" | ||
| + | <role rolename=" | ||
| + | <user username=" | ||
| + | <!-- 以下のユーザは無効のまま | ||
| + | <user username=" | ||
| + | <user username=" | ||
| + | --> | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Tomcat7の起動 ===== | ||
| + | |||
| + | service コマンドでtomcat7を起動します。 | ||
| + | |||
| + | < | ||
| + | root@git:~ # service tomcat7 start | ||
| + | Starting tomcat7. | ||
| + | root@git:~ # | ||
| + | </ | ||
| + | |||
| + | ブラウザからアクセスしてみます。URLは http:// | ||
| + | {{: | ||
| + | |||
| + | |||
| + | ===== gitblitのWebUIにアクセスする ===== | ||
| + | |||
| + | コンテキストルートが gitblit なので URLは http:// | ||
| + | {{: | ||
| + | |||
| + | adminアカウントのパスワードがadminだと説明表示されていたので、とりあえずログインしてパスワードだけ変更しておきます。 | ||
| + | |||
| + | {{: | ||
| + | {{: | ||
| + | |||
| + | もし更新に失敗するなら、ディレクトリの所有者を変えておきます。 | ||
| + | < | ||
| + | root@git:/ | ||
| + | total 28 | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | root@git:/ | ||
| + | root@git:/ | ||
| + | total 28 | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | root@git:/ | ||
| + | </ | ||
| + | |||
| + | ===== リモートリポジトリを作成する ===== | ||
| + | |||
| + | あとはメニューから操作すればいい。 | ||
| + | {{: | ||
| + | |||
| + | {{tag> 技術資料 FreeBSD Jail Git gitblit }} | ||
documents/quick/quick-0019.txt · 最終更新: by k896951
