You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: defender-endpoint/linux-deploy-defender-for-endpoint-with-chef.md
+50-56Lines changed: 50 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ms.collection:
15
15
ms.topic: conceptual
16
16
ms.subservice: linux
17
17
search.appverid: met150
18
-
ms.date: 12/16/2024
18
+
ms.date: 12/20/2024
19
19
---
20
20
21
21
# Deploy Defender for Endpoint on Linux with Chef
@@ -29,33 +29,34 @@ ms.date: 12/16/2024
29
29
30
30
## Introduction
31
31
32
-
This article talks about how to deploy Defender for Endpoint on Linux at scale with chef using two methods, installer script and by manually configuring the repositories for more granular control over the deployment.
32
+
This article talks about how to deploy Defender for Endpoint on Linux at scale with Chef using two methods:
33
33
34
-
## Prerequisites and system requirements
34
+
1. Install using installer script
35
+
2. Manually configuring the repositories for more granular control over the deployment
36
+
37
+
## Prerequisites
35
38
36
39
For a description of prerequisites and system requirements, see [Microsoft Defender for Endpoint on Linux](/defender-endpoint/microsoft-defender-endpoint-linux).
37
40
38
41
## Download the onboarding package
39
42
40
-
Download the onboarding package from Microsoft Defender portal.
41
-
42
-
In the [Microsoft Defender portal](https://security.microsoft.com/), go to **Settings** > **Endpoints** > **Device management** > **Onboarding**.
43
+
1. Sign in to the [Microsoft Defender portal](https://security.microsoft.com/) then navigate to **Settings** > **Endpoints** > **Device management** > **Onboarding**.
43
44
44
-
In the first drop-down menu, select **Linux Server** as the operating system. In the second drop-down menu, select **Your preferred Linux configuration management tool** as the deployment method.
45
+
2.In the first drop-down menu, select **Linux Server** as the operating system. In the second drop-down menu, select **Your preferred Linux configuration management tool** as the deployment method.
45
46
46
-
1. Select **Download onboarding package**. Save the file as `WindowsDefenderATPOnboardingPackage.zip`.
47
+
3. Select **Download onboarding package** and save the file as `WindowsDefenderATPOnboardingPackage.zip`.
47
48
48
-

49
+

49
50
50
-
1. Extract the contents of the archive:
51
+
4. Extract the contents of the archive using the following command:
51
52
52
53
Command:
53
54
54
55
```
55
56
unzip WindowsDefenderATPOnboardingPackage.zip
56
57
```
57
58
58
-
Output:
59
+
The expected output is:
59
60
60
61
```
61
62
Archive: WindowsDefenderATPOnboardingPackage.zip
@@ -64,75 +65,70 @@ In the first drop-down menu, select **Linux Server** as the operating system. In
64
65
65
66
## Create a directory structure
66
67
67
-
Before you begin, make sure the Chef components are already installed and a Chef repository exists (chef generate repo <reponame>) to store the cookbook that's used to deploy to Defender for Endpoint on Chefmanaged Linux servers.
68
+
Before you begin, ensure the Chef components are already installed and a Chef repository (chef generate repo <reponame>) exists to store the cookbook that's used to deploy to Defender for Endpoint on Chef-managed Linux servers.
68
69
69
-
This command creates a new folder structure for the new cookbook called mdatp. You can also use an existing cookbook if you already have one you'd like to use to add the Defender for Endpoint deployment into.
70
+
The following command creates a new folder structure for the new cookbook called **mdatp**. You can also use an existing cookbook if you already have one you'd like to use to add the Defender for Endpoint deployment into.
70
71
71
72
```bash
72
73
chef generate cookbook mdatp
73
74
```
74
75
75
-
After the cookbook is created, create a files folder inside the cookbook folder that just got created:
76
+
After the cookbook is created, create a files folder inside the cookbook folder that you created:
76
77
77
78
```bash
78
79
mkdir mdatp/files
79
80
```
80
81
81
82
Copy `mdatp_onboard.json` to the `/tmp` folder.
82
83
83
-
On the Chef Workstation, navigate to the mdatp/recipes folder. This folder is created when the cookbook was generated. Use your preferred text editor (like vi or nano) to add the following instructions to the end of the default.rb file:
84
+
On the Chef Workstation, navigate to the **mdatp/recipes** folder, which is automatically created when the cookbook is generated. Use your preferred text editor (like vi or nano) to add the following instructions to the end of the **default.rb** file then save and close the file:
84
85
85
86
- include_recipe '::install_mdatp'
86
87
87
-
Then save and close the default.rb file.
88
-
89
88
## Create a cookbook
90
89
91
-
Cookbook can be created via two methods:
92
-
93
-
1. create a cookbook using installer script
90
+
A cookbook can be created through any of the following methods:
94
91
95
-
1. create a cookbook by manually configuring repositories
92
+
-[Using an installer script](linux-deploy-defender-for-endpoint-with-chef.md#create-a-cookbook-using-installer-script)
1. Download the installer bash script. Pull the [installer bash script](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/mde_installer.sh) from Microsoft GitHub Repository or use the following command to download it.
97
+
1. Download the installer bash script. Pull the [installer bash script](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/mde_installer.sh) from Microsoft GitHub Repository or use the following command to download it:
2. Next create a new recipe file named install_mdatp.rb in the recipes folder `~/cookbooks/mdatp/recipes/install_mdatp.rb` and add this text to the file. You can also download the file directly from [GitHub](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/third_party_installation_playbooks/chef.install_mdatp_simplified.rb)
103
+
2. Create a new recipe file named **install_mdatp.rb** in the recipes folder `~/cookbooks/mdatp/recipes/install_mdatp.rb` and add the following text to the file. You can also download the file directly from [GitHub](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/third_party_installation_playbooks/chef.install_mdatp_simplified.rb).
107
104
108
-
```bash
109
-
mdatp = "/etc/opt/microsoft/mdatp"
105
+
```bash
106
+
mdatp = "/etc/opt/microsoft/mdatp"
110
107
111
-
#Download the onboarding json from tenant, keep the same at specific location
112
-
onboarding_json = "/tmp/mdatp_onboard.json"
108
+
#Download the onboarding json from tenant, keep the same at specific location
109
+
onboarding_json = "/tmp/mdatp_onboard.json"
113
110
114
-
#Download the installer script from: https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/mde_installer.sh
115
-
#Place the same at specific location, edit this if needed
116
-
mde_installer= "/tmp/mde_installer.sh"
111
+
#Download the installer script from: https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/mde_installer.sh
112
+
#Place the same at specific location, edit this if needed
>Installer script also supports other parameters such as channel, realtime protection, version, etc. To selectfrom the list of available options, check help.
125
+
> [!NOTE]
126
+
> The installer script also supports other parameters such as channel, realtime protection, version, etc. To selectfrom the list of available options, check help through the following command:
130
127
>```./mde_installer.sh --help```
131
128
132
-
133
129
### Create a cookbook by manually configuring repositories
134
130
135
-
Create a new recipe file named install_mdatp.rb in the recipes folder `~/cookbooks/mdatp/recipes/install_mdatp.rb` and add this text to the file. You can also download the file directly from [Github](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/third_party_installation_playbooks/chef.install_mdatp_manual.rb)
131
+
Create a new recipe file named **install_mdatp.rb**in the recipes folder `~/cookbooks/mdatp/recipes/install_mdatp.rb` and add the following text to the file. You can also download the file directly from [Github](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/third_party_installation_playbooks/chef.install_mdatp_manual.rb).
136
132
137
133
```powershell
138
134
#Add Microsoft Defender
@@ -187,19 +183,18 @@ file "#{mdatp}/mdatp_onboard.json" do
187
183
end
188
184
```
189
185
190
-
>[!Note]
191
-
> You can modify the os distribution, distribution version number, channel (prod/insider-fast, insiders-slow) and repo name to match the version you're deploying to and the channel you'd like to deploy to..
192
-
Run `chef-client --local-mode --runlist 'recipe[mdatp]'` to test the cookbook on the Chef workstation.
186
+
>[!NOTE]
187
+
> You can modify the os distribution, distribution version number, channel (prod/insider-fast, insiders-slow) and repo name to match the version you're deploying to and the channel you'd like to deploy to. Run `chef-client --local-mode --runlist 'recipe[mdatp]'` to test the cookbook on the Chef workstation.
193
188
194
189
## Troubleshoot installation issues
195
190
196
-
For self-troubleshooting, do the following
191
+
To troubleshoot issues:
197
192
198
193
1. For information on how to find the log that's generated automatically when an installation error occurs, see [Log installation issues](linux-resources.md#log-installation-issues).
199
194
200
195
2. For information about common installation issues, see [Installation issues](/defender-endpoint/linux-support-install).
201
196
202
-
3. If health of the device is `false`, see [Defender for Endpoint agent health issues](/defender-endpoint/health-status).
197
+
3. If the health of the device is `false`, see [Defender for Endpoint agent health issues](/defender-endpoint/health-status).
203
198
204
199
4. For product performance issues, see [Troubleshoot performance issues](/defender-endpoint/linux-support-perf).
205
200
@@ -209,15 +204,14 @@ To get support from Microsoft, open a support ticket, and provide the log files
209
204
210
205
## How to configure policies for Microsoft Defender on Linux
211
206
212
-
You can configure antivirus or EDR settings on your endpoints using following methods:
207
+
You can configure antivirus or EDR settings on your endpoints using any of the following methods:
213
208
214
209
- See [Set preferences for Microsoft Defender for Endpoint on Linux](/defender-endpoint/linux-preferences).
215
210
- See [security settings management](/mem/intune/protect/mde-security-integration) to configure settings in the Microsoft Defender portal.
216
211
217
-
218
212
## Uninstall MDATP cookbook
219
213
220
-
To uninstall Defender, save the following as cookbook `~/cookbooks/mdatp/recipes/uninstall_mdatp.rb`.
214
+
To uninstall Defender, save the following as a cookbook `~/cookbooks/mdatp/recipes/uninstall_mdatp.rb`.
221
215
222
216
```powershell
223
217
#Uninstall the Defender package
@@ -240,6 +234,6 @@ then
240
234
end
241
235
```
242
236
243
-
To include this step as part of the recipe just add `include_recipe ':: uninstall_mdatp` to your `default.rb` file within the recipe folder. Also make sure to remove the `include_recipe '::install_mdatp'` from the `default.rb` file.
237
+
To include this step as part of the recipe, add `include_recipe ':: uninstall_mdatp` to your `default.rb` file within the recipe folder. Ensure that you have removed the `include_recipe '::install_mdatp'` from the `default.rb` file.
244
238
245
239
[!INCLUDE [Microsoft Defender for Endpoint Tech Community](../includes/defender-mde-techcommunity.md)]
0 commit comments