欢迎光临极品网,更多、更新的资源信息尽在Jpinw.Com!本站所有信息资源每日更新新的内容,请大家继续关注www.Jpinw.com!如果觉得本站还不错,对您有帮助,别忘了向您的朋友推荐本站!请记好本站网址:http://www.Jpinw.com,网站发展靠大家多多的支持!!!

极品网 极品课件 极品论文 极品文学 极品游戏 极品美容 极品手机资源 极品股票

#
免费资源: 免费域名 | 免费空间 | 免费推广 | 免费邮箱 | 免费硬盘 | 免费论坛 | 免费留言 | 免费统计 | 在线投稿 | 更多...
电脑学院: 操作系统 | 安全相关 | 网页设计 | 编程开发 | 建站经验 | 服务器类 | 黑客攻防 | 菜鸟入门 | 教你网赚 | 更多...
文章导航: 网赚学堂 | 网赚秘笈 | 网赚三维 | 网赚先锋 | 网赚资讯 | 感悟网赚 | 众生百态 | 经典美文 | 范文中心 | 更多...
图酷天下: 时事图酷 | 娱乐图酷 | 搞笑图酷 | 时尚图酷 | 体育图酷 | 另类经典 | 论文资源 | 课件下载 | 文学知识 | 更多...

您现在的位置: 极品网 >> 电脑学院 >> 服务器类 >> 文件共享服务器 >> 教程正文

服务器apache+mysql+php+ssl完全安装          【字体:
服务器apache+mysql+php+ssl完全安装
作者:佚名    教程来源:不详    点击数:    更新时间:2006-6-2    

 








现在安装PHP语言。你下载了最新的beta版,但是你可能必须下载非beta版本。记住beta版本需要GNU make。 

你仍然假定是root,如果不是,su回到root。 

PHP要求你已经预先配置好的Apache,以便它能知道所需的东西在哪儿。在以后你安装Apache服务器时,你将会回到这里。改变到你有源代码的目录。 

# cd /tmp/DOWNLOAD 

# gunzip -c apache_1.3.x.tar.gz | tar xf - 

# cd apache_1.3.x 

# ./configure 

# cd .. 

好的,现在你可以开始PHP的安装。提取源代码文件并进入其目录。如果你下载了版本3,在数字和命令上有一个改变,不大的改变。 

# gunzip -c php-4.0.x.tar.gz | tar xf - 

# cd php-4.0.x 

如果你正在编译代码,configure将永远是你的朋友。:-) 因此,configure有很多选项。使用configure --help确定你想要增加哪些。我只是需要MySQL和LDAP,并且当然Apache。 

# ./configure --with-mysql=/usr/local/mysql 

--with-xml 

--with-apache=../apache_1.3.x 

--enable-track-vars 

--with-ldap 

make并安装二进制代码。 

# make 

# make install 

拷贝ini文件到lib目录。 

# cp php.ini-dist /usr/local/lib/php.ini 

你可以编辑PHP文件来设置PHP选项,如你可以通过在你的php.ini文件中插入下列行,增加php的max_execution_time。 

max_execution_time = 60; 

注意:php3用户将使用php3.ini,而php4用户将使用php.ini文件。 

Apache 与 Mod_SSL 

该配置并安装mod_ssl和Apache了。对此,你将需要有rsaref-2.0文件。在http://ftpsearch.lycos.com/上搜索“rsaref20.tar.Z”。如果你不喜欢Lycos,你可以选择其他搜索引擎来搜索文件。当然只有你在美国才需要这个文件。(管它呢,你也可从别处下载,首先在http://ftpsearch.ntnu.no/查找“rsaref20.tar.Z”,好多啊!。) 

创建rasref目录,你将在该目录提取文件。注意。这假定你下载了一个临时目录,而你就在此目录。 

# mkdir rsaref-2.0 

# cd rsaref-2.0 

# gzip -d -c ../rsaref20.tar.Z | tar xvf - 

现在配置并构造OpenSSL库。 

# cd rsaref-2.0 

# cp -rp install/unix local 

# cd local 

# make 

# mv rsaref.a librsaref.a 

# cd ../.. 

安装OpenSSL。记住,你将用它来创建临时证书和CSR文件。--prefix选项指定主安装目录。 

# cd openssl-0.9.x 

# ./config -prefix=/usr/local/ssl 

-L`pwd`/../rsaref-2.0/local/ rsaref -fPIC 

现在make、测试并安装它。 

# make 

# make test 

# make install 

# cd .. 

我们将配置MOD_SSL模块,然后用Apache配置指定它为一个可装载的模块。 

# cd mod_ssl-2.5.x-1.3.x 

# ./configure 

--with-apache=../apache_1.3.x 

# cd .. 

现在我们可以把更多的Apache模块加到Apache源代码树中。可选的--enable-shared=ssl选项使得mod_ssl构造成为一个DSO“libssl.so”。关于在Apache支持DSO的更多信息,阅读Apache源代码树中的INSTALL和 htdocs/manual/dso.html文档。我强烈建议ISP和软件包装维护者为了最灵活地使用mod_ssl而使用DSO工具,但是注意,DSO不是在所有平台上的Apache都支持。 

# cd apache_1.3.x 

# SSL_BASE=../openssl-0.9.x 

RSA_BASE=../rsaref-2.0/local 

./configure --enable-module=ssl 

--activate-module=src/modules/php4/libphp4.a 

--enable-module=php4 --prefix=/usr/local/apache 

--enable-shared=ssl 

[...你可加入更多的选项...] 

生成Apache,然后生成证书,并安装... 

# make 

如果你已正确地完成,你将得到类似于以下的信息: 

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

| Before you install the package you now should prepare the SSL | 

| certificate system by running the "make certificate" command. | 

| For different situations the following variants are provided: | 

| | 

| % make certificate TYPE=dummy (dummy self-signed Snake Oil cert) | 

| % make certificate TYPE=test (test cert signed by Snake Oil CA) | 

| % make certificate TYPE=custom (custom cert signed by own CA) | 

| % make certificate TYPE=existing (existing cert) | 

| CRT=/path/to/your.crt [KEY=/path/to/your.key] | 

| | 

| Use TYPE=dummy when you’re a vendor package maintainer, | 

| the TYPE=test when you’re an admin but want to do tests only, | 

| the TYPE=custom when you’re an admin willing to run a real server | 

| and TYPE=existing when you’re an admin who upgrades a server. | 

| (The default is TYPE=test) | 

| | 

| Additionally add ALGO=RSA (default) or ALGO=DSA to select | 

| the signature algorithm used for the generated certificate. | 

| | 

| Use "make certificate VIEW=1" to display the generated data. | 

| | 

| Thanks for using Apache & mod_ssl. Ralf S. Engelschall | 

| rse@engelschall.com | 

| www.engelschall.com | 

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

现在你可以创建一个定制的证书。该选项将提示输入你的地址、公司、和其他一些东西。关于证书,请参阅本文的结尾。 

# make certificate TYPE=custom 

现在安装Apache... 

# 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 | 

| Or when you want to run it with SSL enabled use: | 

| | 

| /usr/local/apache/bin/apachectl startssl | 

| Thanks for using Apache. The Apache Group | 

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

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

现在验证Apache和PHP是否正在工作。然而,我们需要编辑srm.conf和httpd.conf保证我们把PHP类型加到了配置中。查看httpd.conf并去掉下列行的注释。如果你精确地遵循了本文的指令,你的httpd.conf文件将位于/usr/local/apache/conf目录。文件有一行针对php4的addtype加了注释,现在就去掉注释。httpd.conf 文件--片断 



> # And for PHP 4.x, use: 

> # 

---> AddType application/x-httpd-php .php 

---> AddType application/x-httpd-php-source .phps 





现在我们准备启动Apache服务器看它是否在工作。首先我们将启动不支持SSL的服务器看它是否启动了。我们将检查对PHP的支持,然后我们将停止服务器并且启动启用了SSL支持的服务器并检查我们是否一切正常。configtest 将检查所有配置是否正确设置。 

# cd /usr/local/apache/bin 

# ./apachectl configtest 

Syntax OK 

# ./apachectl start 

./apachectl start: httpd started 

测试我们的工作  

[1] [2]  下一页

 

教程录入:dping    责任编辑:dping 
  • 上一篇教程:

  • 下一篇教程:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关教程
    Windows不能打开帮助和支持,
    我已经删除掉了Hacker.com.c
    我用WWWFileSharePro.exe想把
    请问我的电脑 服务里面的启动
    怎么把XP的机子通过服务器连
    无盘XP网吧服务端的配置
    我的电脑XP 怎么设置成服务器
    网吧里的电脑服务器是怎样控
    如何在服务器上安装linux操作
    电脑服务器
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    极品网
    | 设为首页 | 加入收藏 | 友情链接 | 版权声明 |
    极品网

    Copyright 2006 Jpinw.com 极品网

    备案号:申请中

    极品网