日本語│English
       

株式会社アイオーアーキテクトは、オープンソースなどを活用してシステム運用を最適にご提供します。

  • ホーム
  • OTRS
  • サービス内容
  • 会社案内
  • ラボノート
  • お問い合わせ
  1. HOME
  2. ラボノート
  3. UbuntuにPleasanter 1.3.37をインストール

ラボノート

2023/08/22 桜井耕造
Tweet
UbuntuにPleasanter 1.3.37をインストール


本日は、Pleasanterといノーコード、ローコードのOSSを紹介します。何かデータを纏める時にExcelを活用するかと思いますが、複数人でデータの更新したり、他のExcelのデータと連携したいとなったら、Webシステム化すると便利になってきます。そんな時にPleasanterを使うと簡単にWebシステムに出来るようになります。Plesanterとは、どんなツールかは以下のURLでご確認下さい。

https://pleasanter.org/

ここでは、Pleasanterのインストールの方法を紹介します。
インストール環境は、以下となります。
Ubuntu 22.04 LTS
PostgreSQL 14.7
Nginx 1.18
Pleasanter 1.3.37

(1).Netパッケージの削除

# apt upgrade
# apt remove 'dotnet*' 'aspnet*' 'netstandard*'
# vi /etc/apt/preferences
---
Package: dotnet* aspnet* netstandard*
Pin: origin "packages.microsoft.com"
Pin-Priority: -10
---

(2).NETをスクリプトでインストール

# wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
# chmod +x ./dotnet-install.sh
# ./dotnet-install.sh -i /usr/local/bin

(3)GDI+のインストール

# apt install -y libgdiplus

(4)PostgreSQLのインストール

# apt -y install vim bash-completion
# wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add
# echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee /etc/apt/sources.list.d/pgdg.list

# apt install -y postgresql-14 postgresql-client-14
# cd /etc/postgresql/14/main/

PostgreSQLの認証方式の設定
# cp -ip pg_hba.conf pg_hba.conf.20230509

# vi pg_hba.conf
METHODの設定を以下のように修正する。
----
# IPv4 local connections:
host all all 127.0.0.1/32 scram-sha-256→md5
# IPv6 local connections:
host all all ::1/128 scram-sha-256→md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 scram-sha-256→md5
host replication all ::1/128 scram-sha-256→md5
----

PostgreSQLのログ出力設定
# cp -ip postgresql.conf postgresql.conf.20230509

# vi postgresql.conf
以下のように修正する。
-----
log_destination = 'stderr'
logging_collector = on
log_line_prefix = '[%t]%u %d %p[%l]'
-----

PostgreSQLのサービス再起動、サービス化
# systemctl restart postgresql
# systemctl enable postgresql
Synchronizing state of postgresql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable postgresql

PostgreSQLユーザの設定
PostgreSQL管理用のユーザー"postgres"(OSのユーザー)にパスワードを設定します。
# passwd postgres
New password: ←パスワード
Retype new password: ←パスワード
passwd: password updated successfully

# su – postgres
$ psql -U postgres
psql (14.3 (Ubuntu 14.3-0ubuntu0.22.04.1))
Type "help" for help.

postgres=#

PostgreSQLの管理ユーザー "postgres" のパスワードを設定
postgres=# alter role postgres with password 'パスワード';
ALTER ROLE

プリザンター用のデータベース "Implem.Pleasanter" を作成します。
postgres=# create database "Implem.Pleasanter";
CREATE DATABASE

以下のコマンドで作成したDBの確認を行います。
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-------------------+----------+----------+-------------+-------------+-----------------------
Implem.Pleasanter | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)

全文検索用モジュール(pg_trgm)のインストール
テキストの全⽂検索に必要なモジュール(pg_trgm)をインストールします。
postgres=# \c "Implem.Pleasanter"
Implem.Pleasanter=# create extension pg_trgm;

(5)Pleasanter1.3.37をインストール

#  wget https://github.com/Implem/Implem.Pleasanter/releases/download/Pleasanter_1.3.37.3/Pleasanter_1.3.37.3.zip
# apt install -y unzip
# unzip Pleasanter_1.3.37.3.zip
# mkdir /web
# mv pleasanter/ /web/.

# cd /web/pleasanter/Implem.Pleasanter/App_Data/Parameters
# cp -ip Rds.json Rds.json.20230509
# vi Rds.json
以下を修正する。
---
{
"Dbms": "PostgreSQL",
"Provider": "Local",
"TimeZoneInfo": "Asia/Tokyo", ←追記
"SaConnectionString": "Server=localhost;Database=postgres;UID=postgres;PWD=パスワード", ←修正
"OwnerConnectionString": "Server=localhost;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=SetAdminsPWD",
"UserConnectionString": "Server=localhost;Database=#ServiceName#;UID=#ServiceName#_User;PWD=SetUsersPWD",
"SqlCommandTimeOut": 600, ←修正
"MinimumTime": 3,
"DeadlockRetryCount": 4,
"DeadlockRetryInterval": 1000,
"DisableIndexChangeDetection": true
}
---

(6)CodeDefinerの実行

# cd /web/pleasanter/Implem.CodeDefiner
# dotnet Implem.CodeDefiner.dll _rds
<INFO>が多数表示され、最後に以下が標準出力されることを確認する。
<SUCCESS> Starter.ConfigureDatabase: Database configuration has been completed.
<SUCCESS> Starter.Main: All of the processes have been completed.

(7)Pleasnterの起動確認

# cd /web/pleasanter/Implem.Pleasanter
# dotnet Implem.Pleasanter.dll

以下のコマンドで動作確認したら、「Ctrl+C」で終了します。

別のターミナルで以下のコマンドを実行し、プリザンターが起動していることを確認します。
# curl -v http://localhost:5000/
* Trying 127.0.0.1:5000...
* Connected to localhost (127.0.0.1) port 5000 (#0)
> GET / HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 302 Found
< Content-Length: 0
< Date: Tue, 07 Jun 2022 04:59:38 GMT
< Server: Kestrel
< Location: http://localhost:5000/users/login?ReturnUrl=%2F
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
<
* Connection #0 to host localhost left intact

(8)Pleasanterサービス用スクリプトの作成

/etc/systemd/system/pleasanter.service を以下の内容で新規作成します。
# vi /etc/systemd/system/pleasanter.service
---
[Unit]
Description = Pleasanter
Documentation =
Wants=network.target
After=network.target

[Service]
ExecStart = /usr/bin/dotnet Implem.Pleasanter.dll
WorkingDirectory = /web/pleasanter/Implem.Pleasanter
Restart = always
RestartSec = 10
KillSignal=SIGINT
SyslogIdentifier=dotnet-pleasanter
User = root
Group = root
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy = multi-user.target
---

(9)サービスとして登録・サービスの起動

# systemctl daemon-reload
# systemctl enable pleasanter
Created symlink /etc/systemd/system/multi-user.target.wants/pleasanter.service → /etc/systemd/system/pleasanter.service.
# systemctl start pleasanter

(10)リバースプロキシ(NginX)のセットアップ

# apt install -y nginx
# systemctl enable nginx

# vi /etc/nginx/conf.d/pleasanter.conf
---
server {
listen 80;
server_name 192.168.X.X;
client_max_body_size 100M;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
---

# systemctl restart nginx

(11)Pleasanterにログイン
以下のURLからログインします。
http://XX.XX.X.X/users/login
ID: Administrator
PW: pleasanter(初期パスワード)


参考URL; https://pleasanter.org/manual/getting-started-pleasanter-ubuntu

  • OTOBO(OTRS)
  • 事業内容
  • 会社案内
  • お問い合わせ
  • ラボノート
  • カテゴリ
    • CMDBuild (1)
    • OCS Inventory NG (3)
    • OpenAudIT (8)
    • OSS (8)
    • OTOBO (61)
    • OTRS (96)
    • SnipeIT (1)
    • Znuny (20)
    • オープンソース (18)
    • 未分類 (1)
    • 豆知識 (7)
    アーカイブ
    • 2025年4月 (1)
    • 2025年3月 (4)
    • 2025年2月 (1)
    • 2024年11月 (1)
    • 2024年10月 (5)
    • 2024年9月 (4)
    • 2024年8月 (4)
    • 2024年7月 (5)
    • 2023年12月 (5)
    • 2023年8月 (2)
    • 2022年6月 (2)
    • 2022年5月 (1)
    • 2022年4月 (1)
    • 2022年3月 (2)
    • 2022年2月 (1)
    • 2022年1月 (6)
    • 2021年12月 (16)
    • 2021年11月 (4)
    • 2021年8月 (1)
    • 2021年4月 (1)
    • 2021年3月 (2)
    • 2021年2月 (2)
    • 2021年1月 (2)
    • 2020年5月 (1)
    • 2019年10月 (1)
    • 2019年8月 (1)
    • 2019年6月 (1)
    • 2019年2月 (2)
    • 2018年12月 (1)
    • 2018年10月 (3)
    • 2018年9月 (2)
    • 2018年8月 (1)
    • 2018年7月 (5)
    • 2018年6月 (3)
    • 2017年12月 (3)
    • 2017年11月 (4)
    • 2017年10月 (1)
    • 2017年9月 (2)
    • 2017年8月 (2)
    • 2017年7月 (1)
    • 2017年5月 (2)
    • 2017年4月 (4)
    • 2017年3月 (1)
    • 2017年2月 (3)
    • 2017年1月 (2)
    • 2016年12月 (2)
    • 2016年11月 (4)
    • 2016年10月 (3)
    • 2016年8月 (3)
    • 2016年7月 (1)
    • 2016年6月 (2)
    • 2016年5月 (4)
    • 2016年4月 (2)
    • 2016年3月 (1)
    • 2016年2月 (1)
    • 2016年1月 (2)
    • 2015年12月 (1)
    • 2015年8月 (1)
    • 2015年6月 (1)
    • 2015年5月 (3)
    • 2015年4月 (3)
    • 2015年3月 (3)
    • 2015年2月 (3)
    • 2015年1月 (3)
    • 2014年12月 (4)
    • 2014年11月 (4)
    • 2014年10月 (4)
    • 2014年9月 (2)
    • 2014年8月 (1)
Tweet

〒279-0004 千葉県浦安市猫実1-20-43
MAIL sales@io-architect.com

       
HOME OTOBO,Znuny,OTRS 事業内容 会社案内 ラボノート
保守サポート チケット管理サポート 会社概要 お問い合わせ
いつくしまパッケージ OpenAuditサポート 企業理念  
CRM機能(ContractDB) DRBDサポート プライバシーポリシー  
CTI連携(BIZTEL CTI) Kompiraサポート    
IT資産管理(CMDBReadyToUse) OSS導入サポート    
 導入事例 OSS導入事例    
 リリース情報 その他の技術支援    
© IO Architect Inc. 2016 - 2024
pagetop