0% found this document useful (0 votes)
51 views5 pages

Assignment - 01 - Install and Uninstall Software

The document outlines training assignments for system administration, focusing on installing and uninstalling software on Ubuntu. It includes a detailed list of commands for package management using apt and dpkg, along with practical exercises for updating packages and installing software from source code. The effective date of the training program is August 4, 2023.

Uploaded by

tranthaitech06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views5 pages

Assignment - 01 - Install and Uninstall Software

The document outlines training assignments for system administration, focusing on installing and uninstalling software on Ubuntu. It includes a detailed list of commands for package management using apt and dpkg, along with practical exercises for updating packages and installing software from source code. The effective date of the training program is August 4, 2023.

Uploaded by

tranthaitech06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

VTI ACADEMY

HỘ CHIẾU LẬP TRÌNH VIÊN DOANH NGHIỆP

System Admin

Training Assignments

Program Code

Issue/Revision x/y

Effective date 04/Aug /2023

VTI ACADEMY
WAY TO ENTERPRISE – CON ĐƯỜNG ĐẾN DOANH NGHIỆP
Training Assignments

Assignment Day 03. Install and Uninstall Software


Mục Lục:
1. Install and Uninstall Software (Ubuntu)
1.1. Tổng hợp các lệnh

command explanation

/etc/apt/[Link] File that contains URL’s to repositories.


/etc/apt/sources.d/ Directory that contains extra repository files.
Update the local information with the remote
apt-get update
repositories.
Search the repositories for packages with foo in their
apt-cache search foo
name.
apt-get install foo Download and install package foo.
apt-get remove foo Remove (=Uninstall) the package foo.
apt-get purge foo Remove the package foo and all its configuration.
Upgrade all installed packages to the latest version in the
apt-get upgrade
repo.
Update the local information with the remote
aptitude update
repositories.
aptitude upgrade Upgrade all packages to the latest version.
aptitude search foo Search for all packages with foo in their name.
aptitude install foo Download and install the package foo.
aptitude remove foo Remove the package foo.
aptitude purge foo Remove the package foo and all its configuration.
Update the local information with the remote
apt update
repositories.
apt upgrade Upgrade all packages to the latest version.
apt search foo Search for all packages with foo in their name.
apt install foo Download and install the package foo.
apt remove foo Remove the package foo.
apt purge foo Remove the package foo and all its configuration.
dpkg -l foo Display information about package foo.

2
Training Assignments

dpkg -l List all installed and/or configured packages.


dpkg -s foo Display detailed information about package foo.
dpkg -S bar Query to which package the file bar belongs.
dpkg -L foo List all files installed by the package foo.
dpkg -i [Link] Install the [Link] package.
dpkg -r foo Uninstall the [Link] package.

2. Thực hành cài đặt và gỡ cài đặt từ Package Manager


Exercise:

1. Update the meta-information about all packages in the repository to your


server.
2. Download and upgrade all packages on your server to the newest
version.
3. Search for all packages containing the string zfs.
4. Take a backup of /etc/apt/[Link].
5. Add the contrib packages to /etc/apt/[Link] .
6. Update all repository information, then search for zfs again.
7. Verify with dpkg whether any of the zfs packages are installed.
8. Verify which package installed /bin/mkdir .

Solution:
1. Update the meta-information about all packages in the repository to your
server.
apt update
apt-get update
aptitude update
2. Download and upgrade all packages on your server to the newest
version.
apt-get upgrade
3. Search for all packages containing the string zfs.
aptitude search zfs
4. Take a backup of /etc/apt/[Link].
cp /etc/apt/[Link] /etc/apt/[Link].20190914
5. Add the contrib packages to /etc/apt/[Link] .

3
Training Assignments

root@debian10:~# vi /etc/apt/[Link]
root@debian10:~# grep contrib /etc/apt/[Link]
deb [Link] buster main contrib
deb-src [Link] buster main contrib
root@debian10:~#
6. Update all repository information, then search for zfs again.
aptitude update
aptitude search zfs # You should see more zfs packages.

7. Verify with dpkg whether any of the zfs packages are installed.
dpkg -l | grep -i zfs
8. Verify which package installed /bin/mkdir .
dpkg -S /bin/mkdir

3. Thực hành cài đặt và gỡ cài đặt từ Source Code

Exercise:
Install netcat utility from source code

Download source:
[Link]

Solution:
Download [Link] to /tmp directory
cd /tmp
wget [Link]
[Link]
Extract netcat source code
tar –xvzf [Link]
View installation instruction and install netcat
cd ./netcat-0.7.2
less README
less INSTALL
./configure
make
make install

4
Training Assignments

Test netcat after installed


which netcat
netcat -h

You might also like