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: articles/virtual-machines/vm-applications.md
+72-72Lines changed: 72 additions & 72 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,78 +158,6 @@ You can download individual packages for platform specific package managers, but
158
158
159
159
Figuring out the dependencies can be a bit tricky. There are third party tools that can show you the entire dependency tree.
160
160
161
-
# [Red Hat](#tab/rhel)
162
-
163
-
In Red Hat, you can run `sudo yum deplist <package_name>` to show all the packages that will be installed when executing the `sudo yum install <package_name>` command. Then you can use that output to download all .rpm files to create an archive that can be used as the application package.
164
-
165
-
1. Example, to create a VM application package to install PowerShell for Red Hat, first run the following commands to enable the repository where PowerShell can be downloaded from and also to identify the package dependencies on a new RHEL VM.
166
-
167
-
- RHEL 7:
168
-
169
-
```bash
170
-
# Register the Microsoft RedHat repository
171
-
curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
172
-
173
-
sudo yum deplist powershell
174
-
```
175
-
176
-
- RHEL 8:
177
-
178
-
```bash
179
-
# Register the Microsoft RedHat repository
180
-
curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
181
-
182
-
sudo dnf deplist powershell
183
-
```
184
-
185
-
2. Check the output of each of the dependency lines which lists the dependency packages as `provider`:
186
-
187
-
```output
188
-
dependency: /bin/sh
189
-
provider: bash.x86_64 4.2.46-35.el7_9
190
-
dependency: libicu
191
-
provider: libicu.x86_64 50.2-4.el7_7
192
-
provider: libicu.i686 50.2-4.el7_7
193
-
dependency: openssl-libs
194
-
provider: openssl-libs.x86_64 1:1.0.2k-26.el7_9
195
-
provider: openssl-libs.i686 1:1.0.2k-26.el7_9
196
-
```
197
-
198
-
3. Download each of these files using `sudo yum install --downloadonly <package_name>`, to download a package when is not yet installed in the system, or `sudo yum reinstall --downloadonly <package_name>`, to download a package that's already installed in the system, and create a tar compressed archive with all files.
4. This tar archive will be the application package file.
212
-
213
-
- The install command in this case is:
214
-
215
-
```bash
216
-
sudo tar -xvzf powershell.tar.gz && sudo yum install *.rpm -y
217
-
```
218
-
219
-
- And the remove command is:
220
-
221
-
```bash
222
-
sudo yum remove powershell
223
-
```
224
-
225
-
In case you don't want to resolve the dependencies yourself and yum/dnf is able to connect to the repositories, you can install an application with just one .rpm file and let yum/dnf handle the dependencies.
226
-
227
-
Example install command:
228
-
229
-
```bash
230
-
yum install <package.rpm> -y
231
-
```
232
-
233
161
# [Ubuntu](#tab/ubuntu)
234
162
235
163
In Ubuntu, you can run `sudo apt show <package_name> | grep Depends` to show all the packages that will be installed when executing the `sudo apt-get install <packge_name>` command. Then you can use that output to download all .deb files to create an archive that can be used as the application package.
In Red Hat, you can run `sudo yum deplist <package_name>` to show all the packages that will be installed when executing the `sudo yum install <package_name>` command. Then you can use that output to download all .rpm files to create an archive that can be used as the application package.
260
+
261
+
1. Example, to create a VM application package to install PowerShell for Red Hat, first run the following commands to enable the repository where PowerShell can be downloaded from and also to identify the package dependencies on a new RHEL VM.
262
+
263
+
- RHEL 7:
264
+
265
+
```bash
266
+
# Register the Microsoft RedHat repository
267
+
curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
268
+
269
+
sudo yum deplist powershell
270
+
```
271
+
272
+
- RHEL 8:
273
+
274
+
```bash
275
+
# Register the Microsoft RedHat repository
276
+
curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
277
+
278
+
sudo dnf deplist powershell
279
+
```
280
+
281
+
2. Check the output of each of the dependency lines which lists the dependency packages as `provider`:
282
+
283
+
```output
284
+
dependency: /bin/sh
285
+
provider: bash.x86_64 4.2.46-35.el7_9
286
+
dependency: libicu
287
+
provider: libicu.x86_64 50.2-4.el7_7
288
+
provider: libicu.i686 50.2-4.el7_7
289
+
dependency: openssl-libs
290
+
provider: openssl-libs.x86_64 1:1.0.2k-26.el7_9
291
+
provider: openssl-libs.i686 1:1.0.2k-26.el7_9
292
+
```
293
+
294
+
3. Download each of these files using `sudo yum install --downloadonly <package_name>`, to download a package when is not yet installed in the system, or `sudo yum reinstall --downloadonly <package_name>`, to download a package that's already installed in the system, and create a tar compressed archive with all files.
4. This tar archive will be the application package file.
308
+
309
+
- The install command in this case is:
310
+
311
+
```bash
312
+
sudo tar -xvzf powershell.tar.gz && sudo yum install *.rpm -y
313
+
```
314
+
315
+
- And the remove command is:
316
+
317
+
```bash
318
+
sudo yum remove powershell
319
+
```
320
+
321
+
In case you don't want to resolve the dependencies yourself and yum/dnf is able to connect to the repositories, you can install an application with just one .rpm file and let yum/dnf handle the dependencies.
322
+
323
+
Example install command:
324
+
325
+
```bash
326
+
yum install <package.rpm> -y
327
+
```
328
+
329
329
# [SUSE](#tab/sles)
330
330
331
331
In SUSE, you can run `sudo zypper info --requires <package_name>` to show all the packages that will be installed when executing the `sudo zypper install <package_name>` command. Then you can use that output to download all .rpm files to create an archive that can be used as the application package.
0 commit comments