jointrashposs/content/pl/docs/3.for-admin/install/guides/manual.md

175 lines
4.0 KiB
Markdown
Raw Normal View History

New Crowdin updates (#132) * New translations kubernetes.md (English) * New translations kubernetes.md (Indonesian) * New translations manual.md (French) * New translations manual.md (Italian) * New translations manual.md (Korean) * New translations manual.md (Polish) * New translations manual.md (Chinese Simplified) * New translations manual.md (Chinese Traditional) * New translations manual.md (English) * New translations manual.md (Indonesian) * New translations cdn.md (French) * New translations cdn.md (Italian) * New translations cdn.md (Korean) * New translations cdn.md (Polish) * New translations cdn.md (Chinese Simplified) * New translations cdn.md (Chinese Traditional) * New translations cdn.md (English) * New translations cdn.md (Indonesian) * New translations nginx.md (French) * New translations nginx.md (Italian) * New translations nginx.md (Korean) * New translations nginx.md (Polish) * New translations nginx.md (Chinese Simplified) * New translations nginx.md (Chinese Traditional) * New translations nginx.md (English) * New translations nginx.md (Indonesian) * New translations push-docker-hub.md (French) * New translations push-docker-hub.md (Italian) * New translations push-docker-hub.md (Korean) * New translations push-docker-hub.md (Polish) * New translations push-docker-hub.md (Chinese Simplified) * New translations push-docker-hub.md (Chinese Traditional) * New translations push-docker-hub.md (English) * New translations push-docker-hub.md (Indonesian) * New translations scale-out.md (French) * New translations scale-out.md (Italian) * New translations scale-out.md (Korean) * New translations scale-out.md (Polish) * New translations scale-out.md (Chinese Simplified) * New translations scale-out.md (Chinese Traditional) * New translations scale-out.md (English) * New translations scale-out.md (Indonesian) * New translations troubleshooting.md (French) * New translations troubleshooting.md (Italian) * New translations troubleshooting.md (Korean) * New translations troubleshooting.md (Polish) * New translations troubleshooting.md (Chinese Simplified) * New translations troubleshooting.md (Chinese Traditional) * New translations troubleshooting.md (English) * New translations troubleshooting.md (Indonesian) * New translations disable-timelines.md (French) * New translations disable-timelines.md (Italian) * New translations disable-timelines.md (Korean) * New translations disable-timelines.md (Polish) * New translations disable-timelines.md (Chinese Simplified) * New translations disable-timelines.md (Chinese Traditional) * New translations disable-timelines.md (English) * New translations disable-timelines.md (Indonesian) * New translations 1.index.md (French) * New translations 1.index.md (Italian) * New translations 1.index.md (Korean) * New translations 1.index.md (Polish) * New translations 1.index.md (Chinese Simplified) * New translations 1.index.md (Chinese Traditional) * New translations 1.index.md (English) * New translations 1.index.md (Indonesian) * New translations libraries.md (French) * New translations libraries.md (Italian) * New translations libraries.md (Korean) * New translations libraries.md (Polish) * New translations libraries.md (Chinese Simplified) * New translations libraries.md (Chinese Traditional) * New translations libraries.md (English) * New translations libraries.md (Indonesian) * New translations permission.md (French) * New translations permission.md (Italian) * New translations permission.md (Korean) * New translations permission.md (Polish) * New translations permission.md (Chinese Simplified) * New translations permission.md (Chinese Traditional) * New translations permission.md (English) * New translations permission.md (Indonesian) * New translations 1.index.md (French) * New translations 1.index.md (Italian) * New translations 1.index.md (Korean) * New translations 1.index.md (Polish) * New translations 1.index.md (Chinese Simplified) * New translations 1.index.md (Chinese Traditional) * New translations 1.index.md (English) * New translations 1.index.md (Indonesian) * New translations 1.index.md (French) * New translations 1.index.md (Italian) * New translations 1.index.md (Korean) * New translations 1.index.md (Polish) * New translations 1.index.md (Chinese Simplified) * New translations 1.index.md (Chinese Traditional) * New translations 1.index.md (English) * New translations 1.index.md (Indonesian) * New translations global-timeline.md (French) * New translations global-timeline.md (Italian) * New translations global-timeline.md (Korean) * New translations global-timeline.md (Polish) * New translations global-timeline.md (Chinese Simplified) * New translations global-timeline.md (Chinese Traditional) * New translations global-timeline.md (English) * New translations global-timeline.md (Indonesian) * New translations home-timeline.md (French) * New translations home-timeline.md (Italian) * New translations home-timeline.md (Korean) * New translations home-timeline.md (Polish) * New translations home-timeline.md (Chinese Simplified) * New translations home-timeline.md (Chinese Traditional) * New translations home-timeline.md (English) * New translations home-timeline.md (Indonesian) * New translations hybrid-timeline.md (French) * New translations hybrid-timeline.md (Italian) * New translations hybrid-timeline.md (Korean) * New translations hybrid-timeline.md (Polish) * New translations hybrid-timeline.md (Chinese Simplified) * New translations hybrid-timeline.md (Chinese Traditional) * New translations hybrid-timeline.md (English) * New translations hybrid-timeline.md (Indonesian) * New translations index.md (French) * New translations index.md (Italian) * New translations index.md (Korean) * New translations index.md (Polish) * New translations index.md (Chinese Simplified) * New translations index.md (Chinese Traditional) * New translations index.md (English) * New translations index.md (Indonesian) * New translations local-timeline.md (French) * New translations local-timeline.md (Italian) * New translations local-timeline.md (Korean) * New translations local-timeline.md (Polish) * New translations local-timeline.md (Chinese Simplified) * New translations local-timeline.md (Chinese Traditional) * New translations local-timeline.md (English) * New translations local-timeline.md (Indonesian) * New translations main.md (French) * New translations main.md (Italian) * New translations main.md (Korean) * New translations main.md (Polish) * New translations main.md (Chinese Simplified) * New translations main.md (Chinese Traditional) * New translations main.md (English) * New translations main.md (Indonesian) * New translations note-capture-events.md (French) * New translations note-capture-events.md (Italian) * New translations note-capture-events.md (Korean) * New translations note-capture-events.md (Polish) * New translations note-capture-events.md (Chinese Simplified) * New translations note-capture-events.md (Chinese Traditional) * New translations note-capture-events.md (English) * New translations note-capture-events.md (Indonesian) * New translations 2.miauth.md (French) * New translations 2.miauth.md (Italian) * New translations 2.miauth.md (Korean) * New translations 2.miauth.md (Polish) * New translations 2.miauth.md (Chinese Simplified) * New translations 2.miauth.md (Chinese Traditional) * New translations 2.miauth.md (English) * New translations 2.miauth.md (Indonesian) * New translations 1.index.md (French) * New translations 1.index.md (Italian) * New translations 1.index.md (Korean) * New translations 1.index.md (Polish) * New translations 1.index.md (Chinese Simplified) * New translations 1.index.md (Chinese Traditional) * New translations 1.index.md (English) * New translations 1.index.md (Indonesian) * New translations create-plugin.md (French) * New translations create-plugin.md (Italian) * New translations create-plugin.md (Korean) * New translations create-plugin.md (Polish) * New translations create-plugin.md (Chinese Simplified) * New translations create-plugin.md (Chinese Traditional) * New translations create-plugin.md (English) * New translations create-plugin.md (Indonesian) * New translations plugin-api-reference.md (French) * New translations plugin-api-reference.md (Italian) * New translations plugin-api-reference.md (Korean) * New translations plugin-api-reference.md (Polish) * New translations plugin-api-reference.md (Chinese Simplified) * New translations plugin-api-reference.md (Chinese Traditional) * New translations plugin-api-reference.md (English) * New translations plugin-api-reference.md (Indonesian) * New translations publish-on-your-website.md (French) * New translations publish-on-your-website.md (Italian) * New translations publish-on-your-website.md (Korean) * New translations publish-on-your-website.md (Polish) * New translations publish-on-your-website.md (Chinese Simplified) * New translations publish-on-your-website.md (Chinese Traditional) * New translations publish-on-your-website.md (English) * New translations publish-on-your-website.md (Indonesian) * New translations 5.releases.md (French) * New translations 5.releases.md (Italian) * New translations 5.releases.md (Korean) * New translations 5.releases.md (Polish) * New translations 5.releases.md (Chinese Simplified) * New translations 5.releases.md (Chinese Traditional) * New translations 5.releases.md (English) * New translations 5.releases.md (Indonesian) * New translations endpoints.md (French) * New translations endpoints.md (Italian) * New translations endpoints.md (Korean) * New translations endpoints.md (Polish) * New translations endpoints.md (Chinese Simplified) * New translations endpoints.md (Chinese Traditional) * New translations endpoints.md (English) * New translations endpoints.md (Indonesian) * New translations 1.index.md (French) * New translations 1.index.md (Italian) * New translations 1.index.md (Korean) * New translations 1.index.md (Polish) * New translations 1.index.md (Chinese Simplified) * New translations 1.index.md (Chinese Traditional) * New translations 1.index.md (English) * New translations 1.index.md (Indonesian) * New translations 3.oauth.md (French) * New translations 3.oauth.md (Italian) * New translations 3.oauth.md (Korean) * New translations 3.oauth.md (Polish) * New translations 3.oauth.md (Chinese Simplified) * New translations 3.oauth.md (Chinese Traditional) * New translations 3.oauth.md (English) * New translations 3.oauth.md (Indonesian) * New translations aiscript.md (French) * New translations aiscript.md (Italian) * New translations aiscript.md (Korean) * New translations aiscript.md (Polish) * New translations aiscript.md (Chinese Simplified) * New translations aiscript.md (Chinese Traditional) * New translations aiscript.md (English) * New translations aiscript.md (Indonesian) * New translations 50.app.md (French) * New translations 50.app.md (Italian) * New translations 50.app.md (Korean) * New translations 50.app.md (Polish) * New translations 50.app.md (Chinese Simplified) * New translations 50.app.md (Chinese Traditional) * New translations 50.app.md (English) * New translations 50.app.md (Indonesian) * New translations 7.become-a-sponsor.md (French) * New translations 7.become-a-sponsor.md (Italian) * New translations 7.become-a-sponsor.md (Korean) * New translations 7.become-a-sponsor.md (Polish) * New translations 7.become-a-sponsor.md (Chinese Simplified) * New translations 7.become-a-sponsor.md (Chinese Traditional) * New translations 7.become-a-sponsor.md (English) * New translations 7.become-a-sponsor.md (Indonesian)
2024-03-26 15:10:53 +01:00
---
description: このガイドではMisskeyのインストール・セットアップ方法について解説します。
---
# Misskeyを手動で構築する
このガイドではMisskeyのインストール・セットアップ方法について解説します。
:::danger
一度使用を始めたサーバーのドメイン・ホスト名は、決して変更しないでください!
:::
:::tip{label='前提条件'}
#### 以下のソフトウェアがインストール・設定されていること
- **[Node.js](https://nodejs.org/en/)** (20.4.x以上)
- **[PostgreSQL](https://www.postgresql.org/)** (15以上)
- **[Redis](https://redis.io/)**
- **[FFmpeg](https://www.ffmpeg.org/)**
Debian/Ubuntuをお使いであれば、`build-essential`パッケージをインストールしておくと良いです。
#### corepackが有効化されていること
```sh
sudo corepack enable
```
:::
## ユーザーの作成
Misskeyはrootユーザーで実行しない方がよいため、代わりにユーザーを作成します。
Debianの例:
```sh
adduser --disabled-password --disabled-login misskey
```
## Misskeyのインストール
```sh
sudo -iu misskey
git clone --recursive https://github.com/misskey-dev/misskey.git
cd misskey
git checkout master
git submodule update --init
NODE_ENV=production pnpm install --frozen-lockfile
```
## 設定
設定サンプルの`.config/example.yml`をコピーし、`default.yml`にリネームします。
```sh
cp .config/example.yml .config/default.yml
```
`default.yml` をファイル内の指示に従って編集します。
## ビルドと初期化
次のコマンドでMisskeyのビルドとデータベースの初期化を行います。
これにはしばらく時間がかかります。
```sh
NODE_ENV=production pnpm run build
pnpm run init
```
## 起動
お疲れ様でした。以下のコマンドでMisskeyを起動できます。
```sh
NODE_ENV=production pnpm run start
```
GLHF✨
::::g-details{summary="systemdを用いた管理"}
systemdサービスのファイルを作成
`/etc/systemd/system/misskey.service`
エディタで開き、以下のコードを貼り付けて保存:
```ini
[Unit]
Description=Misskey daemon
[Service]
Type=simple
User=misskey
ExecStart=/usr/bin/npm start
WorkingDirectory=/home/misskey/misskey
Environment="NODE_ENV=production"
TimeoutSec=60
StandardOutput=journal
StandardError=journal
SyslogIdentifier=misskey
Restart=always
[Install]
WantedBy=multi-user.target
```
:::warning
CentOSで1024以下のポートを使用してMisskeyを使用する場合は`ExecStart=/usr/bin/sudo /usr/bin/npm start`に変更する必要があります。
:::
systemdを再読み込みしmisskeyサービスを有効化
```sh
sudo systemctl daemon-reload
sudo systemctl enable misskey
```
misskeyサービスの起動
```sh
sudo systemctl start misskey
```
:::tip
`systemctl status misskey`と入力すると、サービスの状態を調べることができます。
:::
::::
## Misskeyのアップデート方法
:::warning
アップデートの際は必ず[リリースノート](https://github.com/misskey-dev/misskey/blob/master/CHANGELOG.md)を確認し、変更点や追加で必要になる作業の有無(ほとんどの場合ありません)を予め把握するようにしてください。
:::
masterをpullし直し、インストール、ビルド、データベースのマイグレーションを行います:
```sh
git checkout master
git pull
git submodule update --init
NODE_ENV=production pnpm install --frozen-lockfile
NODE_ENV=production pnpm run build
pnpm run migrate
```
アップデート内容、およびデータベースの規模によっては時間がかかることがあります。
アップデートが終わり次第、Misskeyプロセスを再起動してください。
```sh
sudo systemctl restart misskey
```
:::tip
ビルドや起動時にエラーが発生した場合は、以下のコマンドをお試しください:
- `pnpm run clean`または`pnpm run clean-all`
- `pnpm rebuild`
:::
:::