User Manual

01.13.2026

MANUAL

Install Pleasanter on Ubuntu

## Overview This manual provides procedures for setting up Pleasanter's operating environment in the following configuration: |Target|Content| |---|---| |OS|Ubuntu 24.04| |DB|PostgreSQL 18 / MySQL 8.4| |Web Server|nginx 1.24.0| |Platform|.NET 10.0.100| |Pleasanter|When using PostgreSQL: Pleasanter 1.4.0.0 and later<br />When using MySQL: Pleasanter 1.4.9.0 and later| ## Notes 1. When installing ver1.4.6 or later, if CodeDefiner is executed without specifying arguments, it will be set up with Language: English and Time Zone: UTC, so please specify the language and time zone as needed. 1. When installing ver1.4.5 or earlier, the CodeDefiner command for initial installation has been changed, so please refer to the following page: [About CodeDefiner procedures for initial installation in ver1.4.6 and later](https://pleasanter.org/ja/manual/codedefiner-changed-steps) 1. MySQL can be used from ver1.4.9.0 onwards. Pleasanter versions prior to ver1.4.9.0 do not support MySQL. 1. When separating the web server and DB server in a MySQL configuration, please refer to "[Configure MySQL to be used in a configuration where the web server and DB server are separated (Ver.1.4.18.0 and later)](mysql-connecting-host-description)" or "[Configure the Web Server and DB Server to Use MySQL Separately](mysql-create-user-by-sql)". ## Prerequisites 1. OS setup procedures are not described. It is assumed that the OS has already been set up. 1. Please check here for details about the operating environment and specifications. [FAQ: I want to know the operating environment and recommended specifications for Pleasanter](faq-recommended-specifications) 1. Please decide in advance which user will start Pleasanter. **<User who will start Pleasanter>** mentioned in the procedure refers to this user. 1. This procedure explains the case where .NET is installed in /usr/local/bin. If you need to install .NET in a different directory (for example, when multiple versions of .NET are required in the same environment), please change the directory specified in ExecStart when executing CodeDefiner and creating the Pleasanter service script to match your installation destination. ## Procedure The setup procedure is as follows: 1. .NET setup 1. Database setup: Perform the following setup for either PostgreSQL or MySQL. ※The order below may not match the actual implementation order. 1. DB installation 1. DB administrator privilege user configuration 1. DB log output configuration 1. DB service configuration and automatic startup enablement 1. Configuration to allow external access to the DB (if applicable) 1. Pleasanter setup 1. Application preparation 1. Database configuration 1. CodeDefiner execution 1. Pleasanter startup verification 1. Pleasanter service script creation 1. Service registration and service startup 1. Reverse proxy (nginx) setup 1. SELinux configuration change 1. nginx installation 1. Reverse proxy configuration 1. Http(80) access permission 1. Pleasanter operation verification ## 1. .NET Setup Execute the following commands 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 10.0 -i /usr/local/bin dotnet --version ``` For details, please refer to **Scripted install** on the official page below: https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install Also, there may be cases where errors related to specific files occur when executing the dotnet command. In such cases, please refer to the page below: https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-ubuntu ## 2. Database Setup Refer to either "PostgreSQL Setup" or "MySQL Setup" below to set up the database. <details> <summary style="font-weight:bold">1. PostgreSQL Setup</summary> The PostgreSQL setup procedure is as follows: #### 1. PostgreSQL Installation Execute the following commands to install PostgreSQL. ``` sudo apt install curl ca-certificates sudo install -d /usr/share/postgresql-common/pgdg sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' sudo apt update sudo apt -y install postgresql-18 ``` #### 2. PostgreSQL User Configuration 1. Execute the following command to set a password for the PostgreSQL management user "postgres" (OS user). After executing the command, a password input prompt will be displayed, so enter a password. ``` sudo passwd postgres ``` 2. Execute the following command to log in to PostgreSQL. ``` sudo su - postgres psql -U postgres ``` 3. Execute the following command to set a password for the PostgreSQL administrative user "postgres". Please make a note of the password set here as it will be used in step 3.2. You do not need to enter the leading "postgres=# ". ``` postgres=# alter role postgres with password '<new password>'; ``` #### 3. PostgreSQL Log Output Configuration Open /etc/postgresql/18/main/postgresql.conf and edit the following settings. ``` log_destination = 'stderr' logging_collector = on log_line_prefix = '[%t]%u %d %p[%l]' ``` #### 4. PostgreSQL Service Restart and Service Configuration Execute the following commands to restart the PostgreSQL service and enable automatic service startup. ``` sudo systemctl restart postgresql sudo systemctl enable postgresql ``` #### 5. Configuration to Allow External DB Access (if applicable) 1. Uncomment the following two lines in /etc/postgresql/18/main/postgresql.conf and configure as shown below: ``` # - Connection Settings - listen_addresses = '*' # what IP address(es) to listen on; port = 5432 # (change requires restart) ``` 2. Add the following line to /etc/postgresql/18/main/pg_hba.conf. Specify the range of IP addresses that will be allowed access in the Address field. ``` # TYPE DATABASE USER ADDRESS METHOD host all all 192.168.1.0/24 scram-sha-256 ``` 3. After configuration, execute the following command to restart the PostgreSQL service. ``` sudo systemctl restart postgresql ``` </details> <details> <summary style="font-weight:bold">2. MySQL Setup</summary> The MySQL setup procedure is as follows: #### 1. MySQL Installation 1. Execute the following commands to download and install the MySQL DEB package. ``` sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.36-1_all.deb sudo dpkg -i mysql-apt-config_0.8.36-1_all.deb ``` The URL specified in the command is the same URL as specified in the official repository below: https://dev.mysql.com/downloads/repo/apt/ 2. A "Package configuration" screen will be displayed on the CUI screen. Verify that "MySQL Server & Cluster (Currently selected: mysql-8.4-lts)" is displayed as shown below. ![image](https://pleasanter.org/binaries/9e43a5a7c9214a8a8c8e267989a55283) 3. Use the keyboard to select "Ok" and press Enter. 4. Execute the following commands to install the MySQL server. ``` sudo apt-get update sudo apt-get install mysql-server -y ``` 5. On the CUI screen, you will be prompted to set a password for the MySQL root account. After entering an arbitrary password string, use the keyboard to select <Ok> and press Enter. Please make a note of the password set here as it will be used in step 3.2. ![image](https://pleasanter.org/binaries/8cf558ad19f64d959042ce8259e22769) 6. You will be prompted to re-enter the password. After entering the same password string, use the keyboard to select <Ok> and press Enter. ![image](https://pleasanter.org/binaries/085e5f007daf4fad9cc7e2435782e978) 7. Execute the command to display the service status. ``` systemctl status mysql.service ``` 8. Verify that "Active: active (running)" is displayed, confirming the service is running. ``` ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2024-10-08 19:00:00 JST; 1min 8s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html (Omitted below) ``` #### 2. MySQL Service Automatic Startup Enablement 1. Execute the following command to enable MySQL service automatic startup. ``` sudo systemctl enable mysql ``` #### 3. MySQL User Configuration **If you do not need to change the MySQL root account password, the following steps are not required.** For the MySQL root account, use the password set during the "MySQL Installation" operation above. Depending on the OS or MySQL version, you may not be prompted to set a root password during installation. In that case, or if you need to modify the root password, please refer to the following procedure. 1. Add the following configuration under [mysqld] in /etc/mysql/mysql.conf.d/mysqld.cnf. ``` [mysqld] skip-grant-tables ``` The configuration file path may differ depending on the OS or MySQL version. 2. Execute the following command to restart the MySQL service. ``` sudo systemctl restart mysqld ``` 3. Execute the following command to log in to MySQL with the root account (without password specification). ``` mysql -u root ``` 4. Execute the following SQL to set a password for the MySQL root account. ``` flush privileges; alter user 'root'@'localhost' identified by '<New password for MySQL root account>'; ``` 5. Execute the following command to log out of MySQL from the root account. ``` quit; ``` 6. Delete the description added under [mysqld] in /etc/mysql/mysql.conf.d/mysqld.cnf. Do not delete [mysqld] itself. ``` skip-grant-tables ``` 7. Execute the following command to restart the MySQL service. ``` sudo systemctl restart mysqld ``` 8. Execute the following command to verify that you can log in to MySQL with the root account. ``` mysql -u root -p ``` 9. Execute the following command to log out of MySQL from the root account. ``` quit; ``` #### 4. MySQL Log Output Configuration **MySQL has error log output enabled by default. If you do not change the default output destination, the following steps are not required.** 1. Check the log file path written in log-error under [mysqld] in /etc/mysql/mysql.conf.d/mysqld.cnf. The configuration file path may differ depending on the OS or MySQL version. ``` [mysqld] log-error=/var/log/mysql/error.log ``` 2. If you want to change the error log output destination, after editing the mysqld.cnf file, execute the following command to restart the MySQL service. ``` sudo systemctl restart mysqld ``` #### 5. Configuration to Allow External DB Access (if applicable) Follow the procedures in the following manuals to add MySQL users: ・[Configure MySQL to be used in a configuration where the web server and DB server are separated (Ver.1.4.18.0 and later)](mysql-connecting-host-description) ・[Configure the Web Server and DB Server to Use MySQL Separately](mysql-create-user-by-sql) This is not required if the web server and DB server are not separated. </details> ## 3. Pleasanter Setup ### 1. Application Preparation 1. Execute 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. Extract the downloaded zip file and transfer the entire extracted "pleasanter" folder to "/web" on the server using a file transfer application such as [WinSCP](https://winscp.net/jp/). 4. Execute the following command to change the owner of files under the pleasanter directory to the predetermined user who will start Pleasanter. ``` sudo chown -R <User who will start Pleasanter> /web/pleasanter ``` ### 2. Database Configuration Configure the database connection information in /web/pleasanter/Implem.Pleasanter/App_Data/Parameters/Rds.json. Configuration examples are shown below. Please also refer to the Rds.json manual as needed. [Set Parameter: Rds.json](rds-json) <details> <summary style="font-weight:bold">Rds.json Configuration Example When Using PostgreSQL</summary> |No|Property Name|Value| |:----|:----|:----| |1|Dbms|"PostgreSQL"| |2|SaConnectionString|"Server=localhost;Port=5432;Database=postgres;UID=postgres;PWD=<font color="Red">XXX</font>"<br>※For PWD value, enter the password set in "PostgreSQL User Configuration".| |3|OwnerConnectionString|"Server=localhost;Port=5432;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=<font color="Red">XXX</font>"<br>※For PWD value, enter an arbitrary password.| |4|UserConnectionString|"Server=localhost;Port=5432;Database=#ServiceName#;UID=#ServiceName#_User;PWD=<font color="Red">XXX</font>"<br>※For PWD value, enter an arbitrary password.| ```json { "Dbms": "PostgreSQL", "Provider": "Local", "SaConnectionString": "Server=localhost;Port=5432;Database=postgres;UID=postgres;PWD=<Password set in PostgreSQL User Configuration>", "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": 0, "MinimumTime": 3, "DeadlockRetryCount": 4, "DeadlockRetryInterval": 1000, "DisableIndexChangeDetection": true, "SysLogsSchemaVersion": 1, "MySqlConnectingHost": "%" } ``` </details> <details> <summary style="font-weight:bold">Rds.json Configuration Example When Using MySQL</summary> |No|Property Name|Value| |:----|:----|:----| |1|Dbms|"MySQL"| |2|SaConnectionString|"Server=localhost;Port=3306;Database=mysql;UID=root;PWD=<font color="Red">XXX</font>"<br>※For PWD value, enter the password set in "MySQL User Configuration".| |3|OwnerConnectionString|"Server=localhost;Port=3306;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=<font color="Red">XXX</font>"<br>※For PWD value, enter an arbitrary password.| |4|UserConnectionString|"Server=localhost;Port=3306;Database=#ServiceName#;UID=#ServiceName#_User;PWD=<font color="Red">XXX</font>"<br>※For PWD value, enter an arbitrary password.| |5|MySqlConnectingHost|If there are no specific requirements, use "%"; if implementing access restrictions to MySQL, refer to "[Set Parameter: Rds.json](rds-json)" and configure accordingly.| ```json { "Dbms": "MySQL", "Provider": "Local", "SaConnectionString": "Server=localhost;Port=3306;Database=mysql;UID=root;PWD=<Password set in MySQL User Configuration>", "OwnerConnectionString": "Server=localhost;Port=3306;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=SetAdminsPWD", "UserConnectionString": "Server=localhost;Port=3306;Database=#ServiceName#;UID=#ServiceName#_User;PWD=SetUsersPWD", "SqlCommandTimeOut": 0, "MinimumTime": 3, "DeadlockRetryCount": 4, "DeadlockRetryInterval": 1000, "DisableIndexChangeDetection": true, "SysLogsSchemaVersion": 1, "MySqlConnectingHost": "%" } ``` </details> ### 3. CodeDefiner Execution Execute the following command to run CodeDefiner with the predetermined user who will start Pleasanter. This procedure explains the case where .NET is installed in /usr/local/bin. If you need to install .NET in a different directory (for example, when multiple versions of .NET are required in the same environment), please change the directory specified when executing CodeDefiner to match your installation destination. ※Execute the following command only during initial installation. ``` cd /web/pleasanter/Implem.CodeDefiner sudo -u <User who will start Pleasanter> /usr/local/bin/dotnet Implem.CodeDefiner.dll _rds /l "<Language>" /z "<Time Zone>" ``` |Argument|Configuration Example|Description| |:--|:--|:--| |/l|ja|Rewrites the DefaultLanguage value in Service.json (※1)| |/z|Asia/Tokyo|Rewrites the TimeZoneDefault value in Service.json (※1)| (※1) For language and time zone settings, 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) For Japanese environment use, the command would be as follows: ``` cd /web/pleasanter/Implem.CodeDefiner sudo -u <User who will start Pleasanter> /usr/local/bin/dotnet Implem.CodeDefiner.dll _rds /l "ja" /z "Asia/Tokyo" ``` When prompted with "Type "y" (yes) if the license is correct, otherwise type "n" (no).", enter **y**. ### 4. Pleasanter Startup Verification 1. Execute the following command to start Pleasanter with the predetermined user. ``` cd /web/pleasanter/Implem.Pleasanter sudo -u <User who will start Pleasanter> /usr/local/bin/dotnet Implem.Pleasanter.dll ``` 2. While running, execute the following command in another terminal to verify that Pleasanter is running. Exit with "Ctrl+C". * Execution command ``` curl -v http://localhost:5000/ ``` * Execution result ``` * Trying 127.0.0.1:5000... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 5000 (#0) > GET / HTTP/1.1 > Host: localhost:5000 > User-Agent: curl/7.68.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 302 Found < Date: Tue, 23 Feb 2021 09:04:33 GMT < Server: Kestrel < Content-Length: 0 < 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. Pleasanter Service Script Creation Create /etc/systemd/system/pleasanter.service with the following content. Specify the predetermined user who will start Pleasanter in **User** below. This procedure explains the case where .NET is installed in /usr/local/bin. If you need to install .NET in a different directory (for example, when multiple versions of .NET are required in the same environment), please change the directory specified in ExecStart to match your installation destination. ``` [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 = <User who will start Pleasanter> Group = root Environment=ASPNETCORE_ENVIRONMENT=Production Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false [Install] WantedBy = multi-user.target ``` ### 6. Service Registration and Service Startup Execute the following commands to start the Pleasanter service and enable automatic service startup. ``` sudo systemctl daemon-reload sudo systemctl enable pleasanter sudo systemctl start pleasanter ``` ## 4. Reverse Proxy (nginx) Setup Configure the reverse proxy to enable access via Port 80, the same as a normal web server. ### 1. SELinux Configuration Change Execute the following command: ``` getenforce ``` #### a. If any of "Command 'getenforce' not found.", "Permissive", or "Disabled" is displayed Proceed to "2. nginx Installation". #### b. If "Enforcing" is displayed Execute the following command: ``` sudo setsebool -P httpd_can_network_connect on ``` ※By changing the above boolean value in SELinux, all network connections via scripts and modules on the relevant server will be permitted. ### 2. nginx Installation Execute the following commands to install nginx. ``` sudo apt install -y nginx sudo systemctl enable nginx ``` ### 3. Reverse Proxy Configuration 1. Create /etc/nginx/conf.d/pleasanter.conf with the following content. Specify the hostname or IP address of the server you will actually access in the server_name line. ``` 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, execute the following command to restart the service. ``` sudo systemctl restart nginx ``` ### 3. Http(80) Access Permission Execute the following commands to configure Http (port:80) access permission to allow clients to access the web service. ``` sudo ufw allow 80/tcp sudo ufw enable sudo ufw status numbered ``` ## 5. Pleasanter Operation Verification 1. After starting Pleasanter, enter "Login ID: Administrator" and "Initial Password: pleasanter" on the Pleasanter login screen, then click the "Login" button. ![image](https://pleasanter.org/binaries/8f4b033195b746c2939d76d9f7420a1f) 2. After logging in, you will be prompted to change the password for the "Administrator" user, so enter an arbitrary password and click the "Change" button. ![image](https://pleasanter.org/binaries/0ff466031f9f41719bb5eb9f8190c218) ### If Not Redirected Correctly Please verify that the nginx configuration is correct. Small differences such as the presence or absence of / in the description can change the behavior. ### If Pleasanter Screen Does Not Open If the above steps completed without errors but accessing via browser displays a page such as "Welcome to nginx!" (not an error display), it is possible that the browser's security settings are preventing navigation to the Pleasanter login screen. Please check your browser's security settings. ## Supported Versions |Supported Version|Content| |:--|:--| |1.4.9.0 and later|Compatible with MySQL| |1.4.10.0 and later|Resolved issue where MySQL access control functionality may reject Owner and User connections<br>※Added link to "[Configure the Web Server and DB Server to Use MySQL Separately](mysql-create-user-by-sql)" in notes| |1.4.18.0 and later|Added functionality to specify connection source hosts other than localhost (same server as DB) for MySQL DB| |1.5.0.0 and later|Compatible with .NET 10, PostgreSQL 18| ## Related Information [FAQ: I want to install Pleasanter 1.3.43.0 or earlier in a Linux environment with PostgreSQL version 14 or earlier.](faq-postgresql-14-intall-pleasanter-for-linux)
TOP