LAMP:Linux + Apache + MySQL + PHP
本文将呈现搭建LAMP架构的技术细节。
就像标题所呈现的那样,本文会涉及到至少四个方面的知识,它们分别是:
Linux:操作系统
Apache:Web服务器
MySQL:数据库
PHP:超文本预处理语言(这是一种HTML内嵌式的脚本语言)
由于本文的环境是在个人PC上临时搭建的实验环境,所以在部署过程中,还会涉及到有关VMware workstation的一些初级知识。
大体上包括如上内容,下面开始。
————————————————————————————————————
首先,你需要为搭建LAMP,做软件包与安装介质的准备。
Linux
你可以选择任何一种Linux的发行版完成LAMP的搭建。
可以是:Cent OS、SUSE、Red Hat、Fedora,甚至是红旗,…
在Linux这块,你需要准备的程序包为特定发行版的Linux的安装光盘。
由于本文是基于VMware技术构建的,所以你可以不需要刻录ISO为光盘介质。
Linux发行版的ISO下载地址:
Red Hat Enterprise Linux
官方客户门户网站:https://access.redhat.com/zh_CN/downloads
(URL:https://access.redhat.com/downloads/content/69/ver=/rhel—5/5.11/x86_64/product-downloads)
CentOS Linux
官方网址:http://www.centos.org
官方下载地址:http://wiki.centos.org/Download
Apache HTTP Server
项目主页:http://httpd.apache.org
(URL:http://httpd.apache.org/download.cgi#apache24)
MySQL
MySQL自从被Oracle收购后就分裂为两个版本:
社区版
企业版
其中,社区版是免费的,社区版的发行遵循GPL协议;而企业版是由Oracle发行的,要收费。
如果要在MS Windows上安装MySQL的工具(如:Workbench),你需要预安装:
Microsoft .net framework 4
Microsoft Visual C++ 2013
关于这部分的说明可以详见:http://dev.mysql.com/resources/wb62_prerequisites.html
Visual C++ 2013,下载地址:http://www.microsoft.com/zh-CN/download/details.aspx?id=40784
社区版下载地址:http://dev.mysql.com/downloads/
MySQL Community Server:http://dev.mysql.com/downloads/mysql/5.6.html
(URL:http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-5.6.21-1.rhel5.x86_64.rpm-bundle.tar)
而企业版的下载需要登录Oracle eDelivery方可获取。
Oracle eDelivery:https://edelivery.oracle.com/
下载地址:
MySQL Database 5.6.21 RPM for Oracle Linux / RHEL 5 x86 (64bit)(V47184-01,Size:310M):
http://epd-akam-intl.oracle.com/adcarurepos/vol/patch27/EPD/V47184-01.zip?FilePath=/adcarurepos/vol/patch27/EPD/V47184-01.zip&File=V47184-01.zip¶ms=c3ZkbVRleXM5a3RLTEIzck5JMGNRdzphcnU9MTgwODkyODkmZW1haWw9ZGtzZXZlbl9lbGlAMTYzLmNvbSZmaWxlX2lkPTczOTM1MjY2JnBhdGNoX2ZpbGU9VjQ3MTg0LTAxLnppcCZ1c2VyaWQ9ZXBkLWRrc2V2ZW5fZWxpQDE2My5jb20mc2l6ZT0zMjYxMDQ0ODAmY29udGV4dD1BQDE1K0hAYWFydXZtdHAwNS5vcmFjbGUuY29tK1BAMTMyNTk2OTUmZG93bmxvYWRfaWQ9MTQxNjUyNzE3&AuthParam=1416534866_e75c1dba2a4006e798f7a58597a6b5f4
PHP
PHP官方网站:http://php.net/
下载页:http://php.net/downloads.php
PHP 5.6.3,http://cn2.php.net/distributions/php-5.6.3.tar.gz
————————————————————————————————————
版本信息:
RHEL 5.10
Apache 2.4.10
MySQL 5.6.21
PHP 5.6.3
————————————————————————————————————
为了后面管理MySQL的方便,还需要下载:phpMyAdmin,它的官网为:
http://www.phpmyadmin.net/home_page/index.php
(URL:http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.3.0-beta1/phpMyAdmin-4.3.0-beta1-all-languages.zip)
————————————————————————————————————
一、通过VMware workstation创建Linux虚拟机:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
[root@center ~]# hostname center [root@center ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:34:15:72 inet addr:192.168.223.136 Bcast:192.168.223.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe34:1572/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2448 errors:0 dropped:0 overruns:0 frame:0 TX packets:727 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:366599 (358.0 KiB) TX bytes:89488 (87.3 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1403 errors:0 dropped:0 overruns:0 frame:0 TX packets:1403 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2413596 (2.3 MiB) TX bytes:2413596 (2.3 MiB) [root@center ~]# [root@center ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. # Localhost 127.0.0.1 localhost # Pub 192.168.223.136 center [root@center ~]# [root@center ~]# sestatus SELinux status: disabled [root@center ~]# [root@center ~]# service iptables status Firewall is stopped. [root@center ~]# [root@center ~]# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 5.10 (Tikanga) Release: 5.10 Codename: Tikanga [root@center ~]# [root@center ~]# |
如上所示:
主机名:Center
IP地址:192.168.223.136
防火墙:关
SELINUX:关
操作系统软件包。
需要准备的操作系统软件包包括:
libxml2,ftp://xmlsoft.org/libxml2/
ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz
libmcrypt,http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/
http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
zlib,http://www.zlib.net/
http://zlib.net/zlib-1.2.8.tar.gz
autoconf,http://ftp.gnu.org/gnu/autoconf/
http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
freetype,http://download.savannah.gnu.org/releases/freetype/
http://ftp.twaren.net/Unix/NonGNU//freetype/freetype-2.5.3.tar.gz
libpng,ftp://ftp.simplesystems.org/pub/libpng/png/src/
ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.15.tar.gz
jpegsrc,http://www.ijg.org/files/
http://www.ijg.org/files/jpegsrc.v9a.tar.gz
gd,https://bitbucket.org/libgd/gd-libgd/downloads
https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.0-rc1.tar.gz
软件包安装:
通过YUM安装软件包。
1 2 3 4 5 6 7 8 9 10 11 |
yum install -y gcc44-c++.x86_64 gcc44.x86_64 compat-gcc-34.x86_64 compat-gcc-34-c++.x86_64 yum install -y glibc-devel yum install -y gcc gcc-c++ yum install -y libaio-devel yum install -y libstdc++-devel yum install -y libxml2-devel yum install -y gd yum install -y zlib-devel yum install -y libpng-devel yum install -y libjpeg-devel yum install -y freetype-devel freetype-demos |
1 2 3 4 5 6 7 8 9 |
[root@center ~]# mkdir /software [root@center ~]# cd /software [root@center software]# ls LAMP [root@center software]# cd LAMP/ [root@center LAMP]# ls autoconf-2.69.tar.gz httpd-2.4.10.tar.gz libgd-2.1.0-rc1.tar.gz libpng-1.6.15.tar.gz MySQL-5.6.21-1.rhel5.x86_64.rpm-bundle.tar phpMyAdmin-4.3.0-beta1-all-languages.zip freetype-2.5.3.tar.gz jpegsrc.v9a.tar.gz libmcrypt-2.5.8.tar.gz libxml2-2.9.2.tar.gz php-5.6.3.tar.gz zlib-1.2.8.tar.gz [root@center LAMP]# |
libmcrypt:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
[root@center ~]# yum list | grep --color libmcrypt This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. [root@center ~]# cd /software/LAMP/ [root@center LAMP]# tar -xf libmcrypt-2.5.8.tar.gz [root@center LAMP]# cd libmcrypt-2.5.8 [root@center libmcrypt-2.5.8]# ls acinclude.m4 autom4te.cache ChangeLog config.h.in config.sub COPYING.LIB include KNOWN-BUGS libmcrypt.spec ltmain.sh Makefile.in modules src TODO aclocal.m4 autoscan.log config.guess config.log configure depcomp INSTALL lib libmcrypt.spec.in Makefile missing NEWS stamp-h1 AUTHORS buildconf config.h config.status configure.in doc install-sh libltdl libtool Makefile.am mkinstalldirs README THANKS [root@center libmcrypt-2.5.8]# [root@center libmcrypt-2.5.8]# mkdir /usr/local/libmcrypt [root@center libmcrypt-2.5.8]# ./configure --prefix=/usr/local/libmcrypt/ (... ...etc) [root@center libmcrypt-2.5.8]# make (... ...etc) make[2]: Entering directory `/software/LAMP/libmcrypt-2.5.8/src' if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT cipher_test.o -MD -MP -MF ".deps/cipher_test.Tpo" -c -o cipher_test.o cipher_test.c; \ then mv -f ".deps/cipher_test.Tpo" ".deps/cipher_test.Po"; else rm -f ".deps/cipher_test.Tpo"; exit 1; fi /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -o ciphertest cipher_test.o ../lib/libmcrypt.la mkdir .libs gcc -g -O2 -o .libs/ciphertest cipher_test.o ../lib/.libs/libmcrypt.so -Wl,--rpath -Wl,/usr/local/libmcrypt//lib creating ciphertest if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT aes_test.o -MD -MP -MF ".deps/aes_test.Tpo" -c -o aes_test.o aes_test.c; \ then mv -f ".deps/aes_test.Tpo" ".deps/aes_test.Po"; else rm -f ".deps/aes_test.Tpo"; exit 1; fi /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -o aestest aes_test.o ../lib/libmcrypt.la gcc -g -O2 -o .libs/aestest aes_test.o ../lib/.libs/libmcrypt.so -Wl,--rpath -Wl,/usr/local/libmcrypt//lib creating aestest make[2]: Leaving directory `/software/LAMP/libmcrypt-2.5.8/src' Making all in doc make[2]: Entering directory `/software/LAMP/libmcrypt-2.5.8/doc' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/software/LAMP/libmcrypt-2.5.8/doc' make[2]: Entering directory `/software/LAMP/libmcrypt-2.5.8' make[2]: Nothing to be done for `all-am'. make[2]: Leaving directory `/software/LAMP/libmcrypt-2.5.8' make[1]: Leaving directory `/software/LAMP/libmcrypt-2.5.8' [root@center libmcrypt-2.5.8]# [root@center libmcrypt-2.5.8]# make install (... ...etc) Libraries have been installed in: /usr/local/libmcrypt//lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- test -z "/usr/local/libmcrypt//share/aclocal" || mkdir -p -- "/usr/local/libmcrypt//share/aclocal" /usr/bin/install -c -m 644 'libmcrypt.m4' '/usr/local/libmcrypt//share/aclocal/libmcrypt.m4' make[2]: Leaving directory `/software/LAMP/libmcrypt-2.5.8/lib' make[1]: Leaving directory `/software/LAMP/libmcrypt-2.5.8/lib' Making install in src make[1]: Entering directory `/software/LAMP/libmcrypt-2.5.8/src' make[2]: Entering directory `/software/LAMP/libmcrypt-2.5.8/src' make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/software/LAMP/libmcrypt-2.5.8/src' make[1]: Leaving directory `/software/LAMP/libmcrypt-2.5.8/src' Making install in doc make[1]: Entering directory `/software/LAMP/libmcrypt-2.5.8/doc' make[2]: Entering directory `/software/LAMP/libmcrypt-2.5.8/doc' make[2]: Nothing to be done for `install-exec-am'. test -z "/usr/local/libmcrypt//man/man3" || mkdir -p -- "/usr/local/libmcrypt//man/man3" /usr/bin/install -c -m 644 './mcrypt.3' '/usr/local/libmcrypt//man/man3/mcrypt.3' make[2]: Leaving directory `/software/LAMP/libmcrypt-2.5.8/doc' make[1]: Leaving directory `/software/LAMP/libmcrypt-2.5.8/doc' make[1]: Entering directory `/software/LAMP/libmcrypt-2.5.8' make[2]: Entering directory `/software/LAMP/libmcrypt-2.5.8' make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/software/LAMP/libmcrypt-2.5.8' make[1]: Leaving directory `/software/LAMP/libmcrypt-2.5.8' [root@center libmcrypt-2.5.8]# |
libltdl:
1 2 3 4 5 6 |
[root@center libltdl]# pwd /software/LAMP/libmcrypt-2.5.8/libltdl [root@center libltdl]# ls acinclude.m4 aclocal.m4 config-h.in configure configure.in COPYING.LIB ltdl.c ltdl.h Makefile.am Makefile.in README [root@center libltdl]# ./configure --enable-ltdl-install [root@center libltdl]# make; make install |
zlib:
1 2 3 4 5 6 7 8 9 10 |
[root@center LAMP]# tar -xf zlib-1.2.8.tar.gz [root@center LAMP]# cd zlib-1.2.8 [root@center zlib-1.2.8]# ls adler32.c CMakeLists.txt crc32.c doc gzguts.h INDEX inffixed.h inftrees.h msdos README trees.h zconf.h zlib.3 zlib.pc.cmakein amiga compress.c crc32.h examples gzlib.c infback.c inflate.c Makefile nintendods test uncompr.c zconf.h.cmakein zlib.3.pdf zlib.pc.in as400 configure deflate.c FAQ gzread.c inffast.c inflate.h Makefile.in old treebuild.xml watcom zconf.h.in zlib.h zutil.c ChangeLog contrib deflate.h gzclose.c gzwrite.c inffast.h inftrees.c make_vms.com qnx trees.c win32 zlib2ansi zlib.map zutil.h [root@center zlib-1.2.8]# mkdir /usr/local/zlib [root@center zlib-1.2.8]# ./configure --prefix=/usr/local/zlib/ [root@center zlib-1.2.8]# make; make install |
libpng:
1 2 3 4 5 6 7 8 9 10 11 |
[root@center LAMP]# tar -xf libpng-1.6.15.tar.gz [root@center LAMP]# cd libpng-1.6.15 [root@center libpng-1.6.15]# ls aclocal.m4 CMakeLists.txt configure INSTALL libpng.pc.in Makefile.in png.c png.h pngpriv.h pngset.c pngusr.dfa projects TODO ANNOUNCE compile configure.ac install-sh libpngpf.3 missing pngconf.h pnginfo.h pngread.c pngstruct.h pngwio.c README arm config.guess contrib libpng.3 LICENSE png.5 pngdebug.h pngmem.c pngrio.c pngtest.c pngwrite.c scripts autogen.sh config.h.in depcomp libpng-config.in ltmain.sh pngbar.jpg pngerror.c pngnow.png pngrtran.c pngtest.png pngwtran.c test-driver CHANGES config.sub example.c libpng-manual.txt Makefile.am pngbar.png pngget.c pngpread.c pngrutil.c pngtrans.c pngwutil.c tests [root@center libpng-1.6.15]# mkdir /usr/local/libpng [root@center libpng-1.6.15]# ./configure --prefix=/usr/local/libpng [root@center libpng-1.6.15]# make; make install |
jpeg:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[root@center LAMP]# tar -xf jpegsrc.v9a.tar.gz [root@center LAMP]# [root@center LAMP]# cd jpeg-9a/ [root@center jpeg-9a]# ls aclocal.m4 configure jccoefct.c jconfig.manx jdapistd.c jdmerge.c jmemansi.c jquant1.c makecfil.v10 makefile.manx makejsln.v10 makewdep.vc6 rdjpgcom.c transupp.c ar-lib configure.ac jccolor.c jconfig.mc6 jdarith.c jdpostct.c jmemdosa.asm jquant2.c makecmak.vc6 makefile.mc6 makejvcx.v10 makewdsp.vc6 rdppm.c transupp.h cderror.h depcomp jcdctmgr.c jconfig.sas jdatadst.c jdsample.c jmemdos.c jutils.c makecvcx.v10 makefile.mms makeproj.mac makewfil.v10 rdrle.c usage.txt cdjpeg.c djpeg.1 jchuff.c jconfig.st jdatasrc.c jdtrans.c jmemmac.c jversion.h makeddep.vc6 makefile.sas makerdep.vc6 makewmak.vc6 rdswitch.c wizard.txt cdjpeg.h djpeg.c jcinit.c jconfig.txt jdcoefct.c jerror.c jmemmgr.c libjpeg.map makeddsp.vc6 makefile.unix makerdsp.vc6 makewvcx.v10 rdtarga.c wrbmp.c change.log example.c jcmainct.c jconfig.vc jdcolor.c jerror.h jmemname.c libjpeg.txt makedfil.v10 makefile.vc makerfil.v10 makljpeg.st README wrgif.c cjpeg.1 filelist.txt jcmarker.c jconfig.vms jdct.h jfdctflt.c jmemnobs.c ltmain.sh makedmak.vc6 makefile.vms makermak.vc6 maktjpeg.st structure.txt wrjpgcom.1 cjpeg.c install-sh jcmaster.c jconfig.wat jddctmgr.c jfdctfst.c jmemsys.h makcjpeg.st makedvcx.v10 makefile.wat makervcx.v10 makvms.opt testimg.bmp wrjpgcom.c ckconfig.c install.txt jcomapi.c jcparam.c jdhuff.c jfdctint.c jmorecfg.h makdjpeg.st Makefile.am makejdep.vc6 maketdep.vc6 missing testimg.jpg wrppm.c coderules.txt jaricom.c jconfig.bcc jcprepct.c jdinput.c jidctflt.c jpegint.h makeadsw.vc6 makefile.ansi makejdsp.vc6 maketdsp.vc6 rdbmp.c testimgp.jpg wrrle.c compile jcapimin.c jconfig.cfg jcsample.c jdmainct.c jidctfst.c jpeglib.h makeasln.v10 makefile.bcc makejdsw.vc6 maketfil.v10 rdcolmap.c testimg.ppm wrtarga.c config.guess jcapistd.c jconfig.dj jctrans.c jdmarker.c jidctint.c jpegtran.1 makecdep.vc6 makefile.dj makejfil.v10 maketmak.vc6 rdgif.c testorig.jpg config.sub jcarith.c jconfig.mac jdapimin.c jdmaster.c jinclude.h jpegtran.c makecdsp.vc6 Makefile.in makejmak.vc6 maketvcx.v10 rdjpgcom.1 testprog.jpg [root@center jpeg-9a]# [root@center jpeg-9a]# mkdir /usr/local/jpeg [root@center jpeg-9a]# ./configure --prefix=/usr/local/jpeg --enable-share --enable-static [root@center jpeg-9a]# make; make install |
freetype:
1 2 3 4 5 6 7 8 9 |
[root@center LAMP]# tar -xf freetype-2.5.3.tar.gz [root@center LAMP]# cd freetype-2.5.3 [root@center freetype-2.5.3]# ls autogen.sh ChangeLog ChangeLog.21 ChangeLog.23 CMakeLists.txt devel include Jamrules modules.cfg README src vms_make.com builds ChangeLog.20 ChangeLog.22 ChangeLog.24 configure docs Jamfile Makefile objs README.git version.sed [root@center freetype-2.5.3]# [root@center freetype-2.5.3]# mkdir /usr/local/freetype [root@center freetype-2.5.3]# [root@center freetype-2.5.3]# ./configure --prefix=/usr/local/freetype; make; make install |
autoconf:
1 2 3 4 5 6 7 |
[root@center LAMP]# tar -xf autoconf-2.69.tar.gz [root@center LAMP]# cd autoconf-2.69 [root@center autoconf-2.69]# ls aclocal.m4 bin build-aux ChangeLog ChangeLog.1 ChangeLog.3 configure.ac COPYING.EXCEPTION doc INSTALL m4 Makefile.am man README THANKS AUTHORS BUGS cfg.mk ChangeLog.0 ChangeLog.2 configure COPYING COPYINGv3 GNUmakefile lib maint.mk Makefile.in NEWS tests TODO [root@center autoconf-2.69]# [root@center autoconf-2.69]# ./configure; make; make install; |
二、Apache HTTP Server
准备APR的介质:
Apache Portable Runtime Project:http://apr.apache.org/download.cgi
APR:http://mirror.bit.edu.cn/apache//apr/apr-1.5.1.tar.gz
APR-UTIL:http://mirror.bit.edu.cn/apache//apr/apr-util-1.5.4.tar.gz
卸载已有的APR:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
[root@center LAMP]# yum list | grep --color apr This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. apr.i386 1.2.7-11.el5_6.5 installed apr.x86_64 1.2.7-11.el5_6.5 installed apr-util.i386 1.2.7-11.el5_5.2 installed apr-util.x86_64 1.2.7-11.el5_5.2 installed xorg-x11-drv-dynapro.x86_64 1.1.0-2 installed apr-devel.i386 1.2.7-11.el5_6.5 Server apr-devel.x86_64 1.2.7-11.el5_6.5 Server apr-docs.x86_64 1.2.7-11.el5_6.5 Server apr-util-devel.i386 1.2.7-11.el5_5.2 Server apr-util-devel.x86_64 1.2.7-11.el5_5.2 Server apr-util-docs.x86_64 1.2.7-11.el5_5.2 Server apr-util-mysql.x86_64 1.2.7-11.el5_5.2 Server [root@center LAMP]# [root@center LAMP]# yum remove apr apr-util Loaded plugins: product-id, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package apr.i386 0:1.2.7-11.el5_6.5 set to be erased --> Processing Dependency: libapr-1.so.0 for package: subversion ---> Package apr.x86_64 0:1.2.7-11.el5_6.5 set to be erased --> Processing Dependency: libapr-1.so.0()(64bit) for package: subversion ---> Package apr-util.i386 0:1.2.7-11.el5_5.2 set to be erased ---> Package apr-util.x86_64 0:1.2.7-11.el5_5.2 set to be erased --> Running transaction check ---> Package subversion.i386 0:1.6.11-11.el5_9 set to be erased ---> Package subversion.x86_64 0:1.6.11-11.el5_9 set to be erased --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================================== Removing: apr i386 1.2.7-11.el5_6.5 installed 261 k apr x86_64 1.2.7-11.el5_6.5 installed 263 k apr-util i386 1.2.7-11.el5_5.2 installed 164 k apr-util x86_64 1.2.7-11.el5_5.2 installed 170 k Removing for dependencies: subversion i386 1.6.11-11.el5_9 installed 11 M subversion x86_64 1.6.11-11.el5_9 installed 11 M Transaction Summary ========================================================================================================================================================================================================== Remove 6 Package(s) Reinstall 0 Package(s) Downgrade 0 Package(s) Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Erasing : apr 1/6 Erasing : apr 2/6 Erasing : subversion 3/6 Erasing : subversion 4/6 Erasing : apr-util 5/6 Erasing : apr-util 6/6 Removed: apr.i386 0:1.2.7-11.el5_6.5 apr.x86_64 0:1.2.7-11.el5_6.5 apr-util.i386 0:1.2.7-11.el5_5.2 apr-util.x86_64 0:1.2.7-11.el5_5.2 Dependency Removed: subversion.i386 0:1.6.11-11.el5_9 subversion.x86_64 0:1.6.11-11.el5_9 Complete! [root@center LAMP]# |
安装:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
[root@center software]# pwd /software [root@center software]# ll total 1868 -rw-r--r-- 1 root root 1020833 Nov 21 14:37 apr-1.5.1.tar.gz -rw-r--r-- 1 root root 874044 Nov 21 14:37 apr-util-1.5.4.tar.gz drwxr-xr-x 10 root root 4096 Nov 21 14:18 LAMP [root@center software]# tar -xf apr-1.5.1.tar.gz [root@center software]# cd apr-1.5.1 [root@center apr-1.5.1]# ls apr-config.in apr.mak build CHANGES configure.in encoding libapr.dep LICENSE memory NOTICE random strings threadproc apr.dep apr.pc.in buildconf CMakeLists.txt docs file_io libapr.dsp locks misc NWGNUmakefile README support time apr.dsp apr.spec build.conf config.layout dso helpers libapr.mak Makefile.in mmap passwd README.cmake tables tools apr.dsw atomic build-outputs.mk configure emacs-mode include libapr.rc Makefile.win network_io poll shmem test user [root@center apr-1.5.1]# mkdir /usr/local/apr-httpd [root@center apr-1.5.1]# ./configure --prefix=/usr/local/apr-httpd/ && make && make install [root@center apr-1.5.1]# cd .. [root@center software]# ls apr-1.5.1 apr-1.5.1.tar.gz apr-util-1.5.4.tar.gz LAMP [root@center software]# tar -xf apr-util-1.5.4.tar.gz [root@center software]# cd apr-util-1.5.4 [root@center apr-util-1.5.4]# ls aprutil.dep apr-util.pc.in build CHANGES configure.in docs include libaprutil.mak Makefile.win NWGNUmakefile strmatch xml aprutil.dsp apr-util.spec buildconf CMakeLists.txt crypto encoding ldap libaprutil.rc memcache README test aprutil.dsw apu-config.in build.conf config.layout dbd export_vars.sh.in libaprutil.dep LICENSE misc README.cmake uri aprutil.mak buckets build-outputs.mk configure dbm hooks libaprutil.dsp Makefile.in NOTICE renames_pending xlate [root@center apr-util-1.5.4]# mkdir /usr/local/apr-util-httpd [root@center apr-util-1.5.4]# ./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/ && make && make install |
PCRE:http://sourceforge.net/projects/pcre/
Download:http://jaist.dl.sourceforge.net/project/pcre/pcre/8.36/pcre-8.36.zip
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
[root@center software]# ls apr-1.5.1 apr-1.5.1.tar.gz apr-util-1.5.4 apr-util-1.5.4.tar.gz LAMP pcre-8.36.zip [root@center software]# [root@center software]# unzip pcre-8.36.zip Archive: pcre-8.36.zip creating: pcre-8.36/ inflating: pcre-8.36/pcre_scanner.h inflating: pcre-8.36/LICENCE inflating: pcre-8.36/makevp_c.txt inflating: pcre-8.36/PrepareRelease inflating: pcre-8.36/RunTest.bat inflating: pcre-8.36/pcre16_study.c inflating: pcre-8.36/pcre16_chartables.c inflating: pcre-8.36/pcre_jit_test.c inflating: pcre-8.36/pcregexp.pas inflating: pcre-8.36/pcre32_chartables.c inflating: pcre-8.36/pcre_get.c inflating: pcre-8.36/132html inflating: pcre-8.36/pcre16_compile.c inflating: pcre-8.36/pcre32_dfa_exec.c inflating: pcre-8.36/pcre32_utf32_utils.c inflating: pcre-8.36/CMakeLists.txt inflating: pcre-8.36/Makefile.am inflating: pcre-8.36/pcre_stringpiece_unittest.cc inflating: pcre-8.36/pcre16_dfa_exec.c inflating: pcre-8.36/pcre16_newline.c inflating: pcre-8.36/pcre16_ord2utf16.c inflating: pcre-8.36/compile inflating: pcre-8.36/pcre16_config.c inflating: pcre-8.36/depcomp inflating: pcre-8.36/config.sub inflating: pcre-8.36/pcre32_maketables.c inflating: pcre-8.36/pcre16_maketables.c inflating: pcre-8.36/pcre16_byte_order.c inflating: pcre-8.36/pcrecpp.cc inflating: pcre-8.36/Makefile.in inflating: pcre-8.36/README creating: pcre-8.36/cmake/ inflating: pcre-8.36/cmake/FindReadline.cmake inflating: pcre-8.36/cmake/FindEditline.cmake inflating: pcre-8.36/cmake/FindPackageHandleStandardArgs.cmake inflating: pcre-8.36/cmake/COPYING-CMAKE-SCRIPTS inflating: pcre-8.36/pcre16_utf16_utils.c inflating: pcre-8.36/aclocal.m4 inflating: pcre-8.36/pcre32_xclass.c inflating: pcre-8.36/ucp.h inflating: pcre-8.36/pcre_printint.c inflating: pcre-8.36/pcre32_compile.c inflating: pcre-8.36/pcre_jit_compile.c inflating: pcre-8.36/dftables.c inflating: pcre-8.36/config.guess inflating: pcre-8.36/pcre_newline.c inflating: pcre-8.36/configure inflating: pcre-8.36/pcrecpparg.h.in inflating: pcre-8.36/perltest.pl inflating: pcre-8.36/pcre16_jit_compile.c inflating: pcre-8.36/pcre32_exec.c inflating: pcre-8.36/pcre32_study.c inflating: pcre-8.36/pcreposix.h inflating: pcre-8.36/CleanTxt inflating: pcre-8.36/pcreposix.c inflating: pcre-8.36/pcre_string_utils.c inflating: pcre-8.36/pcre32_newline.c inflating: pcre-8.36/install-sh inflating: pcre-8.36/pcre16_xclass.c inflating: pcre-8.36/libpcre16.pc.in inflating: pcre-8.36/pcre16_get.c inflating: pcre-8.36/pcrecpp_internal.h inflating: pcre-8.36/pcre_study.c inflating: pcre-8.36/pcre_compile.c inflating: pcre-8.36/pcre_fullinfo.c inflating: pcre-8.36/pcre_refcount.c inflating: pcre-8.36/pcre16_globals.c creating: pcre-8.36/m4/ inflating: pcre-8.36/m4/ltsugar.m4 inflating: pcre-8.36/m4/libtool.m4 inflating: pcre-8.36/m4/ltversion.m4 inflating: pcre-8.36/m4/ltoptions.m4 inflating: pcre-8.36/m4/ax_pthread.m4 inflating: pcre-8.36/m4/lt~obsolete.m4 inflating: pcre-8.36/m4/pcre_visibility.m4 inflating: pcre-8.36/libpcreposix.pc.in inflating: pcre-8.36/COPYING inflating: pcre-8.36/pcrecpp.h inflating: pcre-8.36/INSTALL inflating: pcre-8.36/pcre32_fullinfo.c inflating: pcre-8.36/pcre32_get.c inflating: pcre-8.36/pcre32_tables.c inflating: pcre-8.36/libpcre32.pc.in inflating: pcre-8.36/pcre32_valid_utf32.c inflating: pcre-8.36/pcre_ord2utf8.c inflating: pcre-8.36/makevp.bat inflating: pcre-8.36/ChangeLog inflating: pcre-8.36/pcre32_string_utils.c inflating: pcre-8.36/pcre-config.in inflating: pcre-8.36/pcre_exec.c inflating: pcre-8.36/pcre16_refcount.c inflating: pcre-8.36/HACKING inflating: pcre-8.36/test-driver inflating: pcre-8.36/missing inflating: pcre-8.36/pcre16_string_utils.c inflating: pcre-8.36/configure.ac inflating: pcre-8.36/pcre_scanner.cc inflating: pcre-8.36/pcre_stringpiece.h.in inflating: pcre-8.36/ar-lib inflating: pcre-8.36/pcre_valid_utf8.c creating: pcre-8.36/sljit/ inflating: pcre-8.36/sljit/sljitNativeSPARC_common.c inflating: pcre-8.36/sljit/sljitNativeTILEGX-encoder.c inflating: pcre-8.36/sljit/sljitConfig.h inflating: pcre-8.36/sljit/sljitNativeMIPS_64.c inflating: pcre-8.36/sljit/sljitUtils.c inflating: pcre-8.36/sljit/sljitNativeARM_T2_32.c inflating: pcre-8.36/sljit/sljitNativePPC_64.c inflating: pcre-8.36/sljit/sljitNativeARM_64.c inflating: pcre-8.36/sljit/sljitNativeMIPS_common.c inflating: pcre-8.36/sljit/sljitNativeMIPS_32.c inflating: pcre-8.36/sljit/sljitNativeX86_common.c inflating: pcre-8.36/sljit/sljitNativeTILEGX_64.c inflating: pcre-8.36/sljit/sljitNativeARM_32.c inflating: pcre-8.36/sljit/sljitNativeSPARC_32.c inflating: pcre-8.36/sljit/sljitLir.c inflating: pcre-8.36/sljit/sljitLir.h inflating: pcre-8.36/sljit/sljitNativeX86_32.c inflating: pcre-8.36/sljit/sljitNativePPC_32.c inflating: pcre-8.36/sljit/sljitExecAllocator.c inflating: pcre-8.36/sljit/sljitNativeX86_64.c inflating: pcre-8.36/sljit/sljitNativePPC_common.c inflating: pcre-8.36/sljit/sljitConfigInternal.h inflating: pcre-8.36/pcre16_tables.c inflating: pcre-8.36/pcre32_byte_order.c inflating: pcre-8.36/config-cmake.h.in inflating: pcre-8.36/pcretest.c creating: pcre-8.36/testdata/ inflating: pcre-8.36/testdata/saved32LE-1 inflating: pcre-8.36/testdata/testoutput24 inflating: pcre-8.36/testdata/testoutput2 inflating: pcre-8.36/testdata/testoutputEBC inflating: pcre-8.36/testdata/greplist inflating: pcre-8.36/testdata/testinput21 inflating: pcre-8.36/testdata/testinput25 inflating: pcre-8.36/testdata/testoutput3A inflating: pcre-8.36/testdata/testoutput26 inflating: pcre-8.36/testdata/testoutput20 inflating: pcre-8.36/testdata/grepoutput8 inflating: pcre-8.36/testdata/testoutput16 inflating: pcre-8.36/testdata/testinput17 inflating: pcre-8.36/testdata/testoutput23 inflating: pcre-8.36/testdata/testoutput4 inflating: pcre-8.36/testdata/testoutput11-8 inflating: pcre-8.36/testdata/testinput8 inflating: pcre-8.36/testdata/testinput26 inflating: pcre-8.36/testdata/testoutput7 inflating: pcre-8.36/testdata/grepinput3 inflating: pcre-8.36/testdata/testoutput22-32 inflating: pcre-8.36/testdata/testinput13 inflating: pcre-8.36/testdata/testoutput12 inflating: pcre-8.36/testdata/saved32 inflating: pcre-8.36/testdata/testinput15 inflating: pcre-8.36/testdata/wintestoutput3 inflating: pcre-8.36/testdata/testinput10 inflating: pcre-8.36/testdata/testinput1 inflating: pcre-8.36/testdata/testoutput5 inflating: pcre-8.36/testdata/saved16 inflating: pcre-8.36/testdata/grepoutputN inflating: pcre-8.36/testdata/testinput24 inflating: pcre-8.36/testdata/testoutput9 inflating: pcre-8.36/testdata/testoutput14 inflating: pcre-8.36/testdata/testoutput10 inflating: pcre-8.36/testdata/testinput16 inflating: pcre-8.36/testdata/testoutput21-32 inflating: pcre-8.36/testdata/testoutput25 inflating: pcre-8.36/testdata/testoutput3B inflating: pcre-8.36/testdata/testoutput15 inflating: pcre-8.36/testdata/testoutput13 inflating: pcre-8.36/testdata/testoutput18-32 extracting: pcre-8.36/testdata/grepbinary inflating: pcre-8.36/testdata/grepinputx inflating: pcre-8.36/testdata/testoutput18-16 extracting: pcre-8.36/testdata/greppatN4 inflating: pcre-8.36/testdata/testinput5 inflating: pcre-8.36/testdata/testoutput19 inflating: pcre-8.36/testdata/testoutput6 inflating: pcre-8.36/testdata/testinput3 inflating: pcre-8.36/testdata/testinput23 inflating: pcre-8.36/testdata/testinput7 inflating: pcre-8.36/testdata/testinput18 inflating: pcre-8.36/testdata/saved32BE-1 inflating: pcre-8.36/testdata/saved32BE-2 inflating: pcre-8.36/testdata/testoutput3 inflating: pcre-8.36/testdata/testinput22 inflating: pcre-8.36/testdata/saved16BE-2 inflating: pcre-8.36/testdata/testinput9 inflating: pcre-8.36/testdata/saved8 inflating: pcre-8.36/testdata/testinput20 inflating: pcre-8.36/testdata/testinput6 inflating: pcre-8.36/testdata/saved16LE-1 inflating: pcre-8.36/testdata/saved16LE-2 inflating: pcre-8.36/testdata/testoutput8 inflating: pcre-8.36/testdata/testinput12 inflating: pcre-8.36/testdata/grepinput8 inflating: pcre-8.36/testdata/grepfilelist inflating: pcre-8.36/testdata/testinput2 inflating: pcre-8.36/testdata/grepinputv inflating: pcre-8.36/testdata/grepoutput inflating: pcre-8.36/testdata/saved16BE-1 inflating: pcre-8.36/testdata/testinput11 inflating: pcre-8.36/testdata/testinput4 inflating: pcre-8.36/testdata/saved32LE-2 inflating: pcre-8.36/testdata/grepinput inflating: pcre-8.36/testdata/testoutput21-16 inflating: pcre-8.36/testdata/wintestinput3 inflating: pcre-8.36/testdata/testinputEBC inflating: pcre-8.36/testdata/testinput14 inflating: pcre-8.36/testdata/testoutput22-16 inflating: pcre-8.36/testdata/testoutput11-32 inflating: pcre-8.36/testdata/testoutput1 inflating: pcre-8.36/testdata/testinput19 inflating: pcre-8.36/testdata/testoutput11-16 inflating: pcre-8.36/testdata/testoutput17 inflating: pcre-8.36/pcre32_config.c inflating: pcre-8.36/RunTest inflating: pcre-8.36/pcregrep.c inflating: pcre-8.36/pcrecpp_unittest.cc inflating: pcre-8.36/pcre_dfa_exec.c inflating: pcre-8.36/pcre_globals.c inflating: pcre-8.36/pcre32_ord2utf32.c inflating: pcre-8.36/pcre_xclass.c inflating: pcre-8.36/config.h.in inflating: pcre-8.36/pcre_internal.h inflating: pcre-8.36/pcre32_refcount.c inflating: pcre-8.36/pcre16_ucd.c inflating: pcre-8.36/pcre32_jit_compile.c inflating: pcre-8.36/pcre_ucd.c inflating: pcre-8.36/AUTHORS inflating: pcre-8.36/Detrail inflating: pcre-8.36/pcre16_version.c inflating: pcre-8.36/NON-AUTOTOOLS-BUILD inflating: pcre-8.36/ltmain.sh inflating: pcre-8.36/pcre_scanner_unittest.cc inflating: pcre-8.36/pcre32_printint.c inflating: pcre-8.36/pcre16_printint.c inflating: pcre-8.36/NEWS inflating: pcre-8.36/pcre32_version.c inflating: pcre-8.36/pcre.h.in inflating: pcre-8.36/libpcrecpp.pc.in inflating: pcre-8.36/pcre_chartables.c.dist inflating: pcre-8.36/pcre.h.generic creating: pcre-8.36/doc/ inflating: pcre-8.36/doc/pcre.txt inflating: pcre-8.36/doc/pcre_fullinfo.3 inflating: pcre-8.36/doc/pcre_jit_exec.3 inflating: pcre-8.36/doc/pcre_version.3 inflating: pcre-8.36/doc/pcre_assign_jit_stack.3 inflating: pcre-8.36/doc/pcre_compile2.3 inflating: pcre-8.36/doc/pcretest.txt inflating: pcre-8.36/doc/pcre-config.txt inflating: pcre-8.36/doc/pcre_get_substring_list.3 inflating: pcre-8.36/doc/pcrematching.3 inflating: pcre-8.36/doc/pcre_copy_named_substring.3 inflating: pcre-8.36/doc/pcresample.3 inflating: pcre-8.36/doc/pcre_free_substring_list.3 inflating: pcre-8.36/doc/pcreprecompile.3 inflating: pcre-8.36/doc/pcre_utf32_to_host_byte_order.3 inflating: pcre-8.36/doc/pcre_config.3 inflating: pcre-8.36/doc/pcresyntax.3 inflating: pcre-8.36/doc/pcreapi.3 inflating: pcre-8.36/doc/pcre_pattern_to_host_byte_order.3 inflating: pcre-8.36/doc/pcrecallout.3 inflating: pcre-8.36/doc/pcregrep.1 creating: pcre-8.36/doc/html/ inflating: pcre-8.36/doc/html/pcre_maketables.html inflating: pcre-8.36/doc/html/pcre-config.html inflating: pcre-8.36/doc/html/pcre_get_stringtable_entries.html inflating: pcre-8.36/doc/html/index.html inflating: pcre-8.36/doc/html/pcre_pattern_to_host_byte_order.html inflating: pcre-8.36/doc/html/pcreperform.html inflating: pcre-8.36/doc/html/pcre_get_substring_list.html inflating: pcre-8.36/doc/html/pcreposix.html inflating: pcre-8.36/doc/html/pcre_free_study.html inflating: pcre-8.36/doc/html/pcrecpp.html inflating: pcre-8.36/doc/html/pcrecompat.html inflating: pcre-8.36/doc/html/pcre_compile.html inflating: pcre-8.36/doc/html/pcre_config.html inflating: pcre-8.36/doc/html/pcre_get_named_substring.html inflating: pcre-8.36/doc/html/pcretest.html inflating: pcre-8.36/doc/html/pcre_compile2.html inflating: pcre-8.36/doc/html/pcre_version.html inflating: pcre-8.36/doc/html/pcrestack.html inflating: pcre-8.36/doc/html/pcre_copy_named_substring.html inflating: pcre-8.36/doc/html/pcre_utf32_to_host_byte_order.html inflating: pcre-8.36/doc/html/pcre16.html inflating: pcre-8.36/doc/html/pcre_jit_stack_alloc.html inflating: pcre-8.36/doc/html/pcre_utf16_to_host_byte_order.html inflating: pcre-8.36/doc/html/pcre_jit_stack_free.html inflating: pcre-8.36/doc/html/pcrecallout.html inflating: pcre-8.36/doc/html/pcre.html inflating: pcre-8.36/doc/html/pcre_refcount.html inflating: pcre-8.36/doc/html/pcrepattern.html inflating: pcre-8.36/doc/html/pcreprecompile.html inflating: pcre-8.36/doc/html/pcre_get_stringnumber.html inflating: pcre-8.36/doc/html/pcresample.html inflating: pcre-8.36/doc/html/pcre_exec.html inflating: pcre-8.36/doc/html/pcre_assign_jit_stack.html inflating: pcre-8.36/doc/html/README.txt inflating: pcre-8.36/doc/html/pcre_copy_substring.html inflating: pcre-8.36/doc/html/pcre_get_substring.html inflating: pcre-8.36/doc/html/pcrejit.html inflating: pcre-8.36/doc/html/pcreunicode.html inflating: pcre-8.36/doc/html/pcrelimits.html inflating: pcre-8.36/doc/html/pcre_fullinfo.html inflating: pcre-8.36/doc/html/NON-AUTOTOOLS-BUILD.txt inflating: pcre-8.36/doc/html/pcrebuild.html inflating: pcre-8.36/doc/html/pcreapi.html inflating: pcre-8.36/doc/html/pcre_study.html inflating: pcre-8.36/doc/html/pcre_jit_exec.html inflating: pcre-8.36/doc/html/pcrepartial.html inflating: pcre-8.36/doc/html/pcregrep.html inflating: pcre-8.36/doc/html/pcresyntax.html inflating: pcre-8.36/doc/html/pcre_free_substring.html inflating: pcre-8.36/doc/html/pcre_free_substring_list.html inflating: pcre-8.36/doc/html/pcre32.html inflating: pcre-8.36/doc/html/pcredemo.html inflating: pcre-8.36/doc/html/pcre_dfa_exec.html inflating: pcre-8.36/doc/html/pcrematching.html inflating: pcre-8.36/doc/pcreperform.3 inflating: pcre-8.36/doc/pcre_compile.3 inflating: pcre-8.36/doc/pcre_get_stringnumber.3 inflating: pcre-8.36/doc/index.html.src inflating: pcre-8.36/doc/pcre_free_substring.3 inflating: pcre-8.36/doc/pcre_maketables.3 inflating: pcre-8.36/doc/pcre_jit_stack_free.3 inflating: pcre-8.36/doc/pcre_get_substring.3 inflating: pcre-8.36/doc/pcre16.3 inflating: pcre-8.36/doc/pcre32.3 inflating: pcre-8.36/doc/pcre_get_named_substring.3 inflating: pcre-8.36/doc/pcre_exec.3 inflating: pcre-8.36/doc/pcre_get_stringtable_entries.3 inflating: pcre-8.36/doc/pcre.3 inflating: pcre-8.36/doc/pcre-config.1 inflating: pcre-8.36/doc/pcrecompat.3 inflating: pcre-8.36/doc/pcrestack.3 inflating: pcre-8.36/doc/pcre_dfa_exec.3 inflating: pcre-8.36/doc/perltest.txt inflating: pcre-8.36/doc/pcreunicode.3 inflating: pcre-8.36/doc/pcre_study.3 inflating: pcre-8.36/doc/pcreposix.3 inflating: pcre-8.36/doc/pcrepartial.3 inflating: pcre-8.36/doc/pcrelimits.3 inflating: pcre-8.36/doc/pcredemo.3 inflating: pcre-8.36/doc/pcretest.1 inflating: pcre-8.36/doc/pcre_refcount.3 inflating: pcre-8.36/doc/pcrepattern.3 inflating: pcre-8.36/doc/pcre_utf16_to_host_byte_order.3 inflating: pcre-8.36/doc/pcrejit.3 inflating: pcre-8.36/doc/pcrecpp.3 inflating: pcre-8.36/doc/pcre_jit_stack_alloc.3 inflating: pcre-8.36/doc/pcrebuild.3 inflating: pcre-8.36/doc/pcre_free_study.3 inflating: pcre-8.36/doc/pcregrep.txt inflating: pcre-8.36/doc/pcre_copy_substring.3 inflating: pcre-8.36/NON-UNIX-USE inflating: pcre-8.36/pcre_byte_order.c inflating: pcre-8.36/pcredemo.c inflating: pcre-8.36/libpcre.pc.in inflating: pcre-8.36/pcre16_fullinfo.c inflating: pcre-8.36/RunGrepTest inflating: pcre-8.36/pcre16_exec.c inflating: pcre-8.36/pcre_maketables.c inflating: pcre-8.36/pcre_tables.c inflating: pcre-8.36/config.h.generic inflating: pcre-8.36/pcre_stringpiece.cc inflating: pcre-8.36/pcre_version.c inflating: pcre-8.36/CheckMan inflating: pcre-8.36/pcre32_globals.c inflating: pcre-8.36/pcre_config.c inflating: pcre-8.36/pcre16_valid_utf16.c inflating: pcre-8.36/pcre32_ucd.c inflating: pcre-8.36/makevp_l.txt [root@center software]# cd pcre-8.36 [root@center pcre-8.36]# ls 132html configure.ac m4 pcre16_fullinfo.c pcre16_xclass.c pcre32_string_utils.c pcrecpp_internal.h pcre_newline.c pcre_ucd.c aclocal.m4 COPYING Makefile.am pcre16_get.c pcre32_byte_order.c pcre32_study.c pcrecpp_unittest.cc pcre_ord2utf8.c pcre_valid_utf8.c ar-lib depcomp Makefile.in pcre16_globals.c pcre32_chartables.c pcre32_tables.c pcredemo.c pcreposix.c pcre_version.c AUTHORS Detrail makevp.bat pcre16_jit_compile.c pcre32_compile.c pcre32_ucd.c pcre_dfa_exec.c pcreposix.h pcre_xclass.c ChangeLog dftables.c makevp_c.txt pcre16_maketables.c pcre32_config.c pcre32_utf32_utils.c pcre_exec.c pcre_printint.c perltest.pl CheckMan doc makevp_l.txt pcre16_newline.c pcre32_dfa_exec.c pcre32_valid_utf32.c pcre_fullinfo.c pcre_refcount.c PrepareRelease CleanTxt HACKING missing pcre16_ord2utf16.c pcre32_exec.c pcre32_version.c pcre_get.c pcre_scanner.cc README cmake INSTALL NEWS pcre16_printint.c pcre32_fullinfo.c pcre32_xclass.c pcregexp.pas pcre_scanner.h RunGrepTest CMakeLists.txt install-sh NON-AUTOTOOLS-BUILD pcre16_refcount.c pcre32_get.c pcre_byte_order.c pcre_globals.c pcre_scanner_unittest.cc RunTest compile libpcre16.pc.in NON-UNIX-USE pcre16_string_utils.c pcre32_globals.c pcre_chartables.c.dist pcregrep.c pcre_stringpiece.cc RunTest.bat config-cmake.h.in libpcre32.pc.in pcre16_byte_order.c pcre16_study.c pcre32_jit_compile.c pcre_compile.c pcre.h.generic pcre_stringpiece.h.in sljit config.guess libpcrecpp.pc.in pcre16_chartables.c pcre16_tables.c pcre32_maketables.c pcre_config.c pcre.h.in pcre_stringpiece_unittest.cc testdata config.h.generic libpcre.pc.in pcre16_compile.c pcre16_ucd.c pcre32_newline.c pcre-config.in pcre_internal.h pcre_string_utils.c test-driver config.h.in libpcreposix.pc.in pcre16_config.c pcre16_utf16_utils.c pcre32_ord2utf32.c pcrecpparg.h.in pcre_jit_compile.c pcre_study.c ucp.h config.sub LICENCE pcre16_dfa_exec.c pcre16_valid_utf16.c pcre32_printint.c pcrecpp.cc pcre_jit_test.c pcre_tables.c configure ltmain.sh pcre16_exec.c pcre16_version.c pcre32_refcount.c pcrecpp.h pcre_maketables.c pcretest.c [root@center pcre-8.36]# [root@center pcre-8.36]# mkdir /usr/local/pcre [root@center pcre-8.36]# ./configure --prefix=/usr/local/pcre/; make; make install; |
Apache:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[root@center LAMP]# pwd /software/LAMP [root@center LAMP]# [root@center LAMP]# ls autoconf-2.69 freetype-2.5.3.tar.gz jpegsrc.v9a.tar.gz libmcrypt-2.5.8 libpng-1.6.15.tar.gz MySQL-5.6.21-1.rhel5.x86_64.rpm-bundle.tar zlib-1.2.8 autoconf-2.69.tar.gz httpd-2.4.10.tar.gz libgd-2.1.0-rc1 libmcrypt-2.5.8.tar.gz libxml2-2.9.2 php-5.6.3.tar.gz zlib-1.2.8.tar.gz freetype-2.5.3 jpeg-9a libgd-2.1.0-rc1.tar.gz libpng-1.6.15 libxml2-2.9.2.tar.gz phpMyAdmin-4.3.0-beta1-all-languages.zip [root@center LAMP]# [root@center LAMP]# tar -xf httpd-2.4.10.tar.gz [root@center LAMP]# cd httpd-2.4.10 [root@center httpd-2.4.10]# ls ABOUT_APACHE Apache.dsw build buildconf config.layout docs httpd.spec InstallBin.dsp LICENSE modules os README.platforms srclib VERSIONING acinclude.m4 apache_probes.d BuildAll.dsp CHANGES configure emacs-style include LAYOUT Makefile.in NOTICE README ROADMAP support Apache-apr2.dsw ap.d BuildBin.dsp CMakeLists.txt configure.in httpd.dsp INSTALL libhttpd.dsp Makefile.win NWGNUmakefile README.cmake server test [root@center httpd-2.4.10]# [root@center httpd-2.4.10]# mkdir /usr/local/apache [root@center httpd-2.4.10]# [root@center httpd-2.4.10]# ./configure --prefix=/usr/local/apache/ --enable-mods-shared=all --enable-deflate --enable-speling --enable-cache --enable-file-cache --enable-disk-cache --enable-mem-cache --enable-so --enable-expires=shared --enable-rewrite=shared --enable-static-support --sysconfdir=/etc/httpd --with-z=/usr/local/zlib/ --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/ --with-pcre=/usr/local/pcre/ --disable-userdir [root@center httpd-2.4.10]# make && make install |
Apache安装完成后:
1 2 3 4 5 |
[root@center httpd-2.4.10]# ls /usr/local/apache/ bin build cgi-bin error htdocs icons include logs man manual modules [root@center httpd-2.4.10]# ps -ef | grep apache root 6873 16188 0 14:52 pts/1 00:00:00 grep apache [root@center httpd-2.4.10]# |
启动Apache:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@center httpd-2.4.10]# cat /etc/httpd/httpd.conf | grep --color ServerName # ServerName gives the name and port that the server uses to identify itself. #ServerName www.example.com:80 ServerName Center:80 [root@center httpd-2.4.10]# /usr/local/apache/bin/apachectl start httpd (pid 6879) already running [root@center httpd-2.4.10]# [root@center httpd-2.4.10]# ps -ef | grep apache root 6879 1 0 14:52 ? 00:00:00 /usr/local/apache//bin/httpd -k start daemon 6880 6879 0 14:52 ? 00:00:00 /usr/local/apache//bin/httpd -k start daemon 6882 6879 0 14:52 ? 00:00:00 /usr/local/apache//bin/httpd -k start daemon 6883 6879 0 14:52 ? 00:00:00 /usr/local/apache//bin/httpd -k start root 6973 16188 0 14:54 pts/1 00:00:00 grep apache [root@center httpd-2.4.10]# [root@center httpd-2.4.10]# netstat -tupln | grep --color http tcp 0 0 :::80 :::* LISTEN 6879/httpd [root@center httpd-2.4.10]# |
浏览器访问:http://192.168.223.136/
设置开机启动Apache:
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@center httpd-2.4.10]# cat /etc/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local # Start Apache HTTP Server /usr/local/apache/bin/apachectl start [root@center httpd-2.4.10]# |
至此,Apache Http Server配置完成。
三、MySQL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
[root@center LAMP]# groupadd mysql [root@center LAMP]# useradd -g mysql mysql [root@center LAMP]# id mysql uid=500(mysql) gid=500(mysql) groups=500(mysql) [root@center LAMP]# [root@center LAMP]# passwd mysql Changing password for user mysql. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully. [root@center LAMP]# [root@center LAMP]# pwd /software/LAMP [root@center LAMP]# ls autoconf-2.69 freetype-2.5.3.tar.gz jpeg-9a libgd-2.1.0-rc1.tar.gz libpng-1.6.15 libxml2-2.9.2.tar.gz phpMyAdmin-4.3.0-beta1-all-languages.zip autoconf-2.69.tar.gz httpd-2.4.10 jpegsrc.v9a.tar.gz libmcrypt-2.5.8 libpng-1.6.15.tar.gz MySQL-5.6.21-1.rhel5.x86_64.rpm-bundle.tar zlib-1.2.8 freetype-2.5.3 httpd-2.4.10.tar.gz libgd-2.1.0-rc1 libmcrypt-2.5.8.tar.gz libxml2-2.9.2 php-5.6.3.tar.gz zlib-1.2.8.tar.gz [root@center LAMP]# [root@center LAMP]# tar -xf MySQL-5.6.21-1.rhel5.x86_64.rpm-bundle.tar [root@center LAMP]# ls -altr total 666812 -rw-r--r-- 1 7155 wheel 23156366 Sep 12 16:25 MySQL-client-5.6.21-1.rhel5.x86_64.rpm -rw-r--r-- 1 7155 wheel 4579502 Sep 12 16:25 MySQL-devel-5.6.21-1.rhel5.x86_64.rpm -rw-r--r-- 1 7155 wheel 117279604 Sep 12 16:26 MySQL-embedded-5.6.21-1.rhel5.x86_64.rpm -rw-r--r-- 1 7155 wheel 88524802 Sep 12 16:27 MySQL-server-5.6.21-1.rhel5.x86_64.rpm -rw-r--r-- 1 7155 wheel 2404168 Sep 12 16:27 MySQL-shared-5.6.21-1.rhel5.x86_64.rpm -rw-r--r-- 1 7155 wheel 75030266 Sep 12 16:28 MySQL-test-5.6.21-1.rhel5.x86_64.rpm -rw-r--r-- 1 7155 wheel 5199239 Sep 23 22:01 MySQL-shared-compat-5.6.21-1.rhel5.x86_64.rpm -rw-r--r-- 1 root root 5444991 Nov 21 12:45 libxml2-2.9.2.tar.gz -rw-r--r-- 1 root root 1361191 Nov 21 12:45 libpng-1.6.15.tar.gz -rw-r--r-- 1 root root 1335178 Nov 21 12:45 libmcrypt-2.5.8.tar.gz -rw-r--r-- 1 root root 1889499 Nov 21 12:45 libgd-2.1.0-rc1.tar.gz -rw-r--r-- 1 root root 1000034 Nov 21 12:45 jpegsrc.v9a.tar.gz -rw-r--r-- 1 root root 6820719 Nov 21 12:45 httpd-2.4.10.tar.gz -rw-r--r-- 1 root root 2267172 Nov 21 12:45 freetype-2.5.3.tar.gz -rw-r--r-- 1 root root 1927468 Nov 21 12:45 autoconf-2.69.tar.gz -rw-r--r-- 1 root root 17514721 Nov 21 12:45 php-5.6.3.tar.gz -rw-r--r-- 1 root root 571091 Nov 21 12:45 zlib-1.2.8.tar.gz -rw-r--r-- 1 root root 9468454 Nov 21 12:45 phpMyAdmin-4.3.0-beta1-all-languages.zip -rw-r--r-- 1 root root 316180480 Nov 21 12:46 MySQL-5.6.21-1.rhel5.x86_64.rpm-bundle.tar drwxrwxr-x 18 mysql mysql 12288 Nov 21 13:06 libxml2-2.9.2 drwxrwxrwx 9 mysql adm 4096 Nov 21 13:11 libmcrypt-2.5.8 drwxr-xr-x 14 501 games 4096 Nov 21 14:09 zlib-1.2.8 drwxr-xr-x 9 1004 5101 4096 Nov 21 14:11 libpng-1.6.15 drwxr-xr-x 4 mysql users 12288 Nov 21 14:14 jpeg-9a drwxr-xr-x 8 1000 users 4096 Nov 21 14:16 freetype-2.5.3 drwxrwxr-x 9 root root 4096 Nov 21 14:17 autoconf-2.69 drwxr-xr-x 13 1000 1000 4096 Nov 21 14:20 libgd-2.1.0-rc1 drwxr-xr-x 6 root root 4096 Nov 21 14:44 .. drwxr-xr-x 12 501 games 4096 Nov 21 14:50 httpd-2.4.10 drwxr-xr-x 11 root root 4096 Nov 21 15:11 . [root@center LAMP]# |
安装:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
[root@center LAMP]# rpm -ivh MySQL-*.rpm Preparing... ########################################### [100%] 1:MySQL-client ########################################### [ 14%] 2:MySQL-devel ########################################### [ 29%] 3:MySQL-embedded ########################################### [ 43%] 4:MySQL-server ########################################### [ 57%] 2014-11-21 15:13:57 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2014-11-21 15:13:57 7064 [Note] InnoDB: Using atomics to ref count buffer pool pages 2014-11-21 15:13:57 7064 [Note] InnoDB: The InnoDB memory heap is disabled 2014-11-21 15:13:57 7064 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2014-11-21 15:13:57 7064 [Note] InnoDB: Memory barrier is not used 2014-11-21 15:13:57 7064 [Note] InnoDB: Compressed tables use zlib 1.2.3 2014-11-21 15:13:57 7064 [Note] InnoDB: Using Linux native AIO 2014-11-21 15:13:57 7064 [Note] InnoDB: Using CPU crc32 instructions 2014-11-21 15:13:57 7064 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2014-11-21 15:13:57 7064 [Note] InnoDB: Completed initialization of buffer pool 2014-11-21 15:13:57 7064 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created! 2014-11-21 15:13:57 7064 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB 2014-11-21 15:13:57 7064 [Note] InnoDB: Database physically writes the file full: wait... 2014-11-21 15:13:57 7064 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB 2014-11-21 15:13:57 7064 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB 2014-11-21 15:13:57 7064 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 2014-11-21 15:13:57 7064 [Warning] InnoDB: New log files created, LSN=45781 2014-11-21 15:13:57 7064 [Note] InnoDB: Doublewrite buffer not found: creating new 2014-11-21 15:13:57 7064 [Note] InnoDB: Doublewrite buffer created 2014-11-21 15:13:57 7064 [Note] InnoDB: 128 rollback segment(s) are active. 2014-11-21 15:13:57 7064 [Warning] InnoDB: Creating foreign key constraint system tables. 2014-11-21 15:13:57 7064 [Note] InnoDB: Foreign key constraint system tables created 2014-11-21 15:13:57 7064 [Note] InnoDB: Creating tablespace and datafile system tables. 2014-11-21 15:13:57 7064 [Note] InnoDB: Tablespace and datafile system tables created. 2014-11-21 15:13:57 7064 [Note] InnoDB: Waiting for purge to start 2014-11-21 15:13:57 7064 [Note] InnoDB: 5.6.21 started; log sequence number 0 A random root password has been set. You will find it in '/root/.mysql_secret'. 2014-11-21 15:13:58 7064 [Note] Binlog end 2014-11-21 15:13:58 7064 [Note] InnoDB: FTS optimize thread exiting. 2014-11-21 15:13:58 7064 [Note] InnoDB: Starting shutdown... 2014-11-21 15:14:00 7064 [Note] InnoDB: Shutdown completed; log sequence number 1625977 2014-11-21 15:14:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2014-11-21 15:14:00 7086 [Note] InnoDB: Using atomics to ref count buffer pool pages 2014-11-21 15:14:00 7086 [Note] InnoDB: The InnoDB memory heap is disabled 2014-11-21 15:14:00 7086 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2014-11-21 15:14:00 7086 [Note] InnoDB: Memory barrier is not used 2014-11-21 15:14:00 7086 [Note] InnoDB: Compressed tables use zlib 1.2.3 2014-11-21 15:14:00 7086 [Note] InnoDB: Using Linux native AIO 2014-11-21 15:14:00 7086 [Note] InnoDB: Using CPU crc32 instructions 2014-11-21 15:14:00 7086 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2014-11-21 15:14:00 7086 [Note] InnoDB: Completed initialization of buffer pool 2014-11-21 15:14:00 7086 [Note] InnoDB: Highest supported file format is Barracuda. 2014-11-21 15:14:00 7086 [Note] InnoDB: 128 rollback segment(s) are active. 2014-11-21 15:14:00 7086 [Note] InnoDB: Waiting for purge to start 2014-11-21 15:14:00 7086 [Note] InnoDB: 5.6.21 started; log sequence number 1625977 2014-11-21 15:14:00 7086 [Note] Binlog end 2014-11-21 15:14:00 7086 [Note] InnoDB: FTS optimize thread exiting. 2014-11-21 15:14:00 7086 [Note] InnoDB: Starting shutdown... 2014-11-21 15:14:02 7086 [Note] InnoDB: Shutdown completed; log sequence number 1625987 A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER ! You will find that password in '/root/.mysql_secret'. You must change that password on your first connect, no other statement but 'SET PASSWORD' will be accepted. See the manual for the semantics of the 'password expired' flag. Also, the account for the anonymous user has been removed. In addition, you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test database. This is strongly recommended for production servers. See the manual for more instructions. Please report any problems at http://bugs.mysql.com/ The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com New default config file was created as /usr/my.cnf and will be used by default by the server when you start it. You may edit this file to change server settings 5:MySQL-shared ########################################### [ 71%] 6:MySQL-shared-compat ########################################### [ 86%] 7:MySQL-test ########################################### [100%] [root@center LAMP]# |
运行MySQL:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@center LAMP]# ps -ef | grep mysql root 7128 16188 0 15:16 pts/1 00:00:00 grep mysql [root@center LAMP]# [root@center LAMP]# service mysql status MySQL is not running [FAILED] [root@center LAMP]# service mysql start Starting MySQL. [ OK ] [root@center LAMP]# ps -ef | grep mysql root 7162 1 0 15:16 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/center.pid mysql 7265 7162 5 15:16 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/center.err --pid-file=/var/lib/mysql/center.pid root 7292 16188 0 15:16 pts/1 00:00:00 grep mysql [root@center LAMP]# [root@center LAMP]# netstat -tupln | grep mysql tcp 0 0 :::3306 :::* LISTEN 7265/mysqld [root@center LAMP]# |
连接与使用:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
[root@center local]# cat /root/.mysql_secret # The random password set for the root user at Fri Nov 21 15:13:58 2014 (local time): vJ_EUP4_ixwowhek [root@center local]# mysql -uroot -pvJ_EUP4_ixwowhek Warning: Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 5.6.21 Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> help; For information about MySQL products and services, visit: http://www.mysql.com/ For developer information, including the MySQL Reference Manual, visit: http://dev.mysql.com/ To buy MySQL Enterprise support, training, or other products, visit: https://shop.mysql.com/ List of all MySQL commands: Note that all text commands must be first on line and end with ';' ? (\?) Synonym for `help'. clear (\c) Clear the current input statement. connect (\r) Reconnect to the server. Optional arguments are db and host. delimiter (\d) Set statement delimiter. edit (\e) Edit command with $EDITOR. ego (\G) Send command to mysql server, display result vertically. exit (\q) Exit mysql. Same as quit. go (\g) Send command to mysql server. help (\h) Display this help. nopager (\n) Disable pager, print to stdout. notee (\t) Don't write into outfile. pager (\P) Set PAGER [to_pager]. Print the query results via PAGER. print (\p) Print current command. prompt (\R) Change your mysql prompt. quit (\q) Quit mysql. rehash (\#) Rebuild completion hash. source (\.) Execute an SQL script file. Takes a file name as an argument. status (\s) Get status information from the server. system (\!) Execute a system shell command. tee (\T) Set outfile [to_outfile]. Append everything into given outfile. use (\u) Use another database. Takes database name as argument. charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets. warnings (\W) Show warnings after every statement. nowarning (\w) Don't show warnings after every statement. For server side help, type 'help contents' mysql> mysql> status ERROR 1820 (HY000): You must SET PASSWORD before executing this statement mysql> mysql> set password for 'root'@'localhost' = password('oracle'); Query OK, 0 rows affected (0.09 sec) mysql> mysql> status -------------- mysql Ver 14.14 Distrib 5.6.21, for Linux (x86_64) using EditLine wrapper Connection id: 8 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.6.21 Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: utf8 Conn. characterset: utf8 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 5 min 39 sec Threads: 1 Questions: 11 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.032 -------------- mysql> |
MySQLAdmin:
1 2 3 4 |
[root@center local]# mysqladmin --password status Enter password: Uptime: 1238 Threads: 1 Questions: 28 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.022 [root@center local]# |
设为开机启动MySQL:
1 2 3 |
[root@center local]# chkconfig --list mysql mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@center local]# |
四、PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
[root@center local]# cd /software/LAMP/ [root@center LAMP]# ls autoconf-2.69 httpd-2.4.10 libgd-2.1.0-rc1 libpng-1.6.15 MySQL-5.6.21-1.rhel5.x86_64.rpm-bundle.tar MySQL-server-5.6.21-1.rhel5.x86_64.rpm php-5.6.3.tar.gz autoconf-2.69.tar.gz httpd-2.4.10.tar.gz libgd-2.1.0-rc1.tar.gz libpng-1.6.15.tar.gz MySQL-client-5.6.21-1.rhel5.x86_64.rpm MySQL-shared-5.6.21-1.rhel5.x86_64.rpm phpMyAdmin-4.3.0-beta1-all-languages.zip freetype-2.5.3 jpeg-9a libmcrypt-2.5.8 libxml2-2.9.2 MySQL-devel-5.6.21-1.rhel5.x86_64.rpm MySQL-shared-compat-5.6.21-1.rhel5.x86_64.rpm zlib-1.2.8 freetype-2.5.3.tar.gz jpegsrc.v9a.tar.gz libmcrypt-2.5.8.tar.gz libxml2-2.9.2.tar.gz MySQL-embedded-5.6.21-1.rhel5.x86_64.rpm MySQL-test-5.6.21-1.rhel5.x86_64.rpm zlib-1.2.8.tar.gz [root@center LAMP]# [root@center LAMP]# tar -xf php-5.6.3.tar.gz [root@center LAMP]# cd php-5.6.3 [root@center php-5.6.3]# ls acinclude.m4 config.sub generated_lists main mkinstalldirs php.ini-production README.NEW-OUTPUT-API README.TESTING server-tests-config.php TSRM aclocal.m4 configure genfiles makedist netware README.EXT_SKEL README.PARAMETER_PARSING_API README.TESTING2 server-tests.php UPGRADING build configure.in header Makefile.frag NEWS README.GIT-RULES README.REDIST.BINS README.UNIX-BUILD-SYSTEM snapshot UPGRADING.INTERNALS buildconf CREDITS INSTALL Makefile.gcov pear README.input_filter README.RELEASE_PROCESS README.WIN32-BUILD-SYSTEM stamp-h.in vcsclean buildconf.bat ext install-sh Makefile.global php5.spec.in README.MAILINGLIST_RULES README.SELF-CONTAINED-EXTENSIONS run-tests.php stub.c win32 CODING_STANDARDS EXTENSIONS LICENSE makerpm php.gif README.md README.STREAMS sapi tests Zend config.guess footer ltmain.sh missing php.ini-development README.namespaces README.SUBMITTING_PATCH scripts travis [root@center php-5.6.3]# [root@center php-5.6.3]# mkdir /usr/local/php [root@center php-5.6.3]# [root@center php-5.6.3]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache/bin/apxs --with-mysql --with-libxml-dir=/usr/local/libxml2/ --with-png-dir=/usr/local/libpng/ --with-jpeg-dir=/usr/local/jpeg/ --with-freetype-dir=/usr/local/freetype/ --with-gd --with-zlib-dir=/usr/local/zlib/ --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets (... ...etc) Generating files configure: creating ./config.status creating main/internal_functions.c creating main/internal_functions_cli.c +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP. config.status: creating php5.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands [root@center php-5.6.3]# [root@center php-5.6.3]# make (... ...etc) .lo -lcrypt -lresolv -lcrypt -lrt -lmcrypt -lltdl -lpng -lz -ljpeg -lz -lrt -lm -ldl -lnsl -lxml2 -lm -ldl -lxml2 -lm -ldl -lfreetype -lz -lmysqlclient_r -lm -lrt -ldl -lxml2 -lm -ldl -lxml2 -lm -ldl -lcrypt -lxml2 -lm -ldl -lxml2 -lm -ldl -lxml2 -lm -ldl -lcrypt -o sapi/cgi/php-cgi Generating phar.php Generating phar.phar PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled. pharcommand.inc clicommand.inc directorygraphiterator.inc invertedregexiterator.inc directorytreeiterator.inc phar.inc Build complete. Don't forget to run 'make test'. [root@center php-5.6.3]# [root@center php-5.6.3]# make install Installing PHP SAPI module: apache2handler /usr/local/apache//build/instdso.sh SH_LIBTOOL='/usr/local/apr-httpd//build-1/libtool' libphp5.la /usr/local/apache//modules /usr/local/apr-httpd//build-1/libtool --mode=install install libphp5.la /usr/local/apache//modules/ libtool: install: install .libs/libphp5.so /usr/local/apache//modules/libphp5.so libtool: install: install .libs/libphp5.lai /usr/local/apache//modules/libphp5.la libtool: install: warning: remember to run `libtool --finish /software/LAMP/php-5.6.3/libs' chmod 755 /usr/local/apache//modules/libphp5.so [activating module `php5' in /etc/httpd/httpd.conf] Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-zts-20131226/ Installing PHP CLI binary: /usr/local/php/bin/ Installing PHP CLI man page: /usr/local/php/php/man/man1/ Installing PHP CGI binary: /usr/local/php/bin/ Installing PHP CGI man page: /usr/local/php/php/man/man1/ Installing build environment: /usr/local/php/lib/php/build/ Installing header files: /usr/local/php/include/php/ Installing helper programs: /usr/local/php/bin/ program: phpize program: php-config Installing man pages: /usr/local/php/php/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment: /usr/local/php/lib/php/ [PEAR] Archive_Tar - installed: 1.3.12 [PEAR] Console_Getopt - installed: 1.3.1 [PEAR] Structures_Graph- installed: 1.0.4 [PEAR] XML_Util - installed: 1.2.3 [PEAR] PEAR - installed: 1.9.5 Wrote PEAR system config file at: /usr/local/php/etc/pear.conf You may want to add: /usr/local/php/lib/php to your php.ini include_path /software/LAMP/php-5.6.3/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin ln -s -f /usr/local/php/bin/phar.phar /usr/local/php/bin/phar Installing PDO headers: /usr/local/php/include/php/ext/pdo/ [root@center php-5.6.3]# |
配置PHP:
PHP的配置文件存放在“–with-config-file-path”指定的位置。
即:/usr/local/php/etc/
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@center ~]# cd /software/LAMP/php-5.6.3 [root@center php-5.6.3]# ll -atr | grep php.ini -rw-r--r-- 1 1000 1000 72549 Nov 12 21:52 php.ini-production -rw-r--r-- 1 1000 1000 72592 Nov 12 21:52 php.ini-development [root@center php-5.6.3]# [root@center php-5.6.3]# cp php.ini-development /usr/local/php/etc/php.ini [root@center php-5.6.3]# [root@center php-5.6.3]# [root@center php-5.6.3]# cat /usr/local/php/etc/php.ini | grep --color date.timezone ; http://php.net/date.timezone date.timezone = "PRC" [root@center php-5.6.3]# |
配置Apache到PHP的关联:
1 2 3 4 |
[root@center ~]# cat /etc/httpd/httpd.conf | grep --color php LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php .php .phtml [root@center ~]# |
重启Apache,使上面的修改生效:
1 2 3 |
[root@center ~]# /usr/local/apache/bin/apachectl stop [root@center ~]# /usr/local/apache/bin/apachectl start [root@center ~]# |
创建PHP的样例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[root@center htdocs]# pwd /usr/local/apache/htdocs [root@center htdocs]# ll -atr total 16 -rw-r--r-- 1 root root 45 Jun 12 2007 index.html drwxr-xr-x 13 root root 4096 Nov 21 14:51 .. -rw-r--r-- 1 root root 20 Nov 21 16:35 php-me.php drwxr-xr-x 2 root root 4096 Nov 21 16:35 . [root@center htdocs]# [root@center htdocs]# cat php-me.php <?php phpinfo(); ?> [root@center htdocs]# |
浏览器访问:http://192.168.223.136/php-me.php
至此,LAMP环境已经部署完成。
五、PhpMyAdmin
关于安装介质以及部署:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
[root@center LAMP]# pwd /software/LAMP [root@center LAMP]# ls autoconf-2.69 jpeg-9a libpng-1.6.15 MySQL-devel-5.6.21-1.rhel5.x86_64.rpm php-5.6.3 autoconf-2.69.tar.gz jpegsrc.v9a.tar.gz libpng-1.6.15.tar.gz MySQL-embedded-5.6.21-1.rhel5.x86_64.rpm php-5.6.3.tar.gz freetype-2.5.3 libgd-2.1.0-rc1 libxml2-2.9.2 MySQL-server-5.6.21-1.rhel5.x86_64.rpm phpMyAdmin-4.3.0-beta1-all-languages freetype-2.5.3.tar.gz libgd-2.1.0-rc1.tar.gz libxml2-2.9.2.tar.gz MySQL-shared-5.6.21-1.rhel5.x86_64.rpm phpMyAdmin-4.3.0-beta1-all-languages.zip httpd-2.4.10 libmcrypt-2.5.8 MySQL-5.6.21-1.rhel5.x86_64.rpm-bundle.tar MySQL-shared-compat-5.6.21-1.rhel5.x86_64.rpm zlib-1.2.8 httpd-2.4.10.tar.gz libmcrypt-2.5.8.tar.gz MySQL-client-5.6.21-1.rhel5.x86_64.rpm MySQL-test-5.6.21-1.rhel5.x86_64.rpm zlib-1.2.8.tar.gz [root@center LAMP]# unzip phpMyAdmin-4.3.0-beta1-all-languages.zip [root@center LAMP]# [root@center LAMP]# cd phpMyAdmin-4.3.0-beta1-all-languages [root@center phpMyAdmin-4.3.0-beta1-all-languages]# ls browse_foreigners.php db_qbe.php import.php print.css server_status_monitor.php tbl_get_field.php themes ChangeLog db_routines.php import_status.php README server_status.php tbl_gis_visualization.php themes.php changelog.php db_search.php index.php RELEASE-DATE-4.3.0-beta1 server_status_processes.php tbl_import.php transformation_overview.php chk_rel.php db_sql_autocomplete.php js robots.txt server_status_queries.php tbl_indexes.php transformation_wrapper.php composer.json db_sql.php libraries schema_export.php server_status_variables.php tbl_operations.php url.php config.sample.inc.php db_structure.php LICENSE server_binlog.php server_user_groups.php tbl_printview.php user_password.php CONTRIBUTING.md db_tracking.php license.php server_collations.php server_variables.php tbl_recent_favorite.php version_check.php db_central_columns.php db_triggers.php locale server_databases.php setup tbl_relation.php view_create.php db_create.php DCO navigation.php server_engines.php show_config_errors.php tbl_replace.php view_operations.php db_datadict.php doc normalization.php server_export.php sql.php tbl_row_action.php webapp.php db_designer.php error_report.php phpinfo.php server_import.php tbl_addfield.php tbl_select.php db_events.php examples phpmyadmin.css.php server_plugins.php tbl_change.php tbl_sql.php db_export.php export.php phpunit.xml.hhvm server_privileges.php tbl_chart.php tbl_structure.php db_import.php favicon.ico phpunit.xml.nocoverage server_replication.php tbl_create.php tbl_tracking.php db_operations.php file_echo.php prefs_forms.php server_sql.php tbl_export.php tbl_triggers.php db_printview.php gis_data_editor.php prefs_manage.php server_status_advisor.php tbl_find_replace.php tbl_zoom_select.php [root@center phpMyAdmin-4.3.0-beta1-all-languages]# [root@center phpMyAdmin-4.3.0-beta1-all-languages]# mkdir /usr/local/apache/htdocs/phpmyadmin [root@center phpMyAdmin-4.3.0-beta1-all-languages]# cp -a /software/LAMP/phpMyAdmin-4.3.0-beta1-all-languages /usr/local/apache/htdocs/phpmyadmin [root@center phpMyAdmin-4.3.0-beta1-all-languages]# [root@center phpMyAdmin-4.3.0-beta1-all-languages]# ls /usr/local/apache/htdocs/phpmyadmin phpMyAdmin-4.3.0-beta1-all-languages [root@center phpMyAdmin-4.3.0-beta1-all-languages]# [root@center phpMyAdmin-4.3.0-beta1-all-languages]# cd /usr/local/apache/htdocs/phpmyadmin [root@center phpmyadmin]# cd phpMyAdmin-4.3.0-beta1-all-languages/ [root@center phpMyAdmin-4.3.0-beta1-all-languages]# ls browse_foreigners.php db_qbe.php import.php print.css server_status_monitor.php tbl_get_field.php themes ChangeLog db_routines.php import_status.php README server_status.php tbl_gis_visualization.php themes.php changelog.php db_search.php index.php RELEASE-DATE-4.3.0-beta1 server_status_processes.php tbl_import.php transformation_overview.php chk_rel.php db_sql_autocomplete.php js robots.txt server_status_queries.php tbl_indexes.php transformation_wrapper.php composer.json db_sql.php libraries schema_export.php server_status_variables.php tbl_operations.php url.php config.sample.inc.php db_structure.php LICENSE server_binlog.php server_user_groups.php tbl_printview.php user_password.php CONTRIBUTING.md db_tracking.php license.php server_collations.php server_variables.php tbl_recent_favorite.php version_check.php db_central_columns.php db_triggers.php locale server_databases.php setup tbl_relation.php view_create.php db_create.php DCO navigation.php server_engines.php show_config_errors.php tbl_replace.php view_operations.php db_datadict.php doc normalization.php server_export.php sql.php tbl_row_action.php webapp.php db_designer.php error_report.php phpinfo.php server_import.php tbl_addfield.php tbl_select.php db_events.php examples phpmyadmin.css.php server_plugins.php tbl_change.php tbl_sql.php db_export.php export.php phpunit.xml.hhvm server_privileges.php tbl_chart.php tbl_structure.php db_import.php favicon.ico phpunit.xml.nocoverage server_replication.php tbl_create.php tbl_tracking.php db_operations.php file_echo.php prefs_forms.php server_sql.php tbl_export.php tbl_triggers.php db_printview.php gis_data_editor.php prefs_manage.php server_status_advisor.php tbl_find_replace.php tbl_zoom_select.php [root@center phpMyAdmin-4.3.0-beta1-all-languages]# mv * ../ [root@center phpMyAdmin-4.3.0-beta1-all-languages]# ls [root@center phpMyAdmin-4.3.0-beta1-all-languages]# cd .. [root@center phpmyadmin]# ls browse_foreigners.php db_qbe.php import.php prefs_manage.php server_status_advisor.php tbl_find_replace.php tbl_zoom_select.php ChangeLog db_routines.php import_status.php print.css server_status_monitor.php tbl_get_field.php themes changelog.php db_search.php index.php README server_status.php tbl_gis_visualization.php themes.php chk_rel.php db_sql_autocomplete.php js RELEASE-DATE-4.3.0-beta1 server_status_processes.php tbl_import.php transformation_overview.php composer.json db_sql.php libraries robots.txt server_status_queries.php tbl_indexes.php transformation_wrapper.php config.sample.inc.php db_structure.php LICENSE schema_export.php server_status_variables.php tbl_operations.php url.php CONTRIBUTING.md db_tracking.php license.php server_binlog.php server_user_groups.php tbl_printview.php user_password.php db_central_columns.php db_triggers.php locale server_collations.php server_variables.php tbl_recent_favorite.php version_check.php db_create.php DCO navigation.php server_databases.php setup tbl_relation.php view_create.php db_datadict.php doc normalization.php server_engines.php show_config_errors.php tbl_replace.php view_operations.php db_designer.php error_report.php phpinfo.php server_export.php sql.php tbl_row_action.php webapp.php db_events.php examples phpMyAdmin-4.3.0-beta1-all-languages server_import.php tbl_addfield.php tbl_select.php db_export.php export.php phpmyadmin.css.php server_plugins.php tbl_change.php tbl_sql.php db_import.php favicon.ico phpunit.xml.hhvm server_privileges.php tbl_chart.php tbl_structure.php db_operations.php file_echo.php phpunit.xml.nocoverage server_replication.php tbl_create.php tbl_tracking.php db_printview.php gis_data_editor.php prefs_forms.php server_sql.php tbl_export.php tbl_triggers.php [root@center phpmyadmin]# |
配置phpMyAdmin:
1 2 3 4 5 6 7 8 9 |
[root@center phpmyadmin]# pwd /usr/local/apache/htdocs/phpmyadmin [root@center phpmyadmin]# [root@center phpmyadmin]# ll | grep --color config -rw-r--r-- 1 root root 4437 Nov 20 08:20 config.sample.inc.php -rw-r--r-- 1 root root 1039 Nov 20 08:20 show_config_errors.php [root@center phpmyadmin]# [root@center phpmyadmin]# cp config.sample.inc.php config.inc.php [root@center phpmyadmin]# |
文件:config.inc.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
[root@center phpmyadmin]# cat config.inc.php <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * phpMyAdmin sample configuration, you can use it as base for * manual configuration. For easier setup you can use setup/ * * All directives are explained in documentation in the doc/ folder * or at <http://docs.phpmyadmin.net/>. * * @package PhpMyAdmin */ /* * This is needed for cookie based authentication to encrypt password in * cookie */ $cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ /* * Servers configuration */ $i = 0; /* * First server */ $i++; /* Authentication type */ /* $cfg['Servers'][$i]['auth_type'] = 'cookie'; */ $cfg['Servers'][$i]['auth_type'] = 'config'; /* Server parameters */ $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['AllowNoPassword'] = false; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'oracle'; /* * phpMyAdmin configuration storage settings. */ /* User used to manipulate with storage */ // $cfg['Servers'][$i]['controlhost'] = ''; // $cfg['Servers'][$i]['controlport'] = ''; // $cfg['Servers'][$i]['controluser'] = 'pma'; // $cfg['Servers'][$i]['controlpass'] = 'pmapass'; /* Storage database and tables */ // $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; // $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; // $cfg['Servers'][$i]['relation'] = 'pma__relation'; // $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; // $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; // $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; // $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; // $cfg['Servers'][$i]['history'] = 'pma__history'; // $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; // $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; // $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; // $cfg['Servers'][$i]['recent'] = 'pma__recent'; // $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; // $cfg['Servers'][$i]['users'] = 'pma__users'; // $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; // $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; // $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; // $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; /* Contrib / Swekey authentication */ // $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf'; /* * End of servers configuration */ /* * Directories for saving/loading files from server */ $cfg['UploadDir'] = ''; $cfg['SaveDir'] = ''; /** * Whether to display icons or text or both icons and text in table row * action segment. Value can be either of 'icons', 'text' or 'both'. */ //$cfg['RowActionType'] = 'both'; /** * Defines whether a user should be displayed a "show all (records)" * button in browse mode or not. * default = false */ //$cfg['ShowAll'] = true; /** * Number of rows displayed when browsing a result set. If the result * set contains more rows, "Previous" and "Next". * default = 30 */ //$cfg['MaxRows'] = 50; /** * disallow editing of binary fields * valid values are: * false allow editing * 'blob' allow editing except for BLOB fields * 'noblob' disallow editing except for BLOB fields * 'all' disallow editing * default = blob */ //$cfg['ProtectBinary'] = 'false'; /** * Default language to use, if not browser-defined or user-defined * (you find all languages in the locale folder) * uncomment the desired line: * default = 'en' */ //$cfg['DefaultLang'] = 'en'; //$cfg['DefaultLang'] = 'de'; /** * default display direction (horizontal|vertical|horizontalflipped) */ //$cfg['DefaultDisplay'] = 'vertical'; /** * How many columns should be used for table display of a database? * (a value larger than 1 results in some information being hidden) * default = 1 */ //$cfg['PropertiesNumColumns'] = 2; /** * Set to true if you want DB-based query history.If false, this utilizes * JS-routines to display query history (lost by window close) * * This requires configuration storage enabled, see above. * default = false */ //$cfg['QueryHistoryDB'] = true; /** * When using DB-based query history, how many entries should be kept? * * default = 25 */ //$cfg['QueryHistoryMax'] = 100; /** * Should error reporting be enabled for JavaScript errors * * default = 'ask' */ //$cfg['SendErrorReports'] = 'ask'; /* * You can find more configuration options in the documentation * in the doc/ folder or at <http://docs.phpmyadmin.net/>. */ ?> [root@center phpmyadmin]# |
浏览器访问:http://192.168.223.136/phpmyadmin/index.php
至此,phpMyadmin配置完成。
————————————————————————————
Ending。
上述编译中JPEG:
[root@center-system jpeg-9a]# ./configure –prefix=/usr/local/jpeg –enable-shared –enable-static
Re Read,Done.
My Local LAMP env is Ready.
编译PHP时:
Configure阶段:
./configure –prefix=/usr/local/php/ –with-config-file-path=/usr/local/php/etc –with-apxs2=/usr/local/apache/bin/apxs –with-mysql –with-libxml-dir=/usr/lib/ –with-png-dir=/usr/include/ –with-jpeg-dir=/usr/local/jpeg/ –with-freetype-dir=/usr/lib –with-gd –with-zlib-dir=/usr/include –with-mcrypt=/usr/local/libmcrypt/ –with-mysqli=/usr/bin/mysql_config –enable-soap –enable-mbstring=all –enable-sockets –enable-zip
–enable-ftp
–enable-dtrace
————————
可以尝试如上的方式增加对FTP以及D-Trace的支持。
2014年11月29日10:49:19
稍后会列出可能出现的另一个问题的解答“Index of /wordpress”
PHP源码编译前:
yum install -y libxml2 libxml2-devel