Install the latest apache2.0.52 + php5 + gd2 + mysql, etc.

xiaoxiao2021-03-06  21

Since GD2 began to support the creation of true color pictures, so the upgrade server, because the original installation is the default system installation, but also because it is a rookie, so it is difficult, and some articles on the Internet are in my Red Hat. A 3 installation test, but tested the installation php4.3.x and php5.0.x did not succeed. Finally, according to other people's articles, I have been working nearly 3 days, finally installed, let me install it. The errors and procedures that appear in the middle are written and share it, so as not to have a rookie like me! (I have two days, the number of times the PHP is not 50 times, I hope everyone will support, there is Error, of course, welcome to me correctly! Reprint, please indicate online (http://article.21e.cn, thank you!), The following test is passed on Red Hat 9 and Red Hat A 3! If your machine originally Installing PHP or Apache RPM or low version. You can delete, delete the installation is simple, but my actual operation process is kerosene delete, but directly install it. Of course, you can also be like me! First, the server GCC must Otherwise, don't do anything. You can use gcc -v to see if you have installed GCC, #gcc -v-lib/i386-redhat-linux/3.2.3/specs configured with: ../configure --prefix = / usr --Mandir = / usr / share / man --infodir = / usr / share / info --enable-shared --enable-threads = POSIX - Disable-Checking --with -system-zlib --enable -__ cxa_atexit --host =

i386-redhat-linux thread model: POSIX GCC Version 3.2.3 20030502 (Red Hat Linux 3.2.3-34) There is or more information indicating that there is GCC, no installation, as for how to install, I will not say, You can install or download the source file with a CD, of course, your version is not necessarily 3.2.3! Please download all the things: httpd-2.0.x.tar.gz version is best to download the latest, download address : http://www.apache.org mysql-client-4.0.20-0.i386.0.20-0.i386.rpm (If you plan to upgrade mysql, please download, download address: http : //www.mysql.org is of course also downloading the latest version is the best, because I don't plan to install MySQL, I will omit, the steps when installing is also installed first, I will install mySQL!) PHP-5.0.x.tar.gz Download Address: http://www.php.net Zendoptimizer-2.5.3-Linux-glibc21-i386.tar.gz Zend's latest version installation is like a bit problem, you can download this version, Zend is used to speed PHP, you You can choose not to install! Download address: http://www.zend.com GD-2.0.28.tar.gz This software download address, PHP recommended: http://www.boutell.com/gd/ but Due to some reasons, developers do not support the creation of GIF images, which is a bit less convenient, so I downloaded a GIF image, that is, the GIF patch: http://www.rime.com.au / gd / libxml2-2.xxtar.gz Download Address: Zlib-1.xxtar.gz Forgot, find it yourself, jpegsrc.v6b.tar.gz Download address: ftp://ftp.u.Net/graphics / jpeg / libpng-1.2.5.tar.gz Download Address: http://www.libpng.org/pub/png/libpng.html Freetype2-xxtar.gz Download Ues: http://www.fretype.org XPM-3.4K-2.I386.rpm Forgot, find it, you are all the official address I downloaded, the version of the software version is x, you look at which version you want to use. It is best to use the latest stable version! If you have previously installed other versions of the above software, you can also choose not to install! Install the mysql server: # rpm -ivh mysql-server-4.0.20-0.i386.rpm # rpm -ivh mysql-client-4.0.20-0.i386.rpm After installation, try to use #mysql if the password is set, if the password is set (mysql -u root -Proot -h localhost pays attention to -p There is no space, directly with the password) Welcome to the mysql monitor. Commists end with; or / g. Your mysql connection ID is 27651 to server version: 4.0.20-standard type 'help;' or '/ h' for HELP Type '/ c' to clear the buffer! Please change your MySQL password, the method does not say! Install xpm # rpm -ivhxpm-3.4k-2.i386.rpm installation libXML # tar -zxf libxml2- 2.6.16.tar.gz # cd libxml2-2.6.16 # ./configure (XML default installation can, do not specify the path, because PHP may not find it when installation, PHP5 only supports libXML2-2.5.50 or higher version ) # make # make install installation zlib # tar -zxf zlib-1.2.2.tar.gz # cd zlib-1.2 # ./configure --prefix =

/ usr / local / zlib2 (Note, if you haven't installed ZLIB before, you can not specify the path, I don't delete the previous low version is specified! The following Lei!) # make # make install Install JPEG # tar -zxf jpegsrc. V6b.tar.gz # CD JPEG-6B / # ./configure --prefix = / usr / local / jpeg6 # make # make install-lib If you choose the default installation, you may be smooth and specified, please create the following Folder error tips: ... / usr / bin / install -c -m 644 jconfig.h /usr/local/jpeg6/include/jconfig.h / usr / bin / install: Unable to create general file '/ USR / local / jpeg6 / include / jconfig.h ': No file or directory make: *** [install-headers] error 1 # mkdir / usr / local / jpeg6 # mkdir / usr / local / jpeg6 / include # mkdir / usr / local / jpeg6 / lib # make install-lib # Make Install installation If error message is installed: / usr / bin / install: Unable to create a general file '/usr/local/jpeg6/lib/libjpeg.a': No Document or directory make: *** [install-lib] error 1 Create the following folder: # mkdir / usr / local / jpeg6 / lib # make install / usr / bin / install -c cjpeg / usr / local / jpeg6 / bin / cjpeg / usr / bin / install: Unable to create general file '/ usr / local / jpeg6 / bin / cjpeg': No file or directory make: *** [install] error 1 # mkdir / usr / local / jpeg6 / Bin / usr / bin / install -c-m 644 ./cjpeg.1 /usr/local/jpeg6/man/man1/cjpeg.1 / usr / bin / install: Unable to create general file '/ usr / lo CAL / jpeg6 / man / man1 / cjpeg.1 ': No file or directory Make: *** [install] error 1 # mkdir / usr / local / jpeg6 / man # mkdir / usr / local / jpeg6 / man / man1 # Make Install is good until installation is successful! Install libpng: # tar -zxf libpng-1.2.7-config.tar.gz # cd libpng-1.2.7-config # ./configure --prefix = / usr / local / Libpng2 # make # make install installation freetype: # tar -zxf freetype-2.1.9.tar.gz # cd freetype-2.1.9 # ./configure --prefix = / usr / local / freetype2 # make # make install installation GD Library: # tar -zxf gd-2.0.26gif.tar.gz # CD GD-2.0.26Gif # ./configure --prefix = / usr / local / gd2 --with-zlib = / usr / local / zlib2 / -WITH-PNG = / usr / local / libpng2 / --with-jpeg = / usr / local / jpeg6 / --with-freetype =

/ usr / local / freetype2 / (please specify the installation path of the plugin, otherwise it may be wrong when installing PHP!) # make # make install installation Apache, (PHP5 installation environment requires apache2.0.46 or above, the download is noted!) #tar zxvf httpd-2.0.50.tar.gz #cd httpd-2.0.50 #. / configure --prefix = / usr / local / apache2 --enable-module = so #make #make install installation PHP5: # tar -zxf php5-200411260130.Tar.gz # cd php5-200411260130 # ./configure --prefix = / usr / local / php --with-apxs2 = / usr / local / apache2 / bin / apxs --with-jpeg- DIR = / usr / local / jpeg6 / --with-png-dir = / usr / local / libpng2 / --with-gd = / usr / local / gd2 / --with-freetype-dir = / usr / local / Freetype2 / --enable-trace-vars --with-zlib-dir = / usr / local / zlib2 / -with-mysql = / var / lib / mysql # make # make install # cp php.ini-dist / usr / If the path is installed by local / php / lib / php.ini, if the path is specified, Make may be wrong, so I didn't specify when I installed it! I met when Make PHP4.3.8 and 5: EXT / GD / GD.LO (.text 0x63a): in function `zm_deactivate_gd ': /Root/software/php-4.3.8/ext/gd/gd.c:385: undefined Reference to` GDFreeFontCache' Collect2: ld Returned 1 Exit stat STATUS Make: *** [SAPI / CLI / PHP] Error 1 There is another error that may be: libphp.lo 's error (there is no record at the time, forgotten , Probably!) Is because the Freetype of the GD library is not installed, or the path to the kerosene specifies the plug-in when installing the GD library !! Copy the php.ini file to the correct position to run in the PHP directory #CP php.ini-dist / usr /LOCAL/PHP/LIB/PHP.INI Edit Apache configuration file httpd.conf #vi /usr/local/apache2/conf/httpd.conf to change the following: generally in #addtype application / x-tar. his party #LoadModule php5_module modules / libphp5.so AddType application / x-httpd-php .php If you search for other places without this line LoadModule php5_module modules / libphp5.so please tgz under the above number # removed as well find DirectoryIndex index .html index.html.var Add index.php Let it put index.php as the default page to find # don't use group # -1 on these systems! Change the following username and group to user apache group apache. It seems that it is nobody), then find #servername to remove #, the back IP is changed to your IP. Find DocumentRoot "/ usr / local / apache2 / htdocs"

转载请注明原文地址:https://www.9cbs.com/read-65557.html

New Post(0)