User Manual

09.25.2025

MANUAL

Install Pleasanter on AlmaLinux

## Overview This manual describes the procedure for building a Pleasanter operating environment in the following environment. |Target|Content| |---|---| |OS|AlmaLinux 9.2| |DB|PostgreSQL 17 or MySQL 8.4| |Web Server|nginx 1.20.1| |Platform|.NET 8.0| |Pleasanter|When using PostgreSQL: Pleasanter 1.4.0.0 and later<br>When using MySQL: Pleasanter 1.9.0 and later| ## Notes 1. When installing ver1.4.6 or later, 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. 2. MySQL can be used from ver1.4.9.0 onwards. Pleasanter versions earlier than ver1.4.9.0 do not support MySQL. 3. 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)". 4. When configuring a separated web server and DB server setup in MySQL, 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. We will not describe how to set up the OS. We assume that the OS has been set up in advance. 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. Decide in advance the user who will start Pleasanter. **User who will launch Pleasanter** in the procedure refers to this user. 1. This procedure explains the case where .NET is installed in /usr/local/bin. If you need multiple versions of .NET in the same environment and you want to install .NET in a different directory, 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. Setting up the database: Perform the following setup for either PostgresSQL or MySQL. *The order in which the settings are implemented may not match the order shown below. 1. Install the DB 1. Set up a user with DB manager privileges 1. Set up DB log output 1. Turn the DB into a service and enabling automatic startup 1. Set up to allow external access to the D 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 starting the service 1. Set up a reverse proxy (nginx) 1. Change SELinux settings 1. Install nginx 1. Set up the 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 dnf install libicu sudo ./dotnet-install.sh -c 8.0 -i /usr/local/bin dotnet --version ``` For details, please refer to the official page below **Scripted install**. https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install 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-redhat ## 2. Set Up The 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 details) </summary> #### 1. Install PostgreSQL Run the following command to install PostgreSQL. ``` sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm sudo dnf install -y postgresql17-server postgresql17-contrib ``` #### 2. Initialize the PostgreSQL database Run the following command to initialize the database. |Option| Description | |---|---| |-A|Option to specify authentication method. |-W|Option to display password prompt After execution, a password prompt will be displayed, so enter the password. The password set here will be used in step 3.2, so please make a note of it so you don't forget it. ``` sudo su - postgres -c '/usr/pgsql-17/bin/initdb -E UTF8 -A scram-sha-256 -W' ``` ##### 3. PostgreSQL log output settings Open /var/lib/pgsql/17/data/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-17 sudo systemctl enable postgresql-17 ``` #### 5. Settings for allowing external access to the database 1. Uncomment the following two lines in /var/lib/pgsql/17/data/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 /var/lib/pgsql/17/data/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 setting, run the following command to restart the PostgreSQL service. ``` sudo systemctl restart postgresql-17 ``` </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 install the MySQL package and server. ``` sudo dnf install -y https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm sudo dnf install mysql-community-server ``` The URL specified in the command is the same as the URL specified in the official repository below. https://dev.mysql.com/downloads/repo/yum/ 2. Run the command to display the service status. ``` systemctl status mysqld.service ``` 3. Check that the service is stopped and that the message "Active: inactive (dead)" is displayed as shown below. ``` ○ mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; preset: disabled) Active: inactive (dead) Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html ``` #### 2. Enable automatic startup of MySQL service 1. Run the following command to start the MySQL service. ``` sudo systemctl start mysqld ``` 2. Run the following command to enable automatic startup of MySQL service. ``` sudo systemctl enable mysqld ``` #### 3. MySQL user settings 1. Add the following settings under [mysqld] in /etc/my.cnf. ``` [mysqld] skip-grant-tables ``` The path of the configuration file may differ depending on the OS or MySQL version. 2. Run the following command to restart the MySQL service. ``` sudo systemctl restart mysqld ``` 3. Run the following command to log in to MySQL with the root account (without password). ``` mysql -u root ``` 4. Run 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 (*)>'; ``` *The default settings for MySQL installed in this procedure require a password of 8 characters or more, including uppercase and lowercase letters, numbers, and special characters. 5. Execute the following command to log out of the root account from MySQL. ``` quit; ``` 6. Delete the description added under [mysqld] in /etc/my.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 do not need to be performed.** 1. Check the path of the log file listed in log-error under [mysqld] in /etc/my.cnf. The path of the configuration file may differ depending on the OS or MySQL version. ``` [mysqld] log-error=/var/log/mysqld.log ``` 2. If you want to change the output destination of the error log, edit the my.cnf file and then run the following command to restart the MySQL service. ``` sudo systemctl restart mysql ``` #### 5. Configuration for Allowing External Access to the Database Follow the steps in the manual below to add a MySQL user. 1. Configure the Web Server and DB Server to Use MySQL Separately (Ver.1.4.18.0 and later) - Now, Japanese Only 2. Configure the Web Server and DB Server to Use MySQL Separately (Ver.1.4.17.1 and earlier) If the web server and database server are not separated, this step is not necessary. </details> ## 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. Extract the downloaded zip file and place 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 the Pleasanter directory to the user who will start Pleasanter. ``` sudo chown -R <User who will start Pleasanter> /web/pleasanter ``` ### 2. Database Configuration Set the database connection information in /web/pleasanter/Implem.Pleasanter/App_Data/Parameters/Rds.json. A setting e.g. is shown below. Please also refer to the Rds.json manual if necessary. [Set Parameter: Rds.json](rds-json) ### E.g. Of Rds.json Settings When Using PostgreSQL The following is an e.g. of Rds.json settings when using PostgreSQL. <details> <summary> (Click here to open/close details) </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 the PWD value, enter the password you set in "Initializing the PostgreSQL database". | |3|OwnerConnectionString|"Server=localhost;Port=5432;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=<font color="Red">XXX</font>"<br>*For the PWD value, enter any password. | |4|UserConnectionString|"Server=localhost;Port=5432;Database=#ServiceName#;UID=#ServiceName#_User;PWD=<font color="Red">XXX</font>"<br>*Please enter any password as the PWD value. | ```json { "Dbms": "PostgreSQL", "Provider": "Local", "SaConnectionString": "Server=localhost;Port=5432;Database=postgres;UID=postgres;PWD=<「PostgreSQLデータベースの初期化」で設定したパスワード>", "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 } ``` </details> ### E.g. Of Rds.json Settings When Using MySQL The following is an e.g. of Rds.json settings when using MySQL. <details> <summary> (Click here to open/close details) </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 the PWD value, enter the password you set in "MySQL user settings". | |3|OwnerConnectionString|"Server=localhost;Port=3306;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=<font color="Red">XXX</font>"<br>*For the PWD value, enter any password. | |4|UserConnectionString|"Server=localhost;Port=3306;Database=#ServiceName#;UID=#ServiceName#_User;PWD=<font color="Red">XXX</font>"<br>*Please enter any password for the PWD value. | |5|MySqlConnectingHost|If there are no special requirements, use "%". If you want to implement access restrictions for MySQL, refer to "Set Parameter: [Rds.json](/en/manual/rds-json)" and configure appropriately. *In the default settings of MySQL installed in this procedure, you will be asked to enter a password of 8 characters or more, including uppercase letters, lowercase letters, numbers, and special characters. ```json { "Dbms": "MySQL", "Provider": "Local", "SaConnectionString": "Server=localhost;Port=3306;Database=mysql;UID=root;PWD=<「MySQLユーザの設定」で設定したパスワード>", "OwnerConnectionString": "Server=localhost;Port=3306;Database=#ServiceName#;UID=#ServiceName#_Owner;PWD=Set_0_Admins_0_PWD", "UserConnectionString": "Server=localhost;Port=3306;Database=#ServiceName#;UID=#ServiceName#_User;PWD=Set_0_Users_0_PWD", "SqlCommandTimeOut": 0, "MinimumTime": 3, "DeadlockRetryCount": 4, "DeadlockRetryInterval": 1000, "DisableIndexChangeDetection": true, "SysLogsSchemaVersion": 1 "MySqlConnectingHost": "%" } ``` </details> ### 3. Run CodeDefiner Execute the following command to run CodeDefiner with the user that will start Pleasanter as determined in advance. This procedure explains the case where .NET is installed in /usr/local/bin. If you need to install .NET in a different directory due to requirements such as needing multiple versions of .NET in the same environment, please 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 <user who will launch Pleasanter> /usr/local/bin/dotnet Implem.CodeDefiner.dll _rds /l "<Language>" /z "<Timezone>" ``` |Argument|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 timezone, please refer to the following manual page. [FAQ: I want to know the supported languages and timezone parameter setting values in Pleasanter](https://pleasanter.org/en/manual/faq-supported-language) If you are using it in a English environment, use the following command. ``` cd /web/pleasanter/Implem.CodeDefiner sudo -u <User who starts Pleasanter> /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, enter **y**. ### 4. 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 start 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". * Execution command ``` curl -v http://localhost:5000/ ``` * Execution result ``` * Trying ::1:5000... * Connected to localhost (::1) port 5000 (#0) > GET / HTTP/1.1 > Host: localhost:5000 > User-Agent: curl/7.76.1 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 302 Found < Content-Length: 0 < Date: Tue, 25 Jul 2023 11:33: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 ``` ### 5. 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 start Pleasanter. In this procedure, .NET is installed in /usr/local/bin. If you need to install .NET in a different directory, such as when multiple versions of .NET are required in the same environment, modify the directory specified in ExecStart to match the installation location. ``` [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 starts Pleasanter> 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 ``` *Change 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. 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 firewall-cmd --permanent --add-port=80/tcp sudo firewall-cmd --reload ``` ## 5. 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/237437d5ffb94dc7a66fd0f64b81083d) 2. After logging in, you will be asked to change the password for the "Administrator" user, so enter a password of your option and click the "Change" button. ![image](https://pleasanter.org/binaries/970d7492732e4833b11460d23e712951) ### If The 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 have been completed without any errors, but a page such as "Welcome to nginx!" (not an error message) is displayed when accessed from 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. ## 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| |1.4.18.0 and later| Added functionality to specify connection source hosts other than localhost (same server as DB) for MySQL database connections | ## 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
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.