Upgrading Software – Ubuntu Server Edition
Posted by Command-Line, Linux, Ubuntu | Posted on 17-07-2009
| Posted inWhen it comes to any server, you normally have to update its software remotely. Either by command shell or remote desktop. For this demonstration, I am going to access my server via SSH and use the Ubuntu/Debian package manager called “/usr/bin/apt-get” – APT package handling utility — command-line interface.
user@server:~$ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done The following packages have been kept back: linux-image-server linux-restricted-modules-server linux-server The following packages will be upgraded: acpid apache2 apache2-mpm-prefork apache2-utils apache2.2-common ..... etc..... 47 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. Need to get 57.4MB of archives. After this operation, 20.5kB of additional disk space will be used. Do you want to continue [Y/n]? Y Get:1 http://us.archive.ubuntu.com jaunty-updates/main perl-modules 5.10.0-19ubuntu1.1 [3182kB] ... ... ... ... etc until all the applications have downloaded ... Fetched 57.4MB in 48s (1173kB/s) Extracting templates from packages: 100% Preconfiguring packages ... (Reading database ... 24637 files and directories currently installed.) Preparing to replace perl-modules 5.10.0-19ubuntu1 (using .../perl-modules_5.10.0-19ubuntu1.1_all.deb) ... Unpacking replacement perl-modules ... ... ... ... Now everything application that needed updated, will unpack and install. .. .. If any application (daemons) that are running, are upgraded, apt-get automatically restarts those programs. .... Setting up apache2 (2.2.11-2ubuntu2.2) ... Setting up libapache2-mod-php5 (5.2.6.dfsg.1-3ubuntu4.1) ... * Reloading web server config apache2 ...done.
and it is just as simple as that.
Family Commands for apt-get are
/usr/bin/apt-cache - APT package handling utility -- cache manipulator /usr/bin/apt-cdrom - APT CDROM management utility /usr/bin/dpkg - package manager for Debian /usr/bin/dselect - Debian package management frontend /etc/apt/sources.list - https://help.ubuntu.com/community/SourcesList /etc/apt/apt.conf - Configuration file for APT /usr/bin/apt-config - APT Configuration Query program /usr/bin/apt-secure - Archive authentication support for APT /etc/apt/preferences - Preference control file for APT - apt_preferences APT User’s guide in /usr/share/doc/apt-doc/