I need to install the latest versions of apache, php and mysql that are available on their websites, but the problem is that apt repositories don't have these updates versions yet.

Versions that I want: Apache 2.4.4, PHP 5.4.16 and MySQL 5.6.12.

Versions available via apt: Apache 2.2.22, PHP 5.4.15, MySQL 5.5.31.

Ubuntu doesn't support the above versions of packages. Please, I want help! Thanks!

P.S. Tasksel also doesn't have these versions of packages yet.

  • Ya. But it installs older version from the apt repository not the updated version Im looking for present on their websites. Does ubuntu doesnt support the above latest versions? – Tarun Jun 15 '13 at 8:04
  • Hey Radu Thanks for the reply but I think Im not making myself clear. So the fact is apt cant work for me beacause the above versions of packages are not yet available via apt. So Im looking for a way to install the above latest versions in my ubuntu if thats possible. Thanks. – Tarun Jun 15 '13 at 8:22
  • Then you shoul edit your question and post the links to what exactly do you want to install. – Radu Rădeanu Jun 15 '13 at 8:26
  • Ya I have edited maybe now I can make myself clearer. – Tarun Jun 15 '13 at 8:36
  • One more thing can I do something like install their old versions from apt then upgrade to their latest versions by compiling the packages for above latest versions if it removes the dependency problem Im having while compiling the latest versions. Thanks. – Tarun Jun 15 '13 at 9:00

Before to install the new versions, you should uninstall any other versions that you have installed before.

Install Apache 2.4.4

  1. Before installing Apache 2.4.4, you should install PCRE, otherwise it will not succeed. The process of installing PCRE is simple. After you downloaded it, run in terminal next commands:

    sudo ./configure
    sudo make
    sudo make install
  2. Download APR and APR-Util from http://apr.apache.org, unpack them to Apache directory, /srclib/apr and /srclib/apr-util (no version numbers in the directory names) and type following commands to install Apache:

    sudo ./configure --with-included-apr
    sudo make
    sudo make install
  3. Type following command to start Apache:

    sudo /usr/local/apache2/bin/apachectl start

There may be something wrongs like:

/usr/local/apache2/bin/httpd: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory

Type following command to see httpd’s shared library dependencies:

ldd httpd

Found "libpcre.so.1 => not found", then type the following command to update links:

sudo ldconfig

Restart Apache and should work.

Source: http://zhuojun.info/?p=1121

Install PHP 5.4.16

  1. Download PHP 5.4.16 from http://php.net/downloads.php
  2. Check this post to see how to install a .tar.bz2 file: How to install a .tar.gz (or .tar.bz2) file?

Install MySQL 5.5.31

  1. Download MySQL 5.5.31 from http://dev.mysql.com/downloads/mysql/5.5.html. In fact, MySQL 5.5.32 is the latest version.
  2. Check this post see how to install a .rpm file: How do I install and manage RPMs?
| improve this answer | |
  • I found one more convenient way to install the latest softwares that through using ppa. Its very convenient as well. Maybe it will be helpful to anyone with the same question as mine. – Tarun Jun 25 '13 at 7:36
  • @Tarun It will be only if you will post as an answer. See askubuntu.com/help/self-answer. – Radu Rădeanu Jun 25 '13 at 7:49
  • JFTR Compiling from the sources is too complicated – see my answer below for Ubuntu PPA-way. – oerdnj Jul 30 '13 at 14:55
  • And how to update when updates are released? – pratnala Oct 13 '13 at 6:24
  • @pratnala You will have to install those new updates :) – Radu Rădeanu Oct 13 '13 at 6:49

If you don't want to install the Apache 2.4 & PHP 5.5 by hand, you can find both in my PHP5 PPA.

I will add more PHP extensions and Apache 2.4 modules as people will come and ask for them.

There's also a MySQL 5.5 and MySQL 5.6 PPAs (and more).

| improve this answer | |
  • @ordenj What about 'libapache2-mod-auth-mysql' for apache 2.4 and php 5.5 ? Sorry I wasn't able to post this under your answer. – Villi Magg Jun 27 '13 at 20:09
  • @VilliMagg As I said – I will add apache2 and php5 modules as people come and ask for them. Unfortunatelly the mod-auth-mysql is still blocked by bugs.debian.org/cgi-bin/bugreport.cgi?bug=666826 – oerdnj Jun 28 '13 at 10:50

In general you are not likely to find the latest versions on any pre-built stack, since there will always be a time lag between a new version release and package releases in official repositories due to the need to "iron out" system specific dependencies and quirks.

You have three options :

  1. Download Ubuntu specific binaries of the latest version (if they exist) from the corresponding sites.
  2. Download the source code from said sites and compile locally.
  3. Wait for the version you are interested in to be included in the official repositories.

Now, unless there is a very specific option/need that is not offered/met in the available packages or you cannot wait for the vesrion to be included to the repositories, I suggest you go with the pre-build binaries.

Then again, compiling from source code is a great character building experience that will help you appreciate the hard work package maintainers do :-) You will have to resolve any package dependencies manually.

That being said, large and active projects like Apache, PHP and MySQL offer quite exhaustive documentation and how-to's for installing from source.

| improve this answer | |
  • Hey hmayag thanks for the reply I have downloaded the source code for the above packages but when I try to compile using ./configure && make && make install it gives error I believe it is a dependency problem. Is it? – Tarun Jun 15 '13 at 8:55
  • 1
    Probably. This is one of the reasons most people opt for the pre-packaged versions. You need to resolve all dependencies manually. But you will end up with a version specifically tailored to your needs. It can be worth the trouble in some cases. – hmayag Jun 15 '13 at 9:19
  • 1
    @Tarun Also note that you have to build the packages again in the event of (security) updates and probably add non-mailine patches. Maintaining your own builds is a time consuming task. – LiveWireBT Jun 15 '13 at 9:30
  • @LiveWiredBT Valid point. Also one has to take into consideration the fact that when deploying the application the hosting company may not be able to offer the exact options required. – hmayag Jun 15 '13 at 9:43
  • @ LiveWireBT, hmayag : Ya I too believe it is a time consuming task. Thanks for the help :) – Tarun Jun 18 '13 at 8:20

Another convenient way to install the latest versions of Apache, Php and Mysql I found very convenient is to use PPA i.e. Personal Package Archieve. Just search for ppa's for the software package you want and just add that ppa to the repositories and install the software using the following commands. Remember PPA's are built by users who want to help other users or developers by providing them with the latest softwares.

PPA I used for Apache2.4.4: ppa:patrickdk/apache24
PPA I used for Php5.5.0: ppa:ondrej/php5-experimental
PPA I used for Mysql 5.5.32: ppa:ondrej/mysql

Also there are other ppa's available.

   shell>add-apt-repository ppa:ppa-name
   shell>apt-get update
   shell>apt-get install software-name

Maybe it will be convenient for any user with the same question as mine.

| improve this answer | |
  • 1
    Because you're not mentioning what PPA to use I don't think this is an answer to your question. – gertvdijk Jun 25 '13 at 9:56
  • there are ppa's available that can be searched I dont think that requires to be explained. Still I will edit my answer. – Tarun Jun 25 '13 at 10:00
  • 1
    My PHP 5.5 repository includes Apache 2.4, so the patrickdk's PPA is extra. – oerdnj Jun 28 '13 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.