#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171

    A few quesitons about package updates on Linux based servers


    Hi;

    A few questions. I put under the same thread hopefully will get answer for all of them

    I have Ubuntu installed with Apache2 php version 5.4 running.

    Question 1:

    What is the difference between dpkg and apt-get?


    apg-get
    NAME
    apt-get - APT package handling utility -- command-line interface
    DESCRIPTION
    apt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library.
    Why don't I see Apache2 or PHP in this list? Isn't Apache2 a package?
    Code:
    root@behnam:~# apt-get update
    Hit http://mirror.rackspace.com quantal Release.gpg
    Hit http://mirror.rackspace.com quantal-updates Release.gpg
    Hit http://mirror.rackspace.com quantal-backports Release.gpg
    Hit http://mirror.rackspace.com quantal-security Release.gpg
    Hit http://mirror.rackspace.com quantal Release
    Hit http://mirror.rackspace.com quantal-updates Release
    Hit http://mirror.rackspace.com quantal-backports Release
    Hit http://mirror.rackspace.com quantal-security Release                     
    Hit http://mirror.rackspace.com quantal/main Sources                         
    Hit http://mirror.rackspace.com quantal/restricted Sources                   
    Hit http://mirror.rackspace.com quantal/universe Sources                     
    Hit http://mirror.rackspace.com quantal/multiverse Sources                   
    Hit http://mirror.rackspace.com quantal/main amd64 Packages                  
    Hit http://mirror.rackspace.com quantal/restricted amd64 Packages
    Hit http://mirror.rackspace.com quantal/universe amd64 Packages              
    Hit http://mirror.rackspace.com quantal/multiverse amd64 Packages            
    Hit http://mirror.rackspace.com quantal/main i386 Packages
    Hit http://mirror.rackspace.com quantal/restricted i386 Packages
    Hit http://mirror.rackspace.com quantal/universe i386 Packages
    Hit http://mirror.rackspace.com quantal/multiverse i386 Packages
    Hit http://mirror.rackspace.com quantal/main Translation-en
    Hit http://mirror.rackspace.com quantal/multiverse Translation-en
    Hit http://mirror.rackspace.com quantal/restricted Translation-en
    Hit http://mirror.rackspace.com quantal/universe Translation-en
    Hit http://mirror.rackspace.com quantal-updates/main Sources
    Hit http://mirror.rackspace.com quantal-updates/restricted Sources
    Hit http://mirror.rackspace.com quantal-updates/universe Sources
    Hit http://mirror.rackspace.com quantal-updates/multiverse Sources
    Hit http://mirror.rackspace.com quantal-updates/main amd64 Packages
    Hit http://mirror.rackspace.com quantal-updates/restricted amd64 Packages
    Hit http://mirror.rackspace.com quantal-updates/universe amd64 Packages
    Hit http://mirror.rackspace.com quantal-updates/multiverse amd64 Packages
    Hit http://mirror.rackspace.com quantal-updates/main i386 Packages
    Hit http://mirror.rackspace.com quantal-updates/restricted i386 Packages
    Hit http://mirror.rackspace.com quantal-updates/universe i386 Packages
    Hit http://mirror.rackspace.com quantal-updates/multiverse i386 Packages
    Hit http://mirror.rackspace.com quantal-updates/main Translation-en
    Hit http://mirror.rackspace.com quantal-updates/multiverse Translation-en
    Hit http://mirror.rackspace.com quantal-updates/restricted Translation-en
    Hit http://mirror.rackspace.com quantal-updates/universe Translation-en
    Hit http://mirror.rackspace.com quantal-backports/main Sources
    Hit http://mirror.rackspace.com quantal-backports/restricted Sources
    Hit http://mirror.rackspace.com quantal-backports/universe Sources
    Hit http://mirror.rackspace.com quantal-backports/multiverse Sources
    Hit http://mirror.rackspace.com quantal-backports/main amd64 Packages
    Hit http://mirror.rackspace.com quantal-backports/restricted amd64 Packages
    Hit http://mirror.rackspace.com quantal-backports/universe amd64 Packages
    Hit http://mirror.rackspace.com quantal-backports/multiverse amd64 Packages
    Hit http://mirror.rackspace.com quantal-backports/main i386 Packages
    Hit http://mirror.rackspace.com quantal-backports/restricted i386 Packages
    Hit http://mirror.rackspace.com quantal-backports/universe i386 Packages
    Hit http://mirror.rackspace.com quantal-backports/multiverse i386 Packages
    Hit http://mirror.rackspace.com quantal-backports/main Translation-en
    Hit http://mirror.rackspace.com quantal-backports/multiverse Translation-en
    Hit http://mirror.rackspace.com quantal-backports/restricted Translation-en
    Hit http://mirror.rackspace.com quantal-backports/universe Translation-en
    Hit http://mirror.rackspace.com quantal-security/main Sources
    Hit http://mirror.rackspace.com quantal-security/restricted Sources
    Hit http://mirror.rackspace.com quantal-security/universe Sources
    Hit http://mirror.rackspace.com quantal-security/multiverse Sources
    Hit http://mirror.rackspace.com quantal-security/main amd64 Packages
    Hit http://mirror.rackspace.com quantal-security/restricted amd64 Packages
    Hit http://mirror.rackspace.com quantal-security/universe amd64 Packages
    Hit http://mirror.rackspace.com quantal-security/multiverse amd64 Packages
    Hit http://mirror.rackspace.com quantal-security/main i386 Packages
    Hit http://mirror.rackspace.com quantal-security/restricted i386 Packages
    Hit http://mirror.rackspace.com quantal-security/universe i386 Packages
    Hit http://mirror.rackspace.com quantal-security/multiverse i386 Packages
    Hit http://mirror.rackspace.com quantal-security/main Translation-en
    Hit http://mirror.rackspace.com quantal-security/multiverse Translation-en
    Hit http://mirror.rackspace.com quantal-security/restricted Translation-en
    Hit http://mirror.rackspace.com quantal-security/universe Translation-en
    Ign http://mirror.rackspace.com quantal/main Translation-en_US
    Ign http://mirror.rackspace.com quantal/multiverse Translation-en_US
    Ign http://mirror.rackspace.com quantal/restricted Translation-en_US
    Ign http://mirror.rackspace.com quantal/universe Translation-en_US
    Ign http://mirror.rackspace.com quantal-updates/main Translation-en_US
    Ign http://mirror.rackspace.com quantal-updates/multiverse Translation-en_US
    Ign http://mirror.rackspace.com quantal-updates/restricted Translation-en_US
    Ign http://mirror.rackspace.com quantal-updates/universe Translation-en_US
    Ign http://mirror.rackspace.com quantal-backports/main Translation-en_US
    Ign http://mirror.rackspace.com quantal-backports/multiverse Translation-en_US
    Ign http://mirror.rackspace.com quantal-backports/restricted Translation-en_US
    Ign http://mirror.rackspace.com quantal-backports/universe Translation-en_US
    Ign http://mirror.rackspace.com quantal-security/main Translation-en_US
    Ign http://mirror.rackspace.com quantal-security/multiverse Translation-en_US
    Ign http://mirror.rackspace.com quantal-security/restricted Translation-en_US
    Ign http://mirror.rackspace.com quantal-security/universe Translation-en_US
    Reading package lists... Done
    Code:
    root@behnam:~# apt-get install apache2
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    apache2 is already the newest version.
    0 upgraded, 0 newly installed, 0 to re
    Code:
    root@behnam:~# php -v
    PHP 5.4.6-1ubuntu1.3 (cli) (built: Jul 15 2013 18:19:45) 
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

    dpkg

    NAME
    dpkg - package manager for Debian
    DESCRIPTION
    dpkg is a tool to install, build, remove and manage Debian packages.
    Question 2: Why do I see a completely different list from dpkg?
    root@behnam:~# dpkg -l
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name Version Architecture Description
    +++-=================================-=====================-=====================-=======================================================================
    ii accountsservice 0.6.21-6ubuntu5.1 amd64 query and manipulate user account information
    ii acl 2.2.51-8ubuntu2 amd64 Access control list utilities
    ii acpid 1:2.0.16-1ubuntu1 amd64 Advanced Configuration and Power Interface event daemon
    ii adduser 3.113+nmu1ubuntu1 all add and remove users and groups
    ii apache2 2.2.22-6ubuntu2.3 amd64 Apache HTTP Server metapackage
    ii apache2-mpm-prefork 2.2.22-6ubuntu2.3 amd64 Apache HTTP Server - traditional non-threaded model
    ii apache2-utils 2.2.22-6ubuntu2.3 amd64 utility programs for webservers
    ii apache2.2-bin 2.2.22-6ubuntu2.3 amd64 Apache HTTP Server common binary files
    pi apache2.2-common 2.2.22-6ubuntu2.3 amd64 Apache HTTP Server common files
    ii apparmor 2.8.0-0ubuntu5.1 amd64 User-space parser utility for AppArmor
    ii apport 2.6.1-0ubuntu12 all automatically generate crash reports for debugging
    ii apport-symptoms 0.19 all symptom scripts for apport
    ii apt 0.9.7.5ubuntu5.4 amd64 commandline package manager
    ii apt-transport-https 0.9.7.5ubuntu5.4 amd64 https download transport for APT
    ii apt-utils 0.9.7.5ubuntu5.4 amd64 package managment related utility programs
    ii apt-xapian-index 0.44ubuntu7 all maintenance and search tools for a Xapian index of Debian packages
    ii aptitude 0.6.8.1-2ubuntu1 amd64 terminal-based package manager
    ii aptitude-common 0.6.8.1-2ubuntu1 all architecture indepedent files for the aptitude package manager
    .
    .
    .
    .
    .

    ii python-pam 0.4.2-13ubuntu2 amd64 Python interface to the PAM library
    ii python-pkg-resources 0.6.28-1ubuntu2 all Package Discovery and Resource Access using pkg_resources
    ii python-serial 2.5-3 all pyserial - module encapsulating access for the serial port
    ii python-six 1.1.0-2 all Python 2 and 3 compatibility library (Python 2 interface)
    ii python-twisted-bin 12.2.0-1 amd64 Event-based framework for internet applications
    ii python-twisted-core 12.2.0-1 all Event-based framework for internet applications
    ii python-xapian 1.2.12-2 amd64 Xapian search engine interface for Python
    ii python-zope.interface 3.6.1-3 amd64 Interfaces for Python
    ii python2.7 2.7.3-5ubuntu4.1 amd64 Interactive high-level object-oriented language (version 2.7)
    ii python2.7-minimal 2.7.3-5ubuntu4.1 amd64 Minimal subset of the Python language (version 2.7)
    ii python3 3.2.3-5ubuntu1.2 amd64 interactive high-level object-oriented language (default python3 versio
    ii python3-apport 2.6.1-0ubuntu12 all Python 3 library for Apport crash report handling
    ii python3-apt 0.8.7ubuntu4.1 amd64 Python 3 interface to libapt-pkg
    ii python3-dbus 1.1.1-1ubuntu0.1 amd64 simple interprocess messaging system (Python 3 interface)
    ii python3-distupgrade 1:0.190.7 all manage release upgrades
    ii python3-gdbm 3.3.0-1 amd64 GNU dbm database support for Python 3.x
    ii python3-gi 3.4.0-1ubuntu0.1 amd64 Python 3 bindings for gobject-introspection libraries
    ii python3-minimal 3.2.3-5ubuntu1.2 amd64 minimal subset of the Python language (default python3 version)
    ii python3-problem-report 2.6.1-0ubuntu12 all Python 3 library to handle problem reports
    ii python3-update-manager 1:0.174.4 all python 3.x module for update-manager
    ii python3.2 3.2.3-6ubuntu3.2 amd64 Interactive high-level object-oriented language (version 3.2)
    ii python3.2-minimal 3.2.3-6ubuntu3.2 amd64 Minimal subset of the Python language (version 3.2)
    ii readline-common 6.2-9 all GNU readline and history libraries, common files
    ii resolvconf 1.67ubuntu2 all name server information handler
    ii rsync 3.0.9-3ubuntu1 amd64 fast, versatile, remote (and local) file-copying tool
    ii rsyslog 5.8.6-1ubuntu9.2 amd64 reliable system and kernel logging daemon
    ii screen 4.0.3-14ubuntu9 amd64 terminal multiplexor with VT100/ANSI terminal emulation
    ii sed 4.2.1-10ubuntu1 amd64 The GNU sed stream editor
    ii sendemail 1.56-2 all lightweight, command line SMTP email client
    ii sensible-utils 0.0.7ubuntu1 all Utilities for sensible alternative selection
    ii sgml-base 1.26+nmu3ubuntu1 all SGML infrastructure and SGML catalog file support
    ii shared-mime-info 1.0-1ubuntu2 amd64 FreeDesktop.org shared MIME database and spec
    ii ssh-import-id 2.12-0ubuntu1 all securely retrieve an SSH public key and install it locally
    ii ssl-cert 1.0.32 all simple debconf wrapper for OpenSSL
    ii ssmtp 2.64-7 amd64 extremely simple MTA to get mail off the system to a mail hub
    ii strace 4.5.20-2.3ubuntu2 amd64 A system call tracer
    ii sudo 1.8.5p2-1ubuntu1.1 amd64 Provide limited super user privileges to specific users
    ii sysv-rc 2.88dsf-13.10ubuntu13 all System-V-like runlevel change mechanism
    ii sysvinit-utils 2.88dsf-13.10ubuntu13 amd64 System-V-like utilities
    ii tar 1.26-4ubuntu1 amd64 GNU version of the tar archiving utility
    ii tasksel 2.88ubuntu12 all Tool for selecting tasks for installation on Debian systems
    ii tasksel-data 2.88ubuntu12 all Official tasks used for installation of Debian systems
    ii tcpd 7.6.q-23 amd64 Wietse Venema's TCP wrapper utilities
    ii tcpdump 4.3.0-1ubuntu1 amd64 command-line network traffic analyzer
    ii telnet 0.17-36build2 amd64 The telnet client
    ii time 1.7-24 amd64 GNU time program for measuring CPU resource usage
    ii tmux 1.6-2 amd64 terminal multiplexer
    ii ttf-dejavu-core 2.33-2ubuntu1 all Vera font family derivate with additional characters
    ii tzdata 2012e-0ubuntu2 all time zone and daylight-saving time data
    ii ubuntu-keyring 2012.05.19 all GnuPG keys of the Ubuntu archive
    ii ubuntu-minimal 1.287 amd64 Minimal core of Ubuntu
    ii ubuntu-release-upgrader-core 1:0.190.7 all manage release upgrades
    ii ubuntu-standard 1.287 amd64 The Ubuntu standard system
    ii ucf 3.0025+nmu3 all Update Configuration File: preserve user changes to config files.
    ii udev 175-0ubuntu13 amd64 rule-based device node and kernel event manager
    ii ufw 0.33-0ubuntu2.1 all program for managing a Netfilter firewall
    ii update-manager-core 1:0.174.4 all manage release upgrades
    ii update-notifier-common 0.126 all Files shared between update-notifier and other packages
    ii upstart 1.5-0ubuntu9 amd64 event-based init daemon
    ii ureadahead 0.100.0-12build1 amd64 Read required files in advance
    ii usbutils 1:005-3 amd64 Linux USB utilities
    ii util-linux 2.20.1-5.1ubuntu2 amd64 Miscellaneous system utilities
    ii uuid-runtime 2.20.1-5.1ubuntu2 amd64 runtime components for the Universally Unique ID library
    ii vim 2:7.3.547-4ubuntu1.1 amd64 Vi IMproved - enhanced vi editor
    ii vim-common 2:7.3.547-4ubuntu1.1 amd64 Vi IMproved - Common files
    ii vim-runtime 2:7.3.547-4ubuntu1.1 all Vi IMproved - Runtime files
    ii vim-tiny 2:7.3.547-4ubuntu1.1 amd64 Vi IMproved - enhanced vi editor - compact version
    ii vsftpd 2.3.5-3ubuntu1 amd64 lightweight, efficient FTP server written for security
    ii w3m 0.5.3-8 amd64 WWW browsable pager with excellent tables/frames support
    ii wamerican 7.1-1 all American English dictionary words for /usr/share/dict
    ii wbritish 7.1-1 all British English dictionary words for /usr/share/dict
    ii wget 1.13.4-3ubuntu1 amd64 retrieves files from the web
    ii whiptail 0.52.11-2ubuntu11 amd64 Displays user-friendly dialog boxes from shell scripts
    ii whoopsie 0.2.7.1 amd64 Ubuntu error tracker submission
    ii wireless-tools 30~pre9-8ubuntu1 amd64 Tools for manipulating Linux Wireless Extensions
    ii wpasupplicant 1.0-2ubuntu5 amd64 client support for WPA and WPA2 (IEEE 802.11i)
    ii x11-common 1:7.7+1ubuntu4 all X Window System (X.Org) infrastructure
    ii xauth 1:1.0.7-1 amd64 X authentication utility
    ii xe-guest-utilities 6.0.2-756 amd64 Virtual Machine Monitoring Scripts
    ii xkb-data 2.5-1ubuntu7 all X Keyboard Extension (XKB) configuration data
    ii xml-core 0.13+nmu1 all XML infrastructure and XML catalog file support
    ii xz-utils 5.1.1alpha+20120614-1 amd64 XZ-format compression utilities
    ii zend-framework 1.11.11-0ubuntu1 all a simple, straightforward, open-source software framework for PHP 5
    ii zend-framework-bin 1.11.11-0ubuntu1 all a simple, straightforward, open-source software framework for PHP 5
    ii zlib1g:amd64 1:1.2.7.dfsg-13 amd64 compression library - runtime
    Question 3:

    What are the packages? Is PHP a package? Or Apache2 is a package and PHP is a component of Apache2 package?

    Question 4:

    What is the proper way of updating php and mysql on Ubuntu?

    Question 5:

    What is the proper way of updating php and mysql on Mac from Terminal?

    Thank you
  2. #2
  3. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,953
    Rep Power
    4033
    Originally Posted by English Breakfast Tea
    Question 1:
    dpkg is for managing individual package files. Installing them, removing them, configuring them, etc. apt is a system for managing all the package files and their versions.

    To put it roughly, apt is like the cookbook where all the packages (ingredients/recipes) are listed. You use it to locate the packages you want and which version you want. It'll also tell you what other packages you need to in order to use (cook) the package you want.

    Once you've got all the packages you need, then dpkg handles the process of installing them into the system and setting them up.

    Originally Posted by English Breakfast Tea
    Why don't I see Apache2 or PHP in this list? Isn't Apache2 a package?
    apt-get update updates the cookbooks. It downloads the lists of available packages and their versions. To update the individual packages to their latest version you use apt-get upgrade (or dist-upgrade)

    Originally Posted by English Breakfast Tea
    What are the packages? Is PHP a package? Or Apache2 is a package and PHP is a component of Apache2 package?
    A package is just something that represents a particular piece of software, possibly in a specific configuration. For example there is not just one PHP package, there are several. There is one that installs PHP as an apache module (libapache2-mod-php5) / filter (libapache2-mod-php5filter). There is one that installs PHP as a CGI binary for use with apache or another server (php5-cgi). There is one that installs PHP in a FPM configuration (php5-fpm). There is one that installs PHP for use on the command line (php5-cli).

    You can get a list of packages using apt-cache search . but it's a big list. If you're interested a particular piece of software, replace the . with the software name (or common variations) to filter the list. eg: apt-cache search php. Google can also help you find the proper package names.

    Originally Posted by English Breakfast Tea
    Question 4:
    What is the proper way of updating php and mysql on Ubuntu?
    apt-get upgrade or apt-get dist-upgrade as mentioned above.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171
    Thanks Kicken;

    Could you also help with question 5 please?

    I think I have to find the path to "php" related files, download then to that folder and restart the server. Or something like that.
    Last edited by English Breakfast Tea; November 11th, 2013 at 07:51 PM.
  6. #4
  7. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,953
    Rep Power
    4033
    I've never had or used a MAC so I can't tell you any more than google can about that.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    275
    I thought you were using XAMPP, which would most likely have more recent versions of PHP / MySQL installled with it in MAC?

    If you want newer versions, install newer version of XAMPP.

    (But, make sure you make backup copies of all of XAMPP's .conf files before doing so, just in case)
  10. #6
  11. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171
    Originally Posted by DonR
    I thought you were using XAMPP, which would most likely have more recent versions of PHP / MySQL installled with it in MAC?

    If you want newer versions, install newer version of XAMPP.

    (But, make sure you make backup copies of all of XAMPP's .conf files before doing so, just in case)
    Hi

    Yes I am using XAMPP On Mac.

    It's php 5.3.1

    I believe I have to download new verison of XAMPP and update the content of php directory (I assume modules/libphp5.so but I am not sure, need to search more).
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    275
    you cannot update pieces of XAMPP...you have to update complete XAMPP package.

    Installing newer XAMPP versions over the top of old versions will overwrite older version by default....thats why I told you to backup all of your .conf files for XAMPP before doing the upgrade.

    Also, if you are running osx 10.5.x, then, XAMPP 1.7.3 is newest you can use..as teh installer for XAMPP 1.8.x is only made for 10.6.x + [I found that info in their forum, in the Mac section]

IMN logo majestic logo threadwatch logo seochat tools logo