Share the solution for installing php5.3.10 + mysql5.5.20 + apache2.2.22 in the ubuntu64server clean environment
Source: Internet
Author: User
Share with us how to install php5.3.10 + mysql5.5.20 + apache2.2.22 in a clean environment using ubuntu64server. recently, php has encountered several major security risks. after being familiar with the yum and apt-getinstall installation modes, I gradually forgot about the previous configuration and compilation environment. yesterday, changjay told me that I could not share the idea of installing php5.3.10 + mysql5.5.20 + apache2.2.22 in the ubuntu 64 server clean environment (end)
Recently, php has encountered several major security risks. After familiarizing themselves with the yum and apt-get install lazy installation modes, php gradually forgets the previous configuration and compilation environment, yesterday, changjay asked me if I could provide some installation procedures. I read a few articles in this section. I spent one afternoon and one night finally taking the bare metal machine (only ubuntu 64 server 11.10) all the extension modules used in the latest php apache mysql version are installed.
Because it is a bare metal, you need to install a variety of missing components. In fact, if you are familiar with your system (the location of the previously installed module is clear), you only need to upgrade php, A smooth pass will not exceed half an hour (in fact, the maximum time is 10 minutes ). The rest of the time is spent downloading, looking for a compressed package, and re-configuring and compiling configuration errors. There is a file bug in the gcc-4.6.1 syntax errors under the strict check error, according to the error prompt, modify the c file compiled successfully.
Note: This article # symbol represents the operation prompt under the root permission, # followed by the command
Upgrade and install the new version. you only need to recompile the new version to install and upgrade the new version. before the upgrade, you must list the installed modules and the installation location, you can use echo phpinfo (); to view the extensions installed in the old version.
Download the latest php version
Http://www.php.net/downloads.php
This should not work if you copy it here, because unless the installation path is the same as that of all modules, you can modify it by referring to my configuration. one is the path location, the other is some unnecessary extensions.
Here we will explain the meaning of the configuration parameters.
-- Prefix = the installation location is set here.
-- With-followed by the module Module = is the path that has been compiled and installed by the module
# Make; make install
If the compilation succeeds, the installation is complete, because the configuration files already exist and do not need to be modified, unless the parameters need to be changed from the old version upgrade.
================================
The following is the process of installing the entire environment on bare metal. some may have forgotten it. I will recall it and complete the process.
1. install apache
Relatively simple, with no need for too many configurations
Download the latest stable version
# Wget http://mirror.bjtu.edu.cn/apache//httpd/httpd-2.2.22.tar.bz2
# Tar-zxf httpd-2.2.22.tar.bz2
# Cd httpd-2.2.22
#./Configure -- prefix =/usr/local/apache -- enable-modules = so -- enable-rewrite
# Make; make install
If wget is not installed, install the wget tool first.
# Apt-get install wget
In fact, I seldom use wget. of course, we recommend aria2.
# Apt-get install aria2
Usage
# Aria2c-t x http: // xxxxx
X is the number of threads that automatically support resumable data transfer. if something goes out and the computer is shut down, the next time you continue to use this command, it will automatically start from the last interrupted position.
If bare metal installation is like me, there may be a lack of environment error prompts. if you find something to install and the prompt gcc does not exist, then apt-get install gcc
I directly use apt-get for these compilation environments. it will take too much time to compile the environment by myself.
After installation, you do not need to start apache for the time being, because we still have a lot of work to do.
2. install php and various required libraries
If you upgrade php, you do not need to take this step. The general library is easy to solve, but it is also troublesome, such as the GD Library.
A. install the GD Library-enable php to support gif, png, and jpeg formats
The GD library requires support from the following modules:
Limit 8, libpng, freetype
First, jepg8 (the majority of online users use jepg6, which is the latest module)
# Aria2ch-t 3 ttp: // www.ijg.org/files/?src.v8d.tar.gz
# Tar-zxf restart src.v8d.tar.gz
# Cd jpeg-8d
#./Configure -- prefix =/usr/local/Route 8/-- enable-shared -- enable-static
# Make; make install
Followed by libpng
Http://sourceforge.net/projects/libpng/files/libpng16/1.6.0beta10/libpng-1.6.0beta10.tar.gz/download
Use a browser to open the address for download (most of the old version 1.2x is online, here is the latest module)
# Tar-zxf libpng-1.6.0beta10.tar.gz
# Cd libpng-1.6.0beta10
# Cp./scripts/makefile. std makefile
Note that no configuration is required here. copy the file directly.
# Make; make install
Freetype
# Wget http://cdnetworks-kr-1.dl.sourceforge.net/project/freetype/freetype2/2.4.8/freetype-2.4.8.tar.bz2
This is the latest version.
# Bzip2-d freetype-2.4.8.tar.bz2
# Tar-xvf freetype-2.4.8.tar
# Cd freetype-2.4.8
#./Configure -- prefix =/usr/local/freetype
# Make; make install
All three required modules have been compiled,
Install the GD Library
# Wget https://bitbucket.org/pierrejoye/gd-libgd/get/GD_2_0_34RC1.tar.gz
This is the latest version.
B. install the curl Library
This is the latest curl version.
# Wget http://curl.haxx.se/download/curl-7.24.0.tar.gz
# Tar-zxf curl-7.24.0.tar.gz
# Cdcurl-7.24.0
#./Configure -- prefix =/usr/local/curl
# Make; make install
3. install php
Before installing php, we have to solve libxml2 and libxslt.
A. libxml2
This is also the latest version.
# Wget http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.30.tar.gz
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.