ubuntu server 完整性安装 unminimize,由于提示没有该命令,在 CSDN 找到该脚本(安装ubuntu docker完整版_M2kar的博客-CSDN博客_docker ubuntu 完整版),自行运行。
rock@rockpi-4b:~$ ls -alh /usr/local/sbin/
total 16K
drwxr-xr-x 2 root root 4.0K Jul 1 08:28 .
drwxr-xr-x 10 root root 4.0K Jul 1 07:35 ..
-rwxr-xr-x 1 root root 1.7K Jun 30 2020 update_extlinux.sh
-rwxr-xr-x 1 root root 1.1K Mar 3 2020 update_uenv.sh
rock@rockpi-4b:~$ cd /usr/local/sbin/
rock@rockpi-4b:/usr/local/sbin$ ls
update_extlinux.sh update_uenv.sh
rock@rockpi-4b:/usr/local/sbin$ sudo touch unminimize.sh
rock@rockpi-4b:/usr/local/sbin$ ls
unminimize.sh update_extlinux.sh update_uenv.sh
rock@rockpi-4b:/usr/local/sbin$ ls -lh
total 8.0K
-rw-r--r-- 1 root root 0 Jul 6 02:39 unminimize.sh
-rwxr-xr-x 1 root root 1.7K Jun 30 2020 update_extlinux.sh
-rwxr-xr-x 1 root root 1.1K Mar 3 2020 update_uenv.sh
rock@rockpi-4b:/usr/local/sbin$ sudo chmod -R 755 unminimize.sh
rock@rockpi-4b:/usr/local/sbin$ ls -lh
total 8.0K
-rwxr-xr-x 1 root root 0 Jul 6 02:39 unminimize.sh
-rwxr-xr-x 1 root root 1.7K Jun 30 2020 update_extlinux.sh
-rwxr-xr-x 1 root root 1.1K Mar 3 2020 update_uenv.sh
rock@rockpi-4b:/usr/local/sbin$ sudo vim unminimize.sh
rock@rockpi-4b:/usr/local/sbin$ ls -lh
total 12K
-rwxr-xr-x 1 root root 3.4K Jul 6 02:42 unminimize.sh
-rwxr-xr-x 1 root root 1.7K Jun 30 2020 update_extlinux.sh
-rwxr-xr-x 1 root root 1.1K Mar 3 2020 update_uenv.sh
rock@rockpi-4b:/usr/local/sbin$ sudo ./unminimize.sh
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
This script restores content and packages that are found on a default
Ubuntu server system in order to make this system more suitable for
interactive use.
Reinstallation of packages may fail due to changes to the system
configuration, the presence of third-party packages, or for other
reasons.
This operation may take some time.
Would you like to continue? [y/N]y
...
unminimize shell 脚本
#!/bin/sh
set -e
echo "This system has been minimized by removing packages and content that are"
echo "not required on a system that users do not log into."
echo ""
echo "This script restores content and packages that are found on a default"
echo "Ubuntu server system in order to make this system more suitable for"
echo "interactive use."
echo ""
echo "Reinstallation of packages may fail due to changes to the system"
echo "configuration, the presence of third-party packages, or for other"
echo "reasons."
echo ""
echo "This operation may take some time."
echo ""
read -p "Would you like to continue? [y/N]" REPLY
echo # (optional) move to a new line
if [ "$REPLY" != "y" ] && [ "$REPLY" != "Y" ]
then
exit 1
fi
if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp ]; then
echo "Re-enabling installation of all documentation in dpkg..."
if [ -f /etc/dpkg/dpkg.cfg.d/excludes ]; then
mv /etc/dpkg/dpkg.cfg.d/excludes /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp
fi
echo "Updating package list and upgrading packages..."
apt-get update
# apt-get upgrade asks for confirmation before upgrading packages to let the user stop here
apt-get upgrade
echo "Restoring system documentation..."
echo "Reinstalling packages with files in /usr/share/man/ ..."
# Reinstallation takes place in two steps because a single dpkg --verified
# command generates very long parameter list for "xargs dpkg -S" and may go
# over ARG_MAX. Since many packages have man pages the second download
# handles a much smaller amount of packages.
dpkg -S /usr/share/man/ |sed 's|, |\n|g;s|: [^:]*$||' | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y
echo "Reinstalling packages with system documentation in /usr/share/doc/ .."
# This step processes the packages which still have missing documentation
dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \
| xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y
if dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {exit 1}'; then
echo "Documentation has been restored successfully."
rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp
else
echo "There are still files missing from /usr/share/doc/:"
dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print " " $2}'
echo "You may want to try running this script again or you can remove"
echo "/etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp and restore the files manually."
fi
fi
if ! dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-minimal 2> /dev/null | grep -q '^installed$'; then
echo "Installing ubuntu-minimal package to provide the familiar Ubuntu minimal system..."
DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal ubuntu-standard
fi
if dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-server 2> /dev/null | grep -q '^installed$' \
&& ! dpkg-query --show --showformat='${db:Status-Status}\n' landscape-common 2> /dev/null | grep -q '^installed$'; then
echo "Installing ubuntu-server recommends..."
DEBIAN_FRONTEND=noninteractive apt-get install -y landscape-common
fi
# unminimization succeeded, there is no need to mention it in motd
rm -f /etc/update-motd.d/60-unminimize
Docker 安装步骤建议参考官网 ubuntu 安装方式,ROCK Pi 官网的安装不成功。