Apache2.2.4 + mysql5.0.77 + php5.2.8 simplified installation
Last Update:2018-03-16
Source: Internet
Author: User
How to configure the apachephp environment in linux. 1. install Apache
Copy httpd-2.2.4.tar.gz to the/usr/local/src directory.
Tar-zxvf httpd-2.2.4.tar.gz
Cd httpd-2.2.4
. /Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-vhost-alias -- enable-rewrite -- enable-deflate -- enable-mods-shared = all --- mpm = worker
Make & make install
2. install php
Install freetype-2.3.5.tar.gz
Tar zxvf freetype-2.3.5.tar.gz
Cd freetype-2.3.5
./Configure -- prefix =/usr/local/phpsyslib/freetype-2.3.5
Make & make install
Mkdir/usr/local/phpsyslib/freetype-2.3.5/include/freetype2/freetype/internal (required if an error is reported)
Install jpeg
Tar zxvf restart src.v6b.tar.gz
Cd jpeg-6b
./Configure -- prefix =/usr/local/phpsyslib/jpeg-6b -- enable-shared must be followed by this parameter, otherwise the shared library cannot be generated
Create a directory based on the error message
Cp libjpeg. a/usr/local/lib (if gd fails to be installed)
Install zlib
Tar zxvf zlib-1.2.3.tar.gz
Cd zlib-1.2.3
./Configure -- prefix =/usr/local/phpsyslib/zlib-1.2.3
Install openssl-0.9.8e
Tar zxvf openssl-0.9.8e.tar.gz
Cd openssl-0.9.8e
./Config shared zlib
Make
Make test
Make install
Mv/usr/bin/openssl. OFF
Mv/usr/include/openssl. OFF
Ln-s/usr/local/ssl/bin/openssl/usr/bin/openssl
Ln-s/usr/local/ssl/include/openssl/usr/include/openssl
Configure the library file search path
# Echo "/usr/local/ssl/lib">/etc/ld. so. conf
# Ldconfig-v
Install libpng
Tar zxvf libpng-1.2.23.tar.gz
Cd libpng-1.2.23
Cp scripts/makefile. linux makefile
Install the GD Library (if it fails, install libtool and gettext first)
Tar zxvf gd-2.0.35.tar.gz
Cd gd-2.0.35
. /Configure -- prefix =/usr/local/phpsyslib/gd-2.0.35 -- with-jpeg =/usr/local/phpsyslib/jpeg-6b -- with-png =/usr/local/-- with-zlib =/usr/local/phpsyslib/zlib-1.2.3 -- with-freetype =/usr/local/phpsyslib/freetype-2.3.5/
Make & make install
Install gettext (if it fails, install libtool first)
Tar zxvf gettext-0.17.tar.gz
Cd gettext-0.17
./Configure -- prefix =/usrmake & make install libtool
Tar zxvf libtool-2.2.tar.gz
Cd libtool-2.2
./Configure -- prefix =/usrmake & make installcp/usr/lib/libattr. la/lib/
Install curl
Tar zxvf curl-7.17.1.tar.gz
Cd curl-7.17.1
./Configure -- prefix =/usr/local/phpsyslib/curl-7.17.1
Make & make install
3. install mysql
# Tar zxvf mysql-5.0.77-linux-i686-icc-glibc23.tar.gz
Cp mysql-5.0.77-linux-i686-icc-glibc23/usr/local/mysql
Cp/usr/local/mysql/support-files/mysql. server/etc/rc. d/init. d/mysql --- mysql self-starting
Cp/usr/local/mysql/support-files/my-medium.cnf/etc/my. cnf
Groupadd mysql
Useradd-g mysql
Chown-R root/usr/local/mysql
Chgrp-R mysql/usr/local/mysql
The preceding two statements are available (chown-R root: mysql/usr/local/mysql)
Chown-R mysql/usr/local/mysql/data
/Usr/local/mysql/scripts/mysql_install_db -- user = mysql &
/Usr/local/mysql/bin/safe_mysqld -- user = mysql &
Install php
. /Configure -- prefix =/usr/local/php5.2.8 -- with-apxs2 =/usr/local/apache2/bin/apxs -- with-config-file-path =/etc -- with-mysql = /usr/local/mysql -- with-mysqli =/usr/local/mysql/bin/mysql_config -- with-libxml-dir =/usr/share/doc/libxml2-2.6.16 -- with-gd =/usr/local/phpsyslib/gd-2.0.35 -- enable-gd-native-ttf -- with-jpeg-dir =/usr/local/jpeg-6b -- with-png-dir -- with-freetype -dir =/usr/local/phpsyslib/freetype-2.3.5 -- with-iconv-dir -- with-zlib =/usr/local/phpsyslib/zlib-1.2.3 -- enable-mbstring -- disable-ipv6 -- with-openssl -dir =/usr/local/ssl -- with-curl =/usr/local/phpsyslib/curl-7.17.1 -- with-mime-magic =/usr/share/file/magic. mime
Mysql routine usage
Mysqldump-uXXX-hXXX-p samp_db>/usr/archives/mysql/samp_db.1999-10-02 backup
Mysql database name <文件路径 用户名和密码(如果有) 导入
Create a user:
Grant all on redflag. * to username @ "%" identified by "password ";
Flush privileges;