|
|
 |
 |
|
|
 |
|
服务器apache+mysql+php+ssl完全安装
|
|
|
|
编辑:华夏媒体 作者:未知 来源:网络 时间:2006-07-29 总浏览量:2162 |
|
文字大小:[ 大 中 小 ]
文字颜色: 双击滚屏/单击停止 |
|
[上一页] [1] [2] [3] [4] [5] [6] [7] [8] [下一页]
|
现在安装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
测试我们的工作 [page_break]Apache 正在工作吗?
如果它工作正常,当你用Netscape连接服务器时,你将看见一幅类似于这幅屏幕捕获的屏幕。这是基本上 是Apache缺省安装的页面。
注意:你可以用域名或机器实际的IP地址与服务器连接。检查这两种情形,确保一切工作正常。
PHP支持正在工作吗??
现在将测试PHP支持……创建一个文件(名为:test.php ),它有下列信息。文件需要位于文档根路径下,它应该缺省设置为/usr/local/apache/htdocs。注意这依赖于我们以前选择的前缀,然而,这可在 httpd.conf中改变。设置多个虚拟主机将在另一篇文章加少,请留意,因为它将涉及安装Apache和它的指令的一些很基本的选项。
test.php 文件
<?
phpinfo();
?>
它将显示有关服务器、php和环境的信息。下面是输出页面的顶部的屏幕抓取。
|
|
[上一页] [1] [2] [3] [4] [5] [6] [7] [8] [下一页]
|
|
|
打印 收藏 关闭 至顶部 |
|
 |
|