Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 05_using_efm.mdx #4788

Merged
merged 2 commits into from
Sep 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions product_docs/docs/efm/4/05_using_efm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -265,27 +265,37 @@ After creating the `acctg.properties` and `sales.properties` files, create a ser

### RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x

If you're using RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x, copy the `edb-efm-4.<x>` unit file to a new file with a name that is unique for each cluster. For example, if you have two clusters named acctg and sales, the unit file names might be:
If you're using RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x, copy the service file `/usr/lib/systemd/system/edb-efm-4.<x>.service` to `/etc/systemd/system` with a new name that is unique for each cluster.

```text
/usr/lib/systemd/system/efm-acctg.service
For example, if you have two clusters named `acctg` and `sales` managed by EFM 4.7, the unit file names might be `efm-acctg.service` and `efm-sales.service`, and they can be created with:

/usr/lib/systemd/system/efm-sales.service
```shell
cp /usr/lib/systemd/system/edb-efm-4.7.service /etc/systemd/system/efm-acctg.service
cp /usr/lib/systemd/system/edb-efm-4.7.service /etc/systemd/system/efm-sales.service
```

Then, edit the `CLUSTER` variable in each unit file, changing the specified cluster name from `efm` to the new cluster name. For example, for a cluster named `acctg`, the value specifies:
Then use `systemctl edit` to edit the `CLUSTER` variable in each unit file, changing the specified cluster name from `efm` to the new cluster name.
Also update the value of the `PIDfile` parameter to match the new cluster name.

```text
In our example, edit the `acctg` cluster by running `systemctl edit efm-acctg.service` and write:

```ini
[Service]
Environment=CLUSTER=acctg
PIDFile=/run/efm-4.7/acctg.pid
```

Also update the value of the `PIDfile` parameter to specify the new cluster name. For example:
And edit the `sales` cluster by running `systemctl edit efm-sales.service` and write:

```ini
PIDFile=/var/run/efm-4.7/acctg.pid
[Service]
Environment=CLUSTER=sales
PIDFile=/run/efm-4.7/sales.pid
```

After copying the service scripts, enable the services:
Note: You could also have edited the files in `/etc/systemd/system` directly, but then you'll have to run `systemctl daemon-reload`, which is unecessary when using `systemd edit` to change the override files.

After saving the changes, enable the services:

```text
# systemctl enable efm-acctg.service
Expand All @@ -296,7 +306,7 @@ After copying the service scripts, enable the services:
Then, use the new service scripts to start the agents. For example, to start the `acctg` agent:

```text
# systemctl start efm-acctg`
# systemctl start efm-acctg
```

For information about customizing a unit file, see [Understanding and administering systemd](https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html).