加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

移植Sqlite2+PHP5.2+apache1.3到ARM平台

发布时间:2020-12-12 19:32:01 所属栏目:百科 来源:网络整理
导读:提醒:在整个移植的过程中注意各软件包的版本 本文中Sqlite使用的是Sqlite2.8.17.tar.gz,Apache使用的是1.3.39,PHP使用的5.2.13 一:Sqlite数据库移植 1)下载sqlite2.8.17.tar.gz,(版本号至少应该保存前两位对应) 2)把这个压缩包放到/home/chen的目录

提醒:在整个移植的过程中注意各软件包的版本

本文中Sqlite使用的是Sqlite2.8.17.tar.gz,Apache使用的是1.3.39,PHP使用的5.2.13

一:Sqlite数据库移植

1)下载sqlite2.8.17.tar.gz,(版本号至少应该保存前两位对应)

2)把这个压缩包放到/home/chen的目录下,并且解压。再建立一个sqlite目录,作为安装目录。

3)进入到sqlite2.8.17目录下,执行如下命令

CC=arm-linux-gcc ./configure --prefix=/home/chen/sqlite --host=arm-linux

4)make 5)make install 。安装成功后,在sqlite这个目录下有三个文件夹:bin、lib、include

6)进入lib目录中,arm-linux-strip libsqlite.so.0.8.6

7)将bin目录下的sqlite拷贝到目标板的/usr/bin目录下。

8)将lib目录下的libsqlite.so.0.8.6拷贝到/usr/lib目录下。

9)登录到开发板中,进入/usr/lib目录,创建一个符号链接ln -s libsqlite.so.8.6 libsqlite.so.0

到此sqlite数据库就算是移植完毕了。在开发板上面运行sqlite看到如下画面,则sqlite安装成功


二:Apache服务器移植

1)下载apache1.3.39的软件包。apache1.3.39.tar.gz,注意版本的移植性。

2)在/home/chen/目录下建立两个文件夹:arm和source

3)把软件包分别拷贝到arm与source这两个文件夹中,并使用tar -xzvf apache1.3.39.tar.gz进行解压。

4)进入/home/chen/source/apache1.3.39/src这个文件目录中。执行./Configure。生成一个Makefile文件。

5)返回到/home/chen/source/apache1.3.39这个目录中,执行./configure。再执行make。这时可能有两种情况

(①)成功运行出make,无需额外的操作。

(②)make出错,错误如下:

[html] view plain copy
  1. <spanstyle="font-size:18px;">Ifyoudon'tdothis,theinstallationwillfailbecauSEOfthefollowingerror:
  2. htpasswd.c:101:error:conflictingtypesfor'getline'
  3. /usr/include/stdio.h:651:note:previousdeclarationof'getline'washere
  4. make[2]:***[htpasswd.o]Error1
  5. make[2]:Leavingdirectory`/home/ISPConfig-2.2.stable/install_ispconfig/compile_aps/apache_1.3.41/src/support'
  6. make[1]:***[build-support]Error1
  7. make[1]:Leavingdirectory`/home/ISPConfig-2.2.stable/install_ispconfig/compile_aps/apache_1.3.41'
  8. make:***[build]Error2
  9. ERROR:CouldnotmakeApache
  10. </span>


这时打开错误提示的文件/usr/include/stdio.h,找到对应的行,把getline改成parseline(记住在编译完成所有工作时,把他修改回去。)

6)观察/home/chen/source/apache1.3.39/src/main这个目录下是否有gen_test_char和gen_uri_delims这个两个可执行文件。如果上述步骤没有遗漏,应该会出现这两个可执行文件

7)进入/home/chen/arm/apache1.3.39/src中,执行

1)exprort CC="arm-linux-gcc"

2)./Configure生成Makefile文件。会出现Syntax error:word unexpected(expecting")")这种错误。

8)修改arm/apache1.3.39/src/main目录下的Makefile文件。把

./gen_uri_delims >uri_delims.h

改为:

uri_delims.h: gen_uri_delims

/home/chen/source/apache_1.3.39/src/main/gen_uri_delims >uri_delims.h

test_char.h: gen_test_char

./gen_test_char >test_char.h

test_char.h: gen_test_char

/home/chen/source/apache_1.3.39/src/main/gen_test_char >test_char.h

9)进入到/home/chen/arm/apache1.3.39目录下。执行

(1)export CC="arm-linux-gcc"

(2) ./configure---->make------->make install

看到如下信息

+--------------------------------------------------------+

| You now have successfully built and installed the |

| Apache 1.3 HTTP server. To verify that Apache actually |

| works correctly you now should first check the |

| (initially created or preserved) configuration files |

| |

| /usr/local/apache/conf/httpd.conf

| and then you should be able to immediately fire up |

| Apache the first time by running: |

| /usr/local/apache/bin/apachectl start

| Thanks for using Apache. The Apache Group |

| http://www.apache.org/ |

+--------------------------------------------------------+

10)进入/usr/local目录中,可以看到多了一个apache的目录,现在把这个目录打包,使用如下命令

tar -czvf apache.tar.gz apache/,在使用ftp等方式把apache解压出来,放入到开发板的/usr/local中。

11)下面须在开发板中/etc的目录中修改两个配置文件,passwd和group文件,如果没有这两个文件就自己建立;

文件一:passwd (如果这个文件中已经有内容了,只需要添加缺少的项就行)

root::0:0:root:/:/bin/ash

nobody::65534:65533:nobody:/:/bin/ash

文件二:group(如果这个文件中已经有内容了,只需要添加缺少的项就行

nobody::65533:

nogroup::65534:nobody

root::0:

users::100

三:PHP5.2.13的移植

在安装PHP之前需要进行libxml与zlib的安装。所以我们分为3部进行安装PHP,

一:libxml的安装

1)把libxml2-2.8.0解压到/usr/src目录中。在进入libxml2-2.8.0这个目录中去。

2)运行 CC=arm-linux-gcc ./configure --host=arm-linux --target=arm --prefix=/opt/libxml

3)make 再 make install

4)把libxml2.so.2.8.0传到板子的/usr/lib中,并且建立两个符号链接名字分别为libxml2.so和libxml2.so.2

二:zlib的安装

1)把zlib-1.2.7解压到/usr/src目录中,在进入到zlib-1.2.7这个目录中去。

2)运行CC=arm-linux-gcc ./configure --prefix=/opt/zlib

4)把libz.so.1.2.7传到板子的/usr/lib中,并且建立两个符号链接名字分别为libz.so和libz.so.1

三:php的安装

1)把php-5.2.13.tar.gz拷贝到/usr/src目录下。并且在此目录中建立一个temp文件夹。(在把php-5.2.13.tar.gz拷贝到temp文件中,这个里面主要是放PC体系结构的PHP的一个可执行文件,后面交叉编译php的时候回用到)

2)首先进入到temp目录中,解压php,再进入/usr/src/temp/php-5.2.13目录中,直接./configure即可。

再 make 接着make install

3)进入到/usr/src目录,解压php,进入到/usr/src/php-5.2.13目录中。

4)export CC=arm-linux-gcc 再./configure --host=arm-linux--prefix=/opt/php5 --enable-pdo --enable-sockets--with-sqlite --with-pdo-sqlite --with-zlib-dir=/opt/zlib --with-libxml-dir=/opt/libxml --without-iconv

5)首先修改php的Makefile.在开始出添加LDFLAGS += -ldl,这里是为了链接dlopen库然后修改main/php.h 在开始处添加#define HAVE_LIBDL 1,这个宏是为了交叉编译时强制使用dlopen。紧接着修改ext/standard/dl.c ,这段代码中添加#include <dlfcn.h> ,这个是dlopen的头文件。如下

  1. #ifdefined(HAVE_LIBDL)||HAVE_MACH_O_DYLD_H
  2. #include<stdlib.h>
  3. #include<stdio.h>
  4. #include<dlfcn.h>
6)修改Makefile另外一处。

copy
    spanstyle="font-size:14px;">install-pear-installer:$(SAPI_CLI_PATH)
  1. @$(top_builddir)/sapi/cli/php$(PEAR_INSTALL_FLAGS)pear/install-pear-nozlib.phar-d"$(peardir)"-b"$(bindir)"${PEAR_PREFIX}${PEAR_SUFFIX}

  2. 改为如下

    copy

      spanxmlns="http://www.w3.org/1999/xhtml"> /usr/src/temp/php-5.2.13/sapi/cli/php$(PEAR_INSTALL_FLAGS)pear/install-pear-nozlib.phar-d"$(peardir)"-b"$(bindir)"${PEAR_PREFIX}${PEAR_SUFFIX}>
    7)make 再 make install 8)把当前目录下的php.ini-dist拷贝到/opt/php5/lib中去。

    9)进入/opt中,把其中的php5这个文件夹传递到/usr/local中去。

    在移植结束apache与php后,需要修改板子中/usr/local/apach/conf中的http.conf文件这里为了把apache以及php联合在一起。改成如下内容:

    也可以重新建立一个http.conf文件,内容为下面。

    copy

      ##
    1. ##httpd.conf--ApacheHTTPserverconfigurationfile
    2. ##
    3. #
    4. #BasedupontheNCSAserverconfigurationfilesoriginallybyRobMcCool.
    5. #ThisisthemainApacheserverconfigurationfile.Itcontainsthe
    6. #configurationdirectivesthatgivetheserveritsinstructions.
    7. #SeeURL:http://httpd.apache.org/docs/>fordetailedinformationabout
    8. #thedirectives.
    9. #
    10. #DoNOTsimplyreadtheinstructionsinherewithoutunderstanding
    11. #whattheydo.They'rehereonlyashintsorreminders.Ifyouareunsure
    12. #consulttheonlinedocs.Youhavebeenwarned.
    13. #Afterthisfileisprocessed,theserverwilllookforandprocess
    14. #/usr/local/apache/conf/srm.confandthen/usr/local/apache/conf/access.conf
    15. #unlessyouhaveoverriddenthesewithResourceConfigand/or
    16. #AccessConfigdirectiveshere.
    17. #Theconfigurationdirectivesaregroupedintothreebasicsections:
    18. #1.DirectivesthatcontroltheoperationoftheApacheserverprocessasa
    19. #whole(the'globalenvironment').
    20. #2.Directivesthatdefinetheparametersofthe'main'or'default'server,
    21. #whichrespondstorequeststhataren'thandledbyavirtualhost.
    22. #Thesedirectivesalsoprovidedefaultvaluesforthesettings
    23. #ofallvirtualhosts.
    24. #3.Settingsforvirtualhosts,whichallowWebrequeststobesentto
    25. #differentIPaddressesorhostnamesandhavethemhandledbythe
    26. #sameApacheserverprocess.
    27. #Configurationandlogfilenames:Ifthefilenamesyouspecifyformany
    28. #oftheserver'scontrolfilesbeginwith"/"(or"drive:/"forWin32),the
    29. #serverwillusethatexplicitpath.Ifthefilenamesdo*not*begin
    30. #with"/",thevalueofServerRootisprepended--so"logs/foo.log"
    31. #withServerRootsetto"/usr/local/apache"willbeinterpretedbythe
    32. #serveras"/usr/local/apache/logs/foo.log".
    33. ###Section1:GlobalEnvironment
    34. #ThedirectivesinthissectionaffecttheoveralloperationofApache,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> #suchasthenumberofconcurrentrequestsitcanhandleorwhereit
    35. #canfinditsconfigurationfiles.
    36. #ServerTypeiseitherinetd,orstandalone.Inetdmodeisonlysupportedon
    37. #Unixplatforms.
    38. ServerTypestandalone
    39. #ServerRoot:Thetopofthedirectorytreeunderwhichtheserver's
    40. #configuration,error,andlogfilesarekept.
    41. #NOTE!IfyouintendtoplacethisonanNFS(orotherwisenetwork)
    42. #mountedfilesystemthenpleasereadtheLockFiledocumentation
    43. #(availableatURL:http://www.apache.org/docs/mod/core.html#lockfile>);
    44. #youwillsaveyourselfalotoftrouble.
    45. ServerRoot"/usr/local/apache"
    46. #TheLockFiledirectivesetsthepathtothelockfileusedwhenApache
    47. #iscompiledwitheitherUSE_FCNTL_SERIALIZED_ACCEPTor
    48. #USE_FLOCK_SERIALIZED_ACCEPT.Thisdirectiveshouldnormallybeleftat
    49. #itsdefaultvalue.Themainreasonforchangingitisifthelogs
    50. #directoryisNFSmounted,sincethelockfileMUSTBESTOREDONALOCAL
    51. #DISK.ThePIDofthemainserverprocessisautomaticallyappendedto
    52. #thefilename.
    53. #LockFile/usr/local/apache/logs/httpd.lock
    54. #PidFile:Thefileinwhichtheservershouldrecorditsprocess
    55. #identificationnumberwhenitstarts.
    56. PidFile/usr/local/apache/logs/httpd.pid
    57. #ScoreBoardFile:Fileusedtostoreinternalserverprocessinformation.
    58. #Notallarchitecturesrequirethis.Butifyoursdoes(you'llknowbecause
    59. #thisfilewillbecreatedwhenyourunApache)thenyou*must*ensurethat
    60. #notwoinvocationsofApachesharethesamescoreboardfile.
    61. ScoreBoardFile/usr/local/apache/logs/httpd.scoreboard
    62. #Inthestandardconfiguration,theserverwillprocesshttpd.conf(this
    63. #file,specifiedbythe-fcommandlineoption),srm.conf,andaccess.conf
    64. #inthatorder.Thelattertwofilesarenowdistributedempty,asitis
    65. #recommendedthatalldirectivesbekeptinasinglefileforsimplicity.
    66. #Thecommented-outvaluesbelowarethebuilt-indefaults.Youcanhavethe
    67. #serverignorethesefilesaltogetherbyusing"/dev/null"(forUnix)or
    68. #"nul"(forWin32)fortheargumentstothedirectives.
    69. #ResourceConfig/usr/local/apache/conf/srm.conf
    70. #AccessConfig/usr/local/apache/conf/access.conf
    71. #Timeout:Thenumberofsecondsbeforereceivesandsendstimeout.
    72. Timeout300
    73. #KeepAlive:Whetherornottoallowpersistentconnections(morethan
    74. #onerequestperconnection).Setto"Off"todeactivate.
    75. KeepAliveOn
    76. #MaxKeepAliveRequests:Themaximumnumberofrequeststoallow
    77. #duringapersistentconnection.Setto0toallowanunlimitedamount.
    78. #Werecommendyouleavethisnumberhigh,formaximumperformance.
    79. MaxKeepAliveRequests100
    80. #KeepAliveTimeout:Numberofsecondstowaitforthenextrequestfromthe
    81. #sameclientonthesameconnection.
    82. KeepAliveTimeout15
    83. #Server-poolsizeregulation.Ratherthanmakingyouguesshowmany
    84. #serverprocessesyouneed,Apachedynamicallyadaptstotheloadit
    85. #sees---thatis,ittriestomaintainenoughserverprocessesto
    86. #handlethecurrentload,plusafewspareserverstohandletransient
    87. #loadspikes(e.g.,multiplesimultaneousrequestsfromasingle
    88. #Netscapebrowser).
    89. #Itdoesthisbyperiodicallycheckinghowmanyserversarewaiting
    90. #forarequest.IftherearefewerthanMinSpareServers,itcreates
    91. #anewspare.IftherearemorethanMaxSpareServers,someofthe
    92. #sparesdieoff.ThedefaultvaluesareprobablyOKformostsites.
    93. MinSpareServers5
    94. MaxSpareServers10
    95. #Numberofserverstostartinitially---shouldbeareasonableballpark
    96. #figure.
    97. StartServers5
    98. #Limitontotalnumberofserversrunning,i.e.,limitonthenumber
    99. #ofclientswhocansimultaneouslyconnect---ifthislimitisever
    100. #reached,clientswillbeLOCKEDOUT,soitshouldNOTBESETTOOLOW.
    101. #Itisintendedmainlyasabraketokeeparunawayserverfromtaking
    102. #thesystemwithitasitspiralsdown...
    103. MaxClients150
    104. #MaxRequestsPerChild:thenumberofrequestseachchildprocessis
    105. #allowedtoprocessbeforethechilddies.Thechildwillexitso
    106. #astoavoidproblemsafterprolongedusewhenApache(andmaybethe
    107. #librariesituses)leakmemoryorotherresources.Onmostsystems,this
    108. #isn'treallyneeded,butafew(suchasSolaris)dohavenotableleaks
    109. #inthelibraries.Fortheseplatforms,settosomethinglike10000
    110. #orso;asettingof0meansunlimited.
    111. #NOTE:Thisvaluedoesnotincludekeepaliverequestsaftertheinitial
    112. #requestperconnection.Forexample,ifachildprocesshandles
    113. #aninitialrequestand10subsequent"keptalive"requests,it
    114. #wouldonlycountas1requesttowardsthislimit.
    115. MaxRequestsPerChild0
    116. #Listen:AllowsyoutobindApachetospecificIPaddressesand/or
    117. #ports,insteadofthedefault.SeealsotheVirtualHost>
    118. #directive.
    119. #Listen3000
    120. #Listen12.34.56.78:80
    121. #BindAddress:Youcansupportvirtualhostswiththisoption.Thisdirective
    122. #isusedtotelltheserverwhichIPaddresstolistento.Itcaneither
    123. #contain"*",anIPaddress,orafullyqualifiedInternetdomainname.
    124. #Seealsothe>andListendirectives.
    125. #BindAddress*
    126. #DynamicSharedObject(DSO)Support
    127. #TobeabletousethefunctionalityofamodulewhichwasbuiltasaDSOyou
    128. #havetoplacecorresponding`LoadModule'linesatthislocationsothe
    129. #directivescontainedinitareactuallyavailable_before_theyareused.
    130. #Pleasereadthefilehttp://httpd.apache.org/docs/dso.htmlformore
    131. #detailsabouttheDSOmechanismandrun`httpd-l'forthelistofalready
    132. #built-in(staticallylinkedandthusalwaysavailable)modulesinyourhttpd
    133. #binary.
    134. #Note:Theorderinwhichmodulesareloadedisimportant.Don'tchange
    135. #theorderbelowwithoutexpertadvice.
    136. #Example:
    137. #LoadModulefoo_modulelibexec/mod_foo.so
    138. #ExtendedStatuscontrolswhetherApachewillgenerate"full"status
    139. #information(ExtendedStatusOn)orjustbasicinformation(ExtendedStatus
    140. #Off)whenthe"server-status"handleriscalled.ThedefaultisOff.
    141. #ExtendedStatusOn
    142. ###Section2:'Main'serverconfiguration
    143. #Thedirectivesinthissectionsetupthevaluesusedbythe'main'
    144. #server,whichrespondstoanyrequeststhataren'thandledbya
    145. #>definition.Thesevaluesalsoprovidedefaultsfor
    146. #any>containersyoumaydefinelaterinthefile.
    147. #Allofthesedirectivesmayappearinside>containers,
    148. #inwhichcasethesedefaultsettingswillbeoverriddenforthe
    149. #virtualhostbeingdefined.
    150. #IfyourServerTypedirective(setearlierinthe'GlobalEnvironment'
    151. #section)issetto"inetd",thenextfewdirectivesdon'thaveany
    152. #effectsincetheirsettingsaredefinedbytheinetdconfiguration.
    153. #SkipaheadtotheServerAdmindirective.
    154. #Port:Theporttowhichthestandaloneserverlistens.For
    155. #ports<1023,youwillneedhttpdtoberunasrootinitially.
    156. Port8080
    157. #Ifyouwishhttpdtorunasadifferentuserorgroup,youmustrun
    158. #httpdasrootinitiallyanditwillswitch.
    159. #User/Group:Thename(or#number)oftheuser/grouptorunhttpdas.
    160. #.OnSCO(ODT3)use"Usernouser"and"Groupnogroup".
    161. #.OnHPUXyoumaynotbeabletousesharedmemoryasnobody,andthe
    162. #suggestedworkaroundistocreateauserwwwandusethatuser.
    163. #NOTEthatsomekernelsrefusetosetgid(Group)orsemctl(IPC_SET)
    164. #whenthevalueof(unsigned)Groupisabove60000;
    165. #don'tuseGroup"#-1"onthesesystems!
    166. Usernobody
    167. Groupnogroup
    168. #ServerAdmin:Youraddress,whereproblemswiththeservershouldbe
    169. #e-mailed.Thisaddressappearsonsomeserver-generatedpages,such
    170. #aserrordocuments.
    171. ServerAdminchen@chen-virtual-machine.
    172. #ServerNameallowsyoutosetahostnamewhichissentbacktoclientsfor
    173. #yourserverifit'sdifferentthantheonetheprogramwouldget(i.e.,use
    174. #"www"insteadofthehost'srealname).
    175. #Note:Youcannotjustinventhostnamesandhopetheywork.Thenameyou
    176. #defineheremustbeavalidDNSnameforyourhost.Ifyoudon'tunderstand
    177. #this,askyournetworkadministrator.
    178. #Ifyourhostdoesn'thavearegisteredDNSname,enteritsIPaddresshere.
    179. #Youwillhavetoaccessitbyitsaddress(e.g.,http://123.45.67.89/)
    180. #anyway,andthiswillmakeredirectionsworkinasensibleway.
    181. #127.0.0.1istheTCP/IPlocalloop-backaddress,oftennamedlocalhost.Your
    182. #machinealwaysknowsitselfbythisaddress.IfyouuseApachestrictlyfor
    183. #localtestinganddevelopment,youmayuse127.0.0.1astheservername.
    184. #ServerNamewww.example.com
    185. #DocumentRoot:Thedirectoryoutofwhichyouwillserveyour
    186. #documents.Bydefault,allrequestsaretakenfromthisdirectory,but
    187. #symboliclinksandaliasesmaybeusedtopointtootherlocations.
    188. DocumentRoot"/usr/local/apache/htdocs"
    189. #EachdirectorytowhichApachehasaccess,canbeconfiguredwithrespect
    190. #towhichservicesandfeaturesareallowedand/ordisabledinthat
    191. #directory(anditssubdirectories).
    192. #First,weconfigurethe"default"tobeaveryrestrictivesetof
    193. #permissions.
    194. Directory/>
    195. OptionsFollowSymLinks
    196. AllowOverrideNone
    197. Directory>
    198. #Notethatfromthispointforwardyoumustspecificallyallow
    199. #particularfeaturestobeenabled-soifsomething'snotworkingas
    200. #youmightexpect,makesurethatyouhavespecificallyenabledit
    201. #below.
    202. #ThisshouldbechangedtowhateveryousetDocumentRootto.
    203. Directory"/usr/local/apache/htdocs" #Thismayalsobe"None","All",oranycombinationof"Indexes",248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> #"Includes","FollowSymLinks","ExecCGI",or"MultiViews".
    204. #Notethat"MultiViews"mustbenamed*explicitly*---"OptionsAll"
    205. #doesn'tgiveittoyou.
    206. OptionsIndexesFollowSymLinksMultiViews
    207. #Thiscontrolswhichoptionsthe.htaccessfilesindirectoriescan
    208. #override.Canalsobe"All",oranycombinationof"Options","FileInfo",248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> #"AuthConfig",and"Limit"
    209. AllowOverrideNone
    210. #Controlswhocangetstufffromthisserver.
    211. Orderallow,deny
    212. Allowfromall
    213. #UserDir:Thenameofthedirectorywhichisappendedontoauser'shome
    214. #directoryifa~userrequestisreceived.
    215. IfModulemod_userdir.c UserDirpublic_html
    216. IfModule #ControlaccesstoUserDirdirectories.Thefollowingisanexample
    217. #forasitewherethesedirectoriesarerestrictedtoread-only.
    218. Directory/home/*/public_html #AllowOverrideFileInfoAuthConfigLimit
    219. #OptionsMultiViewsIndexesSymLinksIfOwnerMatchIncludesNoExec
    220. #LimitGETPOSTOPTIONSPROPFIND #Orderallow,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> #Allowfromall
    221. LimitLimitExceptGETPOSTOPTIONSPROPFIND #Orderdeny,allow
    222. #Denyfromall
    223. LimitExcept #DirectoryIndex:Nameofthefileorfilestouseasapre-writtenHTML
    224. #directoryindex.Separatemultipleentrieswithspaces.
    225. IfModulemod_dir.c DirectoryIndexindex.html
    226. DirectoryIndexindex.php
    227. DirectoryIndexindex.php3
    228. DirectoryIndexindex.phtml
    229. #AccessFileName:Thenameofthefiletolookforineachdirectory
    230. #foraccesscontrolinformation.
    231. AccessFileName.htaccess
    232. #Thefollowinglinesprevent.htaccessfilesfrombeingviewedby
    233. #Webclients.Since.htaccessfilesoftencontainauthorization
    234. #information,accessisdisallowedforsecurityreasons.Comment
    235. #theselinesoutifyouwantWebvisitorstoseethecontentsof
    236. #.htaccessfiles.IfyouchangetheAccessFileNamedirectiveabove,
    237. #besuretomakethecorrespondingchangeshere.
    238. #Also,folkstendtousenamessuchas.htpasswdforpassword
    239. #files,sothiswillprotectthoseaswell.
    240. Files~"^.ht" Denyfromall
    241. SatisfyAll
    242. Files #CacheNegotiatedDocs:Bydefault,Apachesends"Pragma:no-cache"witheach
    243. #documentthatwasnegotiatedonthebasisofcontent.Thisasksproxy
    244. #serversnottocachethedocument.Uncommentingthefollowinglinedisables
    245. #thisbehavior,andproxieswillbeallowedtocachethedocuments.
    246. #CacheNegotiatedDocs
    247. #UseCanonicalName:(newfor1.3)Withthissettingturnedon,whenever
    248. #Apacheneedstoconstructaself-referencingURL(aURLthatrefersback
    249. #totheservertheresponseiscomingfrom)itwilluseServerNameand
    250. #Porttoforma"canonical"name.Withthissettingoff,Apachewill
    251. #usethehostname:portthattheclientsupplied,whenpossible.This
    252. #alsoaffectsSERVER_NAMEandSERVER_PORTinCGIscripts.
    253. UseCanonicalNameOn
    254. #TypesConfigdescribeswherethemime.typesfile(orequivalent)is
    255. #tobefound.
    256. IfModulemod_mime.c TypesConfig/usr/local/apache/conf/mime.types
    257. #DefaultTypeisthedefaultMIMEtypetheserverwilluseforadocument
    258. #ifitcannototherwisedetermineone,suchasfromfilenameextensions.
    259. #IfyourservercontainsmostlytextorHTMLdocuments,"text/plain"is
    260. #agoodvalue.Ifmostofyourcontentisbinary,suchasapplications
    261. #orimages,youmaywanttouse"application/octet-stream"insteadto
    262. #keepbrowsersfromtryingtodisplaybinaryfilesasthoughtheyare
    263. #text.
    264. DefaultTypetext/plain
    265. #Themod_mime_magicmoduleallowstheservertousevarioushintsfromthe
    266. #contentsofthefileitselftodetermineitstype.TheMIMEMagicFile
    267. #directivetellsthemodulewherethehintdefinitionsarelocated.
    268. #mod_mime_magicisnotpartofthedefaultserver(youhavetoadd
    269. #ityourselfwithaLoadModule[seetheDSOparagraphinthe'Global
    270. #Environment'section],orrecompiletheserverandincludemod_mime_magic
    271. #aspartoftheconfiguration),soit'senclosedinan>container.
    272. #ThismeansthattheMIMEMagicFiledirectivewillonlybeprocessedifthe
    273. #moduleispartoftheserver.
    274. IfModulemod_mime_magic.c MIMEMagicFile/usr/local/apache/conf/magic
    275. #HostnameLookups:LogthenamesofclientsorjusttheirIPaddresses
    276. #e.g.,www.apache.org(on)or204.62.129.132(off).
    277. #Thedefaultisoffbecauseit'dbeoverallbetterforthenetifpeople
    278. #hadtoknowinglyturnthisfeatureon,sinceenablingitmeansthat
    279. #eachclientrequestwillresultinATLEASTonelookuprequesttothe
    280. #nameserver.
    281. HostnameLookupsOff
    282. #ErrorLog:Thelocationoftheerrorlogfile.
    283. #IfyoudonotspecifyanErrorLogdirectivewithina #container,errormessagesrelatingtothatvirtualhostwillbe
    284. #loggedhere.Ifyou*do*defineanerrorlogfilefora ErrorLog/usr/local/apache/logs/error_log
    285. #LogLevel:Controlthenumberofmessagesloggedtotheerror_log.
    286. #Possiblevaluesinclude:debug,info,notice,warn,crit,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> #alert,emerg.
    287. LogLevelwarn
    288. #Thefollowingdirectivesdefinesomeformatnicknamesforusewith
    289. #aCustomLogdirective(seebelow).
    290. LogFormat"%h%l%u%t"%r"%>s%b"%{Referer}i""%{User-Agent}i""combined
    291. LogFormat"%h%l%u%t"%r"%>s%b"common
    292. LogFormat"%{Referer}i->%U"referer
    293. LogFormat"%{User-agent}i"agent
    294. #Thelocationandformatoftheaccesslogfile(CommonLogfileFormat).
    295. #Ifyoudonotdefineanyaccesslogfileswithina #container,theywillbeloggedhere.Contrariwise,ifyou*do*
    296. #defineper->accesslogfiles,transactionswillbe
    297. #loggedthereinand*not*inthisfile.
    298. CustomLog/usr/local/apache/logs/access_logcommon
    299. #Ifyouwouldliketohaveagentandrefererlogfiles,uncommentthe
    300. #followingdirectives.
    301. #CustomLog/usr/local/apache/logs/referer_logreferer
    302. #CustomLog/usr/local/apache/logs/agent_logagent
    303. #Ifyoupreferasinglelogfilewithaccess,agent,andrefererinformation
    304. #(CombinedLogfileFormat)youcanusethefollowingdirective.
    305. #CustomLog/usr/local/apache/logs/access_logcombined
    306. #Optionallyaddalinecontainingtheserverversionandvirtualhost
    307. #nametoserver-generatedpages(errordocuments,FTPdirectorylistings,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> #mod_statusandmod_infooutputetc.,butnotCGIgenerateddocuments).
    308. #Setto"EMail"toalsoincludeamailto:linktotheServerAdmin.
    309. #Settooneof:On|Off|EMail
    310. ServerSignatureOn
    311. #EBCDICconfiguration:
    312. #(onlyformainframesusingtheEBCDICcodeset,currentlyoneof:
    313. #Fujitsu-Siemens'BS2000/OSD,IBM'sOS/390andIBM'sTPF)!!
    314. #Thefollowingdefaultconfigurationassumesthat"textfiles"
    315. #arestoredinEBCDIC(sothatyoucanoperateonthemusingthe
    316. #normalPOSIXtoolslikegrepandsort)while"binaryfiles"are
    317. #storedwithidenticaloctetsasonanASCIImachine.
    318. #Thedirectivesareevaluatedinconfigurationfileorder,with
    319. #theEBCDICConvertdirectivesappliedbeforeEBCDICConvertByType.
    320. #IfyouwanttohaveASCIIHTMLdocumentsandEBCDICHTMLdocuments
    321. #atthesametime,youcanusethefileextensiontoforce
    322. #conversionofffortheASCIIdocuments:
    323. >AddTypetext/html.ahtml
    324. >EBCDICConvertOff=InOut.ahtml
    325. #EBCDICConvertByTypeOn=InOuttext/*message/*multipart/*
    326. #EBCDICConvertByTypeOn=Inapplication/x-www-form-urlencoded
    327. #EBCDICConvertByTypeOn=InOutapplication/postscriptmodel/vrml
    328. #EBCDICConvertByTypeOff=InOut*/*
    329. #Aliases:Addhereasmanyaliasesasyouneed(withnolimit).Theformatis
    330. #Aliasfakenamerealname
    331. IfModulemod_alias.c #Notethatifyouincludeatrailing/onfakenamethentheserverwill
    332. #requireittobepresentintheURL.So"/icons"isn'taliasedinthis
    333. #example,only"/icons/".Ifthefakenameisslash-terminated,thenthe
    334. #realnamemustalsobeslashterminated,andifthefakenameomitsthe
    335. #trailingslash,therealnamemustalsoomitit.
    336. Alias/icons/"/usr/local/apache/icons/"
    337. Directory"/usr/local/apache/icons" OptionsIndexesMultiViews
    338. #ThisAliaswillprojecttheon-linedocumentationtreeunder/manual/
    339. #evenifyouchangetheDocumentRoot.Commentitifyoudon'twantto
    340. #provideaccesstotheon-linedocumentation.
    341. Alias/manual/"/usr/local/apache/htdocs/manual/"
    342. Directory"/usr/local/apache/htdocs/manual" OptionsIndexesFollowSymlinksMultiViews
    343. Orderallow,deny
    344. Allowfromall
    345. #ScriptAlias:Thiscontrolswhichdirectoriescontainserverscripts.
    346. #ScriptAliasesareessentiallythesameasAliases,exceptthat
    347. #documentsintherealnamedirectoryaretreatedasapplicationsand
    348. #runbytheserverwhenrequestedratherthanasdocumentssenttotheclient.
    349. #Thesamerulesabouttrailing"/"applytoScriptAliasdirectivesasto
    350. #Alias.
    351. ScriptAlias/cgi-bin/"/usr/local/apache/cgi-bin/"
    352. ScriptAlias/php5/"/usr/local/php5/bin/"
    353. #"/usr/local/apache/cgi-bin"shouldbechangedtowhateveryourScriptAliased
    354. #CGIdirectoryexists,ifyouhavethatconfigured.
    355. Directory"/usr/local/apache/cgi-bin" OptionsNone
    356. #Endofaliases.
    357. #Redirectallowsyoutotellclientsaboutdocumentswhichusedtoexistin
    358. #yourserver'snamespace,butdonotanymore.Thisallowsyoutotellthe
    359. #clientswheretolookfortherelocateddocument.
    360. #Format:Redirectold-URInew-URL
    361. #Directivescontrollingthedisplayofserver-generateddirectorylistings.
    362. IfModulemod_autoindex.c #FancyIndexingiswhetheryouwantfancydirectoryindexingorstandard
    363. IndexOptionsFancyIndexing
    364. #AddIcon*directivestelltheserverwhichicontoshowfordifferent
    365. #filesorfilenameextensions.Theseareonlydisplayedfor
    366. #FancyIndexeddirectories.
    367. AddIconByEncoding(CMP,/icons/compressed.gif)x-compressx-gzip
    368. AddIconByType(TXT,/icons/text.gif)text/*
    369. AddIconByType(IMG,/icons/image2.gif)image/*
    370. AddIconByType(SND,/icons/sound2.gif)audio/*
    371. AddIconByType(VID,/icons/movie.gif)video/*
    372. AddIcon/icons/binary.gif.bin.exe
    373. AddIcon/icons/binhex.gif.hqx
    374. AddIcon/icons/tar.gif.tar
    375. AddIcon/icons/world2.gif.wrl.wrl.gz.vrml.vrm.iv
    376. AddIcon/icons/compressed.gif.Z.z.tgz.gz.zip
    377. AddIcon/icons/a.gif.ps.ai.eps
    378. AddIcon/icons/layout.gif.html.shtml.htm.pdf
    379. AddIcon/icons/text.gif.txt
    380. AddIcon/icons/c.gif.c
    381. AddIcon/icons/p.gif.pl.py
    382. AddIcon/icons/f.gif.for
    383. AddIcon/icons/dvi.gif.dvi
    384. AddIcon/icons/uuencoded.gif.uu
    385. AddIcon/icons/script.gif.conf.sh.shar.csh.ksh.tcl
    386. AddIcon/icons/tex.gif.tex
    387. AddIcon/icons/bomb.gifcore
    388. AddIcon/icons/back.gif..
    389. AddIcon/icons/hand.right.gifREADME
    390. AddIcon/icons/folder.gif^^DIRECTORY^^
    391. AddIcon/icons/blank.gif^^BLANKICON^^
    392. #DefaultIconiswhichicontoshowforfileswhichdonothaveanicon
    393. #explicitlyset.
    394. DefaultIcon/icons/unknown.gif
    395. #AddDescriptionallowsyoutoplaceashortdescriptionafterafilein
    396. #server-generatedindexes.TheseareonlydisplayedforFancyIndexed
    397. #directories.
    398. #Format:AddDescription"description"filename
    399. #AddDescription"GZIPcompresseddocument".gz
    400. #AddDescription"tararchive".tar
    401. #AddDescription"GZIPcompressedtararchive".tgz
    402. #ReadmeNameisthenameoftheREADMEfiletheserverwilllookforby
    403. #default,andappendtodirectorylistings.
    404. #HeaderNameisthenameofafilewhichshouldbeprependedto
    405. #directoryindexes.
    406. ReadmeNameREADME.html
    407. HeaderNameHEADER.html
    408. #IndexIgnoreisasetoffilenameswhichdirectoryindexingshouldignore
    409. #andnotincludeinthelisting.Shell-stylewildcardingispermitted.
    410. IndexIgnore.??**~*#HEADER*README*RCSCVS*,v*,t
    411. #Endofindexingdirectives.
    412. #Documenttypes.
    413. #AddLanguageallowsyoutospecifythelanguageofadocument.Youcan
    414. #thenusecontentnegotiationtogiveabrowserafileinalanguage
    415. #itcanunderstand.
    416. #Note1:Thesuffixdoesnothavetobethesameasthelanguage
    417. #keyword---thosewithdocumentsinPolish(whosenet-standard
    418. #languagecodeispl)maywishtouse"AddLanguagepl.po"to
    419. #avoidtheambiguitywiththecommonsuffixforperlscripts.
    420. #Note2:Theexampleentriesbelowillustratethatinquite
    421. #somecasesthetwocharacter'Language'abbreviationisnot
    422. #identicaltothetwocharacter'Country'codeforitscountry,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> #E.g.'Danmark/dk'versus'Danish/da'.
    423. #Note3:InthecaSEOf'ltz'weviolatetheRFCbyusingathreechar
    424. #specifier.Butthereis'workinprogress'tofixthisandget
    425. #thereferencedataforrfc1766cleanedup.
    426. #Danish(da)-Dutch(nl)-English(en)-Estonian(ee)
    427. #French(fr)-German(de)-Greek-Modern(el)
    428. #Italian(it)-Korean(kr)-Norwegian(no)-NorwegianNynorsk(nn)
    429. #Portugese(pt)-Luxembourgeois*(ltz)
    430. #Spanish(es)-Swedish(sv)-Catalan(ca)-Czech(cs)
    431. #Polish(pl)-BrazilianPortuguese(pt-br)-Japanese(ja)
    432. #Russian(ru)
    433. AddLanguageda.dk
    434. AddLanguagenl.nl
    435. AddLanguageen.en
    436. AddLanguageet.ee
    437. AddLanguagefr.fr
    438. AddLanguagede.de
    439. AddLanguageel.el
    440. AddLanguagehe.he
    441. AddCharsetISO-8859-8.iso8859-8
    442. AddLanguageit.it
    443. AddLanguageja.ja
    444. AddCharsetISO-2022-JP.jis
    445. AddLanguagekr.kr
    446. AddCharsetISO-2022-KR.iso-kr
    447. AddLanguagenn.nn
    448. AddLanguageno.no
    449. AddLanguagepl.po
    450. AddCharsetISO-8859-2.iso-pl
    451. AddLanguagept.pt
    452. AddLanguagept-br.pt-br
    453. AddLanguageltz.lu
    454. AddLanguageca.ca
    455. AddLanguagees.es
    456. AddLanguagesv.sv
    457. AddLanguagecs.cz.cs
    458. AddLanguageru.ru
    459. AddLanguagezh-TW.zh-tw
    460. AddCharsetBig5.Big5.big5
    461. AddCharsetWINDOWS-1251.cp-1251
    462. AddCharsetCP866.cp866
    463. AddCharsetISO-8859-5.iso-ru
    464. AddCharsetKOI8-R.koi8-r
    465. AddCharsetUCS-2.ucs2
    466. AddCharsetUCS-4.ucs4
    467. AddCharsetUTF-8.utf8
    468. #LanguagePriorityallowsyoutogiveprecedencetosomelanguages
    469. #incaSEOfatieduringcontentnegotiation.
    470. #Justlistthelanguagesindecreasingorderofpreference.Wehave
    471. #moreorlessalphabetizedthemhere.Youprobablywanttochangethis.
    472. IfModulemod_negotiation.c LanguagePriorityendanletfrdeelitjakrnoplptpt-brrultzcaessvtw
    473. #AddTypeallowsyoutotweakmime.typeswithoutactuallyeditingit,orto
    474. #makecertainfilestobecertaintypes.
    475. AddTypeapplication/x-tar.tgz
    476. AddTypeapplication/x-httpd-php.php3
    477. AddTypeapplication/x-httpd-php.php
    478. AddTypeapplication/x-httpd-php.phtml
    479. #AddEncodingallowsyoutohavecertainbrowsersuncompress
    480. #informationonthefly.Note:Notallbrowserssupportthis.
    481. #Despitethenamesimilarity,thefollowingAdd*directiveshavenothing
    482. #todowiththeFancyIndexingcustomizationdirectivesabove.
    483. AddEncodingx-compress.Z
    484. AddEncodingx-gzip.gz.tgz
    485. #IftheAddEncodingdirectivesabovearecommented-out,thenyou
    486. #probablyshoulddefinethoseextensionstoindicatemediatypes:
    487. #AddTypeapplication/x-compress.Z
    488. #AddTypeapplication/x-gzip.gz.tgz
    489. #AddHandlerallowsyoutomapcertainfileextensionsto"handlers",108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> #actionsunrelatedtofiletype.Thesecanbeeitherbuiltintotheserver
    490. #oraddedwiththeActioncommand(seebelow)
    491. #Ifyouwanttouseserversideincludes,orCGIoutside
    492. #ScriptAliaseddirectories,uncommentthefollowinglines.
    493. #TouseCGIscripts:
    494. #AddHandlercgi-script.cgi
    495. #Touseserver-parsedHTMLfiles
    496. #AddTypetext/html.shtml
    497. #AddHandlerserver-parsed.shtml
    498. #UncommentthefollowinglinetoenableApache'ssend-asisHTTPfile
    499. #feature
    500. #AddHandlersend-as-isasis
    501. #Ifyouwishtouseserver-parsedimagemapfiles,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> #AddHandlerimap-filemap
    502. #Toenabletypemaps,youmightwanttouse
    503. #AddHandlertype-mapvar
    504. Actionapplication/x-httpd-php"/php5/php"
    505. #Endofdocumenttypes.
    506. #Actionletsyoudefinemediatypesthatwillexecuteascriptwhenever
    507. #amatchingfileiscalled.ThiseliminatestheneedforrepeatedURL
    508. #pathnamesforoft-usedCGIfileprocessors.
    509. #Format:Actionmedia/type/cgi-script/location
    510. #Format:Actionhandler-name/cgi-script/location
    511. #MetaDir:specifiesthenameofthedirectoryinwhichApachecanfind
    512. #metainformationfiles.ThesefilescontainadditionalHTTPheaders
    513. #toincludewhensendingthedocument
    514. #MetaDir.web
    515. #MetaSuffix:specifiesthefilenamesuffixforthefilecontainingthe
    516. #metainformation.
    517. #MetaSuffix.meta
    518. #Customizableerrorresponse(Apachestyle)
    519. #thesecomeinthreeflavors
    520. #1)plaintext
    521. #ErrorDocument500"Theservermadeabooboo.
    522. #n.b.thesingleleading(")marksitastext,itdoesnotgetoutput
    523. #2)localredirects
    524. #ErrorDocument404/missing.html
    525. #toredirecttolocalURL/missing.html
    526. #ErrorDocument404/cgi-bin/missing_handler.pl
    527. #N.B.:Youcanredirecttoascriptoradocumentusingserver-side-includes.
    528. #3)externalredirects
    529. #ErrorDocument402http://www.example.com/subscription_info.html
    530. #N.B.:Manyoftheenvironmentvariablesassociatedwiththeoriginal
    531. #requestwill*not*beavailabletosuchascript.
    532. #Customizebehaviourbasedonthebrowser
    533. IfModulemod_setenvif.c #ThefollowingdirectivesmodifynormalHTTPresponsebehavior.
    534. #ThefirstdirectivedisableskeepaliveforNetscape2.xandbrowsersthat
    535. #spoofit.Thereareknownproblemswiththesebrowserimplementations.
    536. #TheseconddirectiveisforMicrosoftInternetExplorer4.0b2
    537. #whichhasabrokenHTTP/1.1implementationanddoesnotproperly
    538. #supportkeepalivewhenitisusedon301or302(redirect)responses.
    539. BrowserMatch"Mozilla/2"nokeepalive
    540. BrowserMatch"MSIE4.0b2;"nokeepalivedowngrade-1.0force-response-1.0
    541. #ThefollowingdirectivedisablesHTTP/1.1responsestobrowserswhich
    542. #areinviolationoftheHTTP/1.0specbynotbeingabletogroka
    543. #basic1.1response.
    544. BrowserMatch"RealPlayer4.0"force-response-1.0
    545. BrowserMatch"Java/1.0"force-response-1.0
    546. BrowserMatch"JDK/1.0"force-response-1.0
    547. #Endofbrowsercustomizationdirectives
    548. #Allowserverstatusreports,withtheURLofhttp://servername/server-status
    549. #Changethe".example.com"tomatchyourdomaintoenable.
    550. Location/server-status #SetHandlerserver-status
    551. #Allowfrom.example.com
    552. Location #Allowremoteserverconfigurationreports,withtheURLof
    553. #http://servername/server-info(requiresthatmod_info.cbeloaded).
    554. Location/server-info #SetHandlerserver-info
    555. #Therehavebeenreportsofpeopletryingtoabuseanoldbugfrompre-1.1
    556. #days.ThisbuginvolvedaCGIscriptdistributedasapartofApache.
    557. #Byuncommentingtheselinesyoucanredirecttheseattackstoalogging
    558. #scriptonphf.apache.org.Or,youcanrecordthemyourself,usingthescript
    559. #support/phf_abuse_log.cgi.
    560. Location/cgi-bin/phf* #ErrorDocument403http://phf.apache.org/phf_abuse_log.cgi
    561. ###Section3:VirtualHosts
    562. #VirtualHost:Ifyouwanttomaintainmultipledomains/hostnamesonyour
    563. #machineyoucansetupVirtualHostcontainersforthem.Mostconfigurations
    564. #uSEOnlyname-basedvirtualhostssotheserverdoesn'tneedtoworryabout
    565. #IPaddresses.Thisisindicatedbytheasterisksinthedirectivesbelow.
    566. #PleaseseethedocumentationatURL:http://www.apache.org/docs/vhosts #forfurtherdetailsbeforeyoutrytosetupvirtualhosts.
    567. #Youmayusethecommandlineoption'-S'toverifyyourvirtualhost
    568. #configuration.
    569. #Usename-basedvirtualhosting.
    570. #NameVirtualHost*:80
    571. #VirtualHostexample:
    572. #AlmostanyApachedirectivemaygointoaVirtualHostcontainer.
    573. #ThefirstVirtualHostsectionisusedforrequestswithoutaknown
    574. #servername.
    575. VirtualHost*:80 #ServerAdminwebmaster@dummy-host.example.com
    576. #DocumentRoot/www/docs/dummy-host.example.com
    577. #ServerNamedummy-host.example.com
    578. #ErrorLoglogs/dummy-host.example.com-error_log
    579. #CustomLoglogs/dummy-host.example.com-access_logcommon
    580. >


    在进行上诉步骤后即可移植成功。以上作为参考,我会把编译成功的打包上传到资源中。如下链接

    apache:http://download.csdn.net/detail/cangencong/4553164

    php:http://download.csdn.net/detail/cangencong/4553169

    sqlite2:http://download.csdn.net/detail/cangencong/4553173

    zlib:http://download.csdn.net/detail/cangencong/4553175

    libxml:http://download.csdn.net/detail/cangencong/4553177

    HTTP.CONF配置文件下载http://download.csdn.net/detail/cangencong/5596839


    转载:http://blog.csdn.net/cangencong/article/details/7924315

    (编辑:李大同)

    【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读