User Manual

01.13.2026

MANUAL

Installing Pleasanter on Amazon EC2's Red Hat Enterprise Linux 10

## Overview This manual describes the procedure for building a Pleasanter operating environment in the following environment. |Target|Body| |---|---| |Service|Amazon EC2 and Amazon RDS| |OS|Red Hat Enterprise Linux 10 (HVM), SSD Volume Type| |DB|MySQL 8.4.5| |Web Server|nginx 1.26.3| |Platform|.NET 8.0.410| |Pleasanter|Pleasanter 1.4.18.0 or later| ## Notes 1. If you run CodeDefiner without specifying arguments, it will be set up with the language: English and the time zone: UTC, so please specify the language and time zone as necessary. ## Prerequisites 1. The EC2 instance is set up under the following conditions. 1. The security group rules must allow SSH traffic, HTTP traffic, and HTTPS traffic. 1. The private key of the key pair for the EC2 instance has been downloaded. 1. The default user for the EC2 instance, ec2-user, exists. 1. The RDS instance is assumed to be set up under the following conditions. 1. The connection to the EC2 instance has been configured. 1. The master user name and master password have been set, and password authentication can be performed. 1. This procedure explains the case where .NET is installed in /usr/local/bin. If you install .NET in a different directory because multiple versions of .NET are required in the same environment, change the directory specified in ExecStart when running CodeDefiner or creating a script for the Pleasanter service to match the installation destination. ## Procedure The construction procedure is as follows. 1. SSH connection to EC2 instance 1. Set up .NET 1. Set up Pleasanter 1. Prepare the application 1. Configure the database 1. Run CodeDefiner 1. Check that Pleasanter is running 1. Create a script for the Pleasanter service 1. Register as a service and start the service 1. Set up a reverse proxy (nginx) 1. Change SELinux settings 1. Install nginx 1. Set up the reverse proxy 1. Check that Pleasanter is running ## 1. SSH connection to EC2 instance In this procedure, use a client such as TeraTerm and a file transfer tool such as WinSCP to connect to the EC2 instance from the client PC via SSH. 1. Open the management screen of the EC2 instance and check the public IP address. 2. Start a client such as TeraTerm and a file transfer tool such as WinSCP, and connect to the EC2 instance with the following connection settings. 1. Destination: Public IP address of the EC2 instance 2. User name: ec2-user 3. Password: Leave blank 4. Other: Use a private key ## 2. Set up .NET Execute the following command to install .NET. ``` sudo wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh sudo chmod +x ./dotnet-install.sh sudo ./dotnet-install.sh -c 8.0 -i /usr/local/bin dotnet --version ``` For details, please refer to the official page below **Installation by script**. https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install ### Tips When you run the dotnet --version command, you may see an error message requesting the installation of ICU (an open source library that provides various functions for handling Unicode). ・Example of error message `Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.` In that case, run the following command to install ICU. ・Execution command ``` sudo yum install libicu-devel wget -y ``` ## 3. Set up Pleasanter ### 1. Prepare the application 1. Run the following command to create a "web" directory in the root directory ("/"). ``` sudo mkdir /web ``` 2. Download the latest version of Pleasanter from the [Download Center](https://pleasanter.org/dlcenter). 3. Unzip the downloaded zip file and place the unzipped "pleasanter" folder in the "/web" directory of the server using a file transfer application such as [WinSCP](https://winscp.net/jp/). 4. Run the following command to change the owner of the pleasanter directory to ec2-user (the user who will launch pleasanter). ``` sudo chown -R ec2-user /web/pleasanter ``` ### 2. Configure the database 1. Set the database connection information. Open /web/pleasanter/Implem.Pleasanter/App_Data/Parameters/Rds.json, set the parameters as shown below, and save them. |Parameter name|Value|Description| |:--|:--|:--| |Dbms|MySQL|Use Amazon RDS (MySQL) as a relational database. | |Provider|Local|Use Amazon RDS (MySQL) as a relational database. | |SaConnectionString|**\*\*\*\***|Set as in step 3.2.2. | |OwnerConnectionString|**\*\*\*\***|Set as in step 3.2.3. | |UserConnectionString|**\*\*\*\***|Set as in step 3.2.4. | |SqlCommandTimeOut|0|Set the SQL command timeout period to indefinite. | |MinimumTime|3|Specifies the minimum time unit that the database can identify in milliseconds. This parameter cannot be changed. | |DeadlockRetryCount|4|Maximum number of retries when a deadlock occurs. | |DeadlockRetryInterval|1000|Interval until retry when a deadlock occurs. | |DisableIndexChangeDetection|true|Does not detect differences in database indexes when upgrading. | |SysLogsSchemaVersion|2|Uses the "extension of system logs". | |MySqlConnectingHost|%|Specifies a wildcard to allow connection from an EC2 instance. | **About "MySqlConnectingHost"** For details about "MySqlConnectingHost" in "[Rds.json](/en/manual/rds-json)" added in Ver.1.4.18.0 and later, please see below. <details> <summary>(Click here to open/close the details)</summary> ・If the following requirements are not met (default value): "%" ・If access to MySQL is prohibited from hosts other than the specified external hosts: "Host name/IP address to allow connection (in AWS, set private IP address)". Multiple entries can be specified by separating them with commas (e.g. "hostname01,hostname02"). </details> 2. Set the connection string SaConnectionString as follows. |Body|e.g.|Details| |:--|:--|:--| |Server|{DB identifier string}.rds.amazonaws.com|Endpoint of RDS instance. | |Port|3306|Port number of RDS instance. | |Database|mysql|Fixed to mysql. | |UID|{UserName}|Master user name of Microsoft Azure Database for MySQL. | |PWD|{Password}|Master password of Microsoft Azure Database for MySQL. | Example of setting the connection string SaConnectionString: ```text Server={DB identifier string}.rds.amazonaws.com;Port=3306;Database=mysql;UID={UserName};PWD={Password} ``` 3. Set the connection string OwnerConnectionString as follows. |Body|E.g.|Details| |:--|:--|:--| |Server|{DB identifier string}.rds.amazonaws.com|Endpoint of the RDS instance. | |Port|3306|Port number of the RDS instance. | |Database|#ServiceName#|Name in Service.json. #ServiceName# is a placeholder that references the Name in Service.json. | |UID|#ServiceName#_Owner|Any user name created in CodeDefiner. #ServiceName# is a placeholder that references the Name in Service.json. | |PWD|SetAdminsPWD|Password of any user set in CodeDefiner. | Example of setting the connection string OwnerConnectionString: ```text Server={DB identifier string}.rds.amazonaws.com;Port=3306;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=SetAdminsPWD ``` 4. Set the connection string UserConnectionString as follows. |Body|e.g.|Details| |:--|:--|:--| |Server|{DB identifier string}.rds.amazonaws.com|Endpoint of the RDS instance. | |Port|3306|Port number of the RDS instance. | |Database|#ServiceName#|Name of Service.json. #ServiceName# is a placeholder that references the Name of Service.json. | |UID|#ServiceName#_User|Any user name created with CodeDefiner. #ServiceName# is a placeholder that references the Name of Service.json. | |PWD|SetUsersPWD|Password of any user to be set in CodeDefiner. | Example of setting the connection string UserConnectionString: ```text Server={DB identifier string}.rds.amazonaws.com;Port=3306;Database=#ServiceName#;UID=#ServiceName#_User;PWD=SetUsersPWD ``` ### 3. Run CodeDefiner Run the following command to run CodeDefiner with ec2-user. This procedure explains the case where .NET is installed in /usr/local/bin. If you need multiple versions of .NET in the same environment, or if you want to install .NET in a different directory, change the directory specified when running CodeDefiner to match the installation destination. *The following command is executed only during the initial installation. ``` cd /web/pleasanter/Implem.CodeDefiner sudo -u ec2-user /usr/local/bin/dotnet Implem.CodeDefiner.dll _rds /l "<language>" /z "<timezone>" ``` |Arguments|e.g.|Description| |:--|:--|:--| |/l|en|Rewrites the DefaultLanguage value in Service.json (*1)| |/z|UTC|Rewrites the TimeZoneDefault value in Service.json (*1)| (*1) For language and time zone, please refer to the following manual page. [FAQ: I want to know the parameter settings for languages ​​and time zones supported by Pleasanter](https://pleasanter.org/manual/faq-supported-language) If you are using an English environment, use the following command. ``` cd /web/pleasanter/Implem.CodeDefiner sudo -u ec2-user /usr/local/bin/dotnet Implem.CodeDefiner.dll _rds /l "en" /z "UTC" ``` If the message "Type "y" (yes) if the license is correct, otherwise type "n" (no)" appears during the process, enter **y**. ### 4. Check that Pleasanter is running 1. Run the following command to start Pleasanter with ec2-user. ``` cd /web/pleasanter/Implem.Pleasanter sudo -u ec2-user /usr/local/bin/dotnet Implem.Pleasanter.dll ``` 2. While it is running, run the following command in another terminal to check that Pleasanter is running. Exit with "Ctrl+C". * Execute command ``` curl -v http://localhost:5000/ ``` * Execution result ``` * Host localhost:5000 was resolved. * IPv6: ::1 * IPv4: 127.0.0.1 * Trying [::1]:5000... * Connected to localhost (::1) port 5000 > GET / HTTP/1.1 > Host: localhost:5000 > User-Agent: curl/8.9.1 > Accept: */* > * Request completely sent off < HTTP/1.1 302 Found < Content-Length: 0 < Date: Tue, 24 Jun 2025 02:59:24 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 ``` ### 5. Create 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/local/bin/dotnet Implem.Pleasanter.dll WorkingDirectory = /web/pleasanter/Implem.Pleasanter Restart = always RestartSec = 10 KillSignal=SIGINT SyslogIdentifier=dotnet-pleasanter User = ec2-user Group = root Environment=ASPNETCORE_ENVIRONMENT=Production Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false [Install] WantedBy = multi-user.target ``` ### 6. Register as a service and start the service Execute the following command to enable the Pleasanter service start and automatic service start. ``` sudo systemctl daemon-reload sudo systemctl enable pleasanter sudo systemctl start pleasanter ``` ## 4. Set up a reverse proxy (nginx) Set up the reverse proxy so that it can be accessed through Port 80, the same as a normal web server. ### 1. Change SELinux settings Execute the following command. ``` getenforce ``` #### a. If "Command 'getenforce' not found," "Permissive," or "Disabled" is displayed Proceed to "2. Install nginx." #### b. If "Enforcing" is displayed Execute the following command. ``` sudo setsebool -P httpd_can_network_connect on ``` *Changing the above Boolean value of SELinux will allow all network connections by scripts and modules on the server in question. ### 2. Install nginx Execute the following command to install nginx. ``` sudo dnf install -y nginx sudo systemctl enable nginx ``` ### 3. Reverse proxy settings 1. Create /etc/nginx/conf.d/pleasanter.conf with the following contents. Specify the public IP address of the EC instance on the server_name line. **Note** The public IP address will change when the EC2 instance is restarted. Please consider using an Elastic IP address to obtain a fixed IP address. ``` server { listen 80; server_name 192.168.1.100; 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; } } ``` 2. After creating the file, run the following command to restart the service. ``` sudo systemctl restart nginx ``` ## 5. Check the operation of Pleasanter 1. There are two addresses that can be used to check whether Pleasanter is running. You can check the public IP address and public DNS from the EC2 instance management screen. 1. http://{EC2 public IP address} 2. http://{EC2 public DNS} E.g.: http://{character string}.compute.amazonaws.com 2. After starting Pleasanter, enter "Login ID: Administrator" and "Initial password: pleasanter" on the Pleasanter login screen and click the "Login" button. ![image](https://pleasanter.org/binaries/a31ada168c1340e6aa00437eab465ee9) 3. After logging in, you will be asked to change the "Administrator" user password, so enter a password of your choice and click the "Change" button. ![image](https://pleasanter.org/binaries/022308331b7745498969318ec8b95620) ### If redirection is not correct Check that the nginx settings are correct. The behavior may change depending on small differences such as the presence or absence of/in the description. ### If the Pleasanter screen does not open If the above steps were completed without any errors, but a page such as "Welcome to nginx!" (not an error message) is displayed when accessed through a browser, the security settings of the browser may prevent you from transitioning to the Pleasanter login screen. Please check the security settings of your browser. ## Upgrade Pleasanter Please refer to the following manual for the procedure to upgrade the Pleasanter installed in this procedure. [Upgrade Procedure for Version 1.4.8.0 or Later (Linux)](version-up-linux-1.4.8.0) ## Related Information [Upgrade Procedure for Version 1.4.8.0 or Later (Linux)](version-up-linux-1.4.8.0)
TOP