User Manual

12.09.2025

MANUAL

Install Pleasanter on Ubuntu Using the Installer

The Japanese version of the manual is the latest.
Please also check.
## Overview This procedure is for building a Pleasanter operating environment using the "Installer". You can also install it using the previous procedure of manually placing modules and setting parameters. Please refer to the following for manual installation procedures. [Install Pleasanter on Ubuntu](getting-started-pleasanter-ubuntu) |Target|Body| |---|---| |OS|Ubuntu 22.04| |DB|PostgreSQL 16 or MySQL 8.4| |Web server|nginx 1.20.1| |Platform|.NET 8.0| |Pleasanter|Pleasanter 1.4| ## Notes 1. MySQL can be used from version 1.4.9.0 onwards. Pleasanter versions earlier than version 1.4.9.0 do not support MySQL. 2. If you want to separate the web server and DB server in MySQL, please refer to "[Configure the Web Server and DB Server to Use MySQL Separately](mysql-create-user-by-sql)". ## Limitations Installation using the "Installer" is for version 1.4.0.0 and later. If you are installing version 1.3.50.2 or earlier, please refer to the manual installation procedure. [Install Pleasanter on Ubuntu](getting-started-pleasanter-ubuntu) ## Prerequisites 1. We will not describe how to set up the OS. We assume that the OS has already been set up. 1. For details on the operating environment and specifications, please check here. [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. The **<User who will execute Pleasanter>** described in the procedure refers to this user. 1. This procedure explains the case where .NET is installed in /usr/local/bin. If you install .NET in a different directory because you need multiple versions of .NET 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. Set up .NET 1. Set up Database: Perform the following setup for either PostgresSQL or MySQL. <br/> ※The following may not match the order of configuration. 1. Install DB 1. Set up DB administrator user 1. DB log output settings 1. Enable DB service and automatic startup 1. Settings for allowing external access to DB 1. Install the installer 1. Set up Pleasanter 1. Run the installer 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 reverse proxy (nginx) 1. Change SELinux settings 1. Install nginx 1. Set up reverse proxy 1. Allow access to Http(80) 1. Check that Pleasanter is running ## 1. Set up .NET Run 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 Also, there are cases where an error occurs regarding a specific file when executing the dotnet command. In that case, please refer to the following page. https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-ubuntu ## 2. Set up Database Refer to either "Set up PostgreSQL" or "Set up MySQL" below to set up the database. ### 1. Set up PostgreSQL The procedure for setting up PostgreSQL is as follows. <details> <summary>(Click here to open/close the details) </summary> #### 1. Install PostgreSQL Execute the following command 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-16 ``` #### 2. Set the PostgreSQL user 1. Execute the following command to set a password for the PostgreSQL administration user "postgres" (OS user). After executing the command, a password input prompt will be displayed, so enter the 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 the password for the PostgreSQL administrative user "postgres". The password you set here will be used in step 3.2, so be sure to write it down so you don't forget it. ``` postgres=# alter role postgres with password '<New password>'; ``` #### 3. PostgreSQL log output settings Open /etc/postgresql/16/main/postgresql.conf and edit the following settings. ``` log_destination = 'stderr' logging_collector = on log_line_prefix = '[%t]%u %d %p[%l]' ``` #### 4. Restart the PostgreSQL service and make it a service Execute the following command to restart the PostgreSQL service and enable automatic service startup. ``` sudo systemctl restart postgresql sudo systemctl enable postgresql ``` #### 5. Settings to allow external access to the database 1. Uncomment the following two lines in /etc/postgresql/16/main/postgresql.conf and set them as follows. ``` # - Connection Settings - listen_addresses = '*' # what IP address(es) to listen on; port = 5432 # (change requires restart) ``` 2. Add the following lines to /etc/postgresql/16/main/pg_hba.conf. In the Address field, specify the range of IP addresses to allow access. ``` # TYPE DATABASE USER ADDRESS METHOD host all all 192.168.1.0/24 scram-sha-256 ``` 3. After the settings are complete, run the following command to restart the PostgreSQL service. ``` sudo systemctl restart postgresql ``` </details> ### 2. Set up MySQL The procedure for setting up MySQL is as follows. <details> <summary>(Click here to open/close details) </summary> #### 1. Install MySQL 1. Run the following command to download and install the MySQL DEB package. ``` sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.32-1_all.deb sudo dpkg -i mysql-apt-config_0.8.32-1_all.deb ``` The URL specified in the command is the same as the URL specified in the official repository below. https://dev.mysql.com/downloads/repo/apt/ 2. The "Package Settings" screen will be displayed on the CUI screen. Please make sure that "MySQL Server & Cluster (Currently selected: mysql-8.4-lts)" is displayed as shown below. ![image](https://pleasanter.org/binaries/ac24a823836a4850a1d378cff3a44b0e) 3. Use the keyboard to select "Ok" and press the Enter key. 4. Execute the following command to install the MySQL server. ``` sudo apt-get update sudo apt-get install mysql-server -y ``` 5. You will be asked to set a password for the MySQL root account on the CUI screen. After entering a password string of your choice, use the keyboard to select "OK" and press the Enter key. The password you set here will be used in step 3.2, so be sure to write it down so you don't forget it. ![image](https://pleasanter.org/binaries/bde409e3840c43499ffcab6d5b769913) 6. You will be asked to re-enter your password. After entering the same password string, use the keyboard to select "OK" and press the Enter key. ![image](https://pleasanter.org/binaries/535b6a76d0834262a26c13a4e4683f85) 7. Execute the command to display the status of the service. ``` systemctl status mysql.service ``` 8. Confirm that the service is running and that the text "Active: active (running)" is displayed as shown below. ``` ● 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 (The rest is omitted.) ``` #### 2. Enable automatic startup of MySQL service 1. Execute the following command to enable automatic startup of MySQL service. ``` sudo systemctl enable mysql ``` #### 3. Configure MySQL user **If you do not change the password of MySQL root account, the following procedure is not necessary.** For MySQL root account, use the password set during the above "Install MySQL" operation. Depending on the OS or MySQL version, you may not be asked to set the root password during installation. In that case, or if you want to change the root password, see the following procedure. 1. Add the following setting under [mysqld] in /etc/mysql/mysql.conf.d/mysqld.cnf. ``` [mysqld] skip-grant-tables ``` The path of the configuration file 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). ``` mysql -u root ``` 4. Execute the following SQL to set the 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 the root account from MySQL. ``` quit; ``` 6. Delete the description added under [mysqld] in /etc/mysql/mysql.conf.d/mysqld.cnf. Do not delete [mysqld]. ``` skip-grant-tables ``` 7. Execute the following command to restart the MySQL service. ``` sudo systemctl restart mysqld ``` 8. Execute the following command to confirm that you can log in to MySQL with the root account. ``` mysql -u root -p<MySQL root account password without any spaces between -p> ``` 9. Execute the following command to log out of the root account from MySQL. ``` quit; ``` #### 4. MySQL log output settings **Error log output is enabled by default in MySQL. If you do not want to change the default output destination, the following steps are not necessary.** 1. Check the path of the log file listed in log-error under [mysqld] in /etc/mysql/mysql.conf.d/mysqld.cnf. The path of the configuration file may differ depending on the OS or MySQL version. ``` [mysqld] log-error=/var/log/mysql/error.log ``` 2. If you want to change the output destination of the error log, edit the mysqld.cnf file and then run the following command to restart the MySQL service. ``` sudo systemctl restart mysqld ``` </details> ## 3. Install the Installer Run the following command to install the installer. ``` dotnet tool install -g Implem.PleasanterSetup echo 'export PATH="$PATH:~/.dotnet/tools"' >> ~/.bashrc echo 'export DOTNET_ROOT=/usr/local/bin' >> ~/.bashrc echo 'export PATH=$PATH:$DOTNET_ROOT' >> ~/.bashrc source ~/.bashrc ``` ### If you are not connected to a network environment, install using the following procedure. <details> <summary>(Click here to open/close the details) </summary> 1. Open the Nuget Gallery for Implem.PleasanterSetup from [here](https://www.nuget.org/packages/Implem.PleasanterSetup/) and download the .nupkg file from "Download package". ![image](https://pleasanter.org/binaries/3566ffc5937a42f4b78b0e055375db87) 1. Execute the following command to create a folder of your choice to place the .nupkg file. ※This procedure explains how to create /dotnet-tools. ``` sudo mkdir /dotnet-tools ``` 1. Place the .nupkg file downloaded in 3.1 in /dotnet-tools. 1. Execute the following command to install the installer. ``` dotnet tool install -g --add-source /dotnet-tools Implem.PleasanterSetup echo 'export PATH="$PATH:~/.dotnet/tools"' >> ~/.bashrc echo 'export DOTNET_ROOT=/usr/local/bin' >> ~/.bashrc echo 'export PATH=$PATH:$DOTNET_ROOT' >> ~/.bashrc source ~/.bashrc ``` </details> ## 4. Set up Pleasanter ### 1. Run the installer By using the installer, the latest version resources are automatically downloaded and the values ​​of Service.json and Rds.json are automatically set based on the values ​​entered. #### The procedure when using PostgreSQL is as follows. <details> <summary>(Click here to open/close the details) </summary> 1. Run the following command to run the installer. ``` pleasanter-setup ``` **If you are not connected to a network environment, follow the steps below** <details> <summary>(Click here to open/close the details) </summary> 1. Download the latest version of Pleasanter from the [Download Center](https://pleasanter.org/dlcenter) and place it in "/web/". 1. Run the following command. **/web/** Make sure that the configuration under the directory is as follows. /web/Pleasanter_1.4.x.x.zip ``` pleasanter-setup -r /web/Pleasanter_1.4.x.x.zip ``` </details> 2. Enter the directory where you want to install Pleasanter. If you want to install it in "/web/pleasanter", leave it blank and press Enter. ![image](https://pleasanter.org/binaries/f13dfbf34ae042d3b0d29fc2a019868f) 3. Enter **<User who will execute Pleasanter>**. ![image](https://pleasanter.org/binaries/e8c3b81488f54ab7ab82eb815a3cc292) 4. Enter the service name. If you want to install it in "Implem.Pleasanter", leave it blank and press Enter. ![image](https://pleasanter.org/binaries/380abbfe3b694fa1808943276872facf) 5. Enter the number corresponding to the DBMS you are using. Enter "2" here and press Enter. ![image](https://pleasanter.org/binaries/559fbf8821c547f69a7af7df541afcba) 6. Enter the port number you are using. If you are using the default port number for the DBMS, leave it blank and press Enter. ![image](https://pleasanter.org/binaries/8ad6a0ac806b48c8bc36ebeacf9cf4f5) 7. Enter the value you want to set for Server in the connection string. If you are using "localhost", leave it blank and press Enter. ![image](https://pleasanter.org/binaries/9f639bff6ef144dc8e7db66e87cc9852) 8. Enter the value to be set for UID in SaConnectionString. If you are using "postgres", leave it blank and press the Enter key. ![image](https://pleasanter.org/binaries/fae77d65e09d4eee98949e7f1a0af88b) 9. Enter the value to be set for PWD in SaConnectionString. *The password will be displayed in a masked state. ![image](https://pleasanter.org/binaries/816178b1b7924d33af100c6eec8c9c24) 10. Enter the value to be set for PWD in OwnerConnectionString. *The password will be displayed in a masked state. ![image](https://pleasanter.org/binaries/63271bb2323541ef8334d7b78b93d97a) 11. Enter the value to be set for PWD in UserConnectionString. *The password will be displayed in a masked state. ![image](https://pleasanter.org/binaries/1ffab3c8df6649dfb546941d37422456) 12. Enter the "Default language". Enter the number of the corresponding language. ![image](https://pleasanter.org/binaries/0979eb4f35444d6eaad342196ba8700f) 13. Enter the time zone for "Default time zone". Enter the number of the corresponding time zone. *If you enter "3", enter a time zone that can be used by the OS you are using. ![image](https://pleasanter.org/binaries/f624f5b006a349dcaa2d676b2c2ecf95) 14. The summary screen will be displayed. If the entered values ​​are correct, enter **y** after "Shall I install Pleasanter with this content? Please enter ‘y(yes)' or 'n(no)'. :" and press Enter to execute. *The password is masked. ![image](https://pleasanter.org/binaries/ed79489a02c943278299da3894693ca0) 15. When "Type "y" (yes) if the license is correct, otherwise type "n" (no)" is displayed, enter **y** and execute. When the following log is displayed, the setup is complete. ``` <SUCCESS> Starter.ConfigureDatabase: Database configuration has been completed. <SUCCESS> Starter.Main: All of the processes have been completed. Setup is complete. ``` 16. When setup is complete, a web browser will launch and display the [Enterprise Edition trial information page](https://pleasanter.org/pleasanter-extensions-trial/?utm_source=installer&utm_medium=app&utm_campaign=extension-trial&utm_content=route01). ![image](https://pleasanter.org/binaries/e0295268d5a3491898c9f3a28cdf8bf2) </details> #### The procedure for using MySQL is as follows. <details> <summary>(Click here to open/close the details) </summary> 1. Run the following command to run the installer. ``` pleasanter-setup ``` **If you are not connected to a network environment, follow the procedure below** <details> <summary>(Click here to open/close details) </summary> 1. Download the latest version of Pleasanter from the [Download Center](https://pleasanter.org/dlcenter) and place it in "/web/". 1. Run the following command. **/web/** Make sure that the configuration under the directory is as follows. /web/Pleasanter_1.4.x.x.zip ``` pleasanter-setup -r /web/Pleasanter_1.4.x.x.zip ``` </details> 2. Enter the directory where you want to install Pleasanter. If you want to install to "/web/pleasanter", leave it blank and press Enter. ![image](https://pleasanter.org/binaries/925ef72cd4524805bd07aa5025cbfe92) 3. Enter **<User who will execute Pleasanter>**. ![image](https://pleasanter.org/binaries/40e27edaf00c4beba8a6bf43894ce8a1) 4. Enter the service name. If you want to install to "Implem.Pleasanter", leave it blank and press Enter. ![image](https://pleasanter.org/binaries/06205d4592a74b2d8102819153d58236) 5. Enter the number corresponding to the DBMS you want to use. Here, enter "3" and press Enter. ![image](https://pleasanter.org/binaries/c1415519c7ac4110a4c87f3f5466a232) 6. Enter the port number to be used. If you are using the default port number for the DBMS, leave it blank and press the Enter key. ![image](https://pleasanter.org/binaries/163b060494384c63924353fa6a034807) 7. Enter the value to be set in Server in the connection string. If you are using "localhost", leave it blank and press the Enter key. ![image](https://pleasanter.org/binaries/1427c236a4c845c89f297838a2e33f58) 8. Enter the value to be set in UID of SaConnectionString. If you are using "root", leave it blank and press the Enter key. ![image](https://pleasanter.org/binaries/cf3a94202a34457da4983b5eaabbeddf) 9. Enter the value to be set for PWD in SaConnectionString. *The password will be displayed in a masked state. ![image](https://pleasanter.org/binaries/8cd7ffa00da74cafa7598566a776e35e) 10. Enter the value to be set for PWD in OwnerConnectionString. *The password will be displayed in a masked state. ![image](https://pleasanter.org/binaries/5832fe530afc49f084ab724aea11cebe) 11. Enter the value to be set for PWD in UserConnectionString. *The password will be displayed in a masked state. ![image](https://pleasanter.org/binaries/6d2c4c31339746fcbbd83c3e799d7575) 12. Enter the "Default language". Enter the number of the corresponding language. ![image](https://pleasanter.org/binaries/919f09cc07d6426c8d2dace58735d364) 13. Enter the "Default time zone". Enter the number of the corresponding time zone. *If you entered "3", enter a time zone that can be used with the OS you are using. ![image](https://pleasanter.org/binaries/ac9a886f889d487d9e296b3814e379ec) 14. The summary screen will be displayed. If the entered values ​​are correct, enter **y** after "Shall I install Pleasanter with this content? Please enter ‘y(yes)' or 'n(no)'. : " and press Enter to execute. *Password is masked. ![image](https://pleasanter.org/binaries/4edc398d7ff14a7f8707f9fd27795d96) 15. When "Type "y" (yes) if the license is correct, otherwise type "n" (no)" is displayed, enter **y** and execute. When the following log is displayed, the setup is complete. ``` <SUCCESS> Starter.ConfigureDatabase: Database configuration has been completed. <SUCCESS> Starter.Main: All of the processes have been completed. Setup is complete. ``` 16. When setup is complete, a web browser will launch and display the [Enterprise Edition trial information page](https://pleasanter.org/pleasanter-extensions-trial/?utm_source=installer&utm_medium=app&utm_campaign=extension-trial&utm_content=route01). ![image](https://pleasanter.org/binaries/c9020f9c1f0a4b5dba819300bd16777d) </details> ### 2. Check that Pleasanter is running 1. Run the following command to start Pleasanter with a predefined user. ``` cd /web/pleasanter/Implem.Pleasanter sudo -u <User who will execute Pleasanter> /usr/local/bin/dotnet Implem.Pleasanter.dll ``` 2. While Pleasanter 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 ``` * 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 ``` ### 3. Create a script for the Pleasanter service Create /etc/systemd/system/pleasanter.service with the following content. For **User** below, specify the user who will execute Pleasanter. ``` [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 = <The user who launches Pleasanter> Group = root Environment=ASPNETCORE_ENVIRONMENT=Production Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false [Install] WantedBy = multi-user.target ``` ### 4. 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 ``` ## 5. 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. Installing 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 apt install -y nginx sudo systemctl enable nginx ``` ### 3. Reverse proxy settings 1. Create /etc/nginx/conf.d/pleasanter.conf with the following contents. In the server_name line, specify the hostname or IP address of the server you want to access. ``` 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 ``` ### 3. Permission to access Http(80) Execute the following command to set permission to access Http (port:80) to allow clients to access the web service. ``` sudo ufw allow 80/tcp sudo ufw enable sudo ufw status numbered ``` ## 6. Check the Operation of Pleasanter 1. 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/8f4b033195b746c2939d76d9f7420a1f) 2. After logging in, you will be asked to change the password for the "Administrator" user, so enter a password of your choice and click the "Change" button. ![image](https://pleasanter.org/binaries/80b791a9f59f45999299eca1eceb5165) ### If redirection is not correct Check that your nginx settings are correct. Small differences such as the presence or absence of/in the description may affect operation. ### 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 you access the page in a browser, the security settings of the browser may be preventing you from transitioning to the Pleasanter login screen. Please check the security settings of your browser. ## Supported Versions |Supported versions|Body| |:--|:--| |1.4.9.0 and later|Supports MySQL| |1.4.10.0 and later|Fixed the issue where Owner and User connections were rejected due to MySQL's access control function<br>*Added a link to "[Configure the Web Server and DB Server to Use MySQL Separately](mysql-create-user-by-sql)" in the notes| ## Related Information
TOP