I want to install Pleasanter using Apache as my web server
Prerequisites¶
- We will not cover how to set up the OS. We assume that the OS has already been set up.
- For details on the operating environment and specifications, please see here.
FAQ: I want to know the operating environment and recommended specifications
Overview¶
This explanation shows the steps to build a Pleasanter operating environment in the environment shown below.
| Target | Contents |
|---|---|
| OS | Red Hat Enterprise Linux 9.1 |
| DB | PostgreSQL 14 |
| Web server | Apache |
| Platform | .NET 6.0 |
| Pleasanter | Pleasanter 1.3.37.0 |
Operation Procedure¶
1. Install .NET6.0¶
Install ASP.NET Core Runtime¶
Install GDI+¶
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf install -y libgdiplus
2. Set up PostgreSQL¶
Register Package Repository¶
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Install PostgreSQL¶
Initialize The Database¶
Additional information:
- -A: Specify the authentication method
- -W: Option to display the password prompt
- Specify the password for the Postgres user of the DB at this point
Log output settings¶
Open /var/lib/pgsql/14/data/postgresql.conf and set the following.
*Log files are saved in /var/lib/pgsql/14/data/log.
Enable The Service¶
PostgreSQL User Settings For The OS¶
Set a password for the PostgreSQL administration user Postgres (OS user).
Install The Full-text Search Module (pg_trgm)¶
Install the module (pg_trgm) required for full-text search of text.
- Switch to user Postgres and connect to PostgreSQL.
- Create database Implem.Pleasanter.
- Switch to database Implem.Pleasanter.
- Install pg_trgm.
Settings For Allowing External Access To The DB¶
- Uncomment the following two lines in /var/lib/pgsql/14/data/postgresql.conf and set them as follows.
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
port = 5432 # (change requires restart)
- Add the following lines to /var/lib/pgsql/14/data/pg_hba.conf.
In the Address field, specify the range of IP addresses to allow access.
- After setting, restart the PostgreSQL service.
3. Installing Pleasanter 1.3¶
Preparing The Application¶
Download Pleasanter 1.3.
Create a "/web" folder in the root directory ("/") and put the "pleasanter" folder there.
- /web/pleasanter/Implem.Pleasanter
- /web/pleasanter/Implem.CodeDefiner
- /web/pleasanter/Tools
Database Configuration¶
- Set /web/pleasanter/Implem.Pleasanter/App_Data/Parameters/Rds.json as follows.
{
"Dbms": "PostgreSQL",
"Provider": "Local",
"TimeZoneInfo": "Asia/Tokyo",
"SaConnectionString":"Server=localhost;Port=5432;Database=postgres;UID=postgres;PWD={The password which you set}",
"OwnerConnectionString":"Server=localhost;Port=5432;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=SetAdminsPWD",
"UserConnectionString":"Server=localhost;Port=5432;Database=#ServiceName#;UID=#ServiceName#_User;PWD=SetUsersPWD",
"SqlCommandTimeOut": 600,
"MinimumTime": 3,
"DeadlockRetryCount": 4,
"DeadlockRetryInterval": 1000
}
- Run CodeDefiner
- Start Pleasanter
- Access http://localhost:5000/ in another terminal and confirm that a normal response is returned.
Response example
* About to connect() to localhost port 5000 (#0)
* Trying ::1...
* Connected to localhost (::1) port 5000 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:5000
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Mon, 25 May 2020 15:13:08 GMT
< Server: Kestrel
< Content-Length: 0
< Location: http://localhost:5000/users/login?ReturnUrl=%2F
Once you have confirmed it, press Ctrl+C to exit.
Creating A Script For The Pleasanter Service¶
Create /etc/systemd/system/pleasanter.service with the following content.
[Unit]
Description = Pleasanter
Documentation =
Wants=network.target
After=network.target
[Service]
ExecStart = /usr/bin/dotnet Implem.Pleasanter.dll (※1)
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
(*1)
This example is for Red Hat Enterprise Linux 8. If you are using other versions, check the PATH of the dotnet command and change it to match your environment. You can check the execution path of dotnet by executing the following command.
For example, if the result of executing the above command is /usr/local/bin/dotnet, the line (*1) must be set as follows.
Register as a service and start the service¶
Setting Up A Reverse Proxy (Apache)¶
Set up the reverse proxy so that it can be accessed via Port 80, the same as a normal web server.
Installing Apache¶
Install Apache with the following command.
Reverse Proxy Settings¶
Add the following to the last line of /etc/httpd/conf/httpd.conf.
After adding the file, restart Apache.
Access Permission To Port 80¶
Set access permission to http (port: 80) to allow clients to access the web service.
The settings differ depending on each environment, so please check as appropriate.
4. Other settings¶
Initial Account¶
Login ID: The administrator is created as the initial user.
The initial user password is pleasanter by default. A password change dialog will be displayed when you log in for the first time, so please set a password of your choice.
This password can be specified in /web/pleasanter/Implem.Pleasanter/App_Data/Parameters/Service.json with DefaultPassword.
Steps to enable the reminder function in Pleasanter version 1.3.7.0 or later¶
Change the parameter settings in "BackgroundService.json" and "Service.json". When changing parameters, please refer to the manual "Confirmation When Changing Parameters".
BackgroundService.json¶
Refer to the manual "Set Parameter: BackgroundService.json" and change the settings in the BackgroundService.json file to the following settings.
| Column | e.g. | Description |
|---|---|---|
| Reminder | true | Enable reminder function |
Service.json¶
Refer to the manual "Set Parameter: Service.json" and change the settings in the Service.json file to the following settings.
| Column | e.g. | Description |
|---|---|---|
| AbsoluteUri | "http://pleasanter.example.local" | Please enter the first part of the URL to be displayed in notifications and reminders. (null is not allowed) |
Database Migration¶
For instructions on migrating from SQL Server to PostgreSQL, please refer to the following manual.
Migration Procedure from Pleasanter's DB from SQL Server to PostgreSQL