惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
博客园_首页
雷峰网
雷峰网
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
The Cloudflare Blog
罗磊的独立博客
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
J
Java Code Geeks
MyScale Blog
MyScale Blog
G
Google Developers Blog
U
Unit 42
Y
Y Combinator Blog
P
Proofpoint News Feed
Vercel News
Vercel News

博客园 - ゛無磿頭.㊣

Linux学习笔记 关于判定表拆分合并的分析 第6章 运行维护——DBA的日常工作 第5章 智能管理——用好集成管理环境 我的中国心 TestLink1.7.4_Released完整安装方法(Windows篇) 第4章 数据库利器——SQL 如何从一名测试员转型为管理人员 合格的测试人员应具备的性格条件 标准测试用例的几点要素 Bugfree管理员使用指南 微软公司软件测试简介 杂谈,工作日志 Bugfree缺陷管理使用指南 四款主流测试工具的测试流程 关于WAP测试方法的演讲胶片 读书笔记总结更新目录 第3章 管理入门——数据库服务器的管理 第2章 构建环境——安装Oracle 9i
通过GreenAMP架设BUGFREE后的端口修改
゛無磿頭.㊣ · 2007-10-19 · via 博客园 - ゛無磿頭.㊣
 

今天抽空帮朋友解决了修改PHP版本BUGFREE端口的问题,趁这机会赶紧写上来,免得以后忘了。呵呵!

朋友的BUGFREE因为是PHP版本,通过GreenAMP来架设。本应用这个工具的建站过程是非常简单的,可是由于某些原因需要修改端口,便花了很大时间查看源码。

打开GreenAMP文件夹,发现有以下几个目录,如图1。根据文件名可猜测Getting_Strated.php为启动程序的启动项,那么setPath.php则为该程序设置相关链接参数。打开Getting_Strated.php,发现里面有两段程序提示信息为“80端口已被占用,无法启动Apache”和“3306端口已被占用,无法启动MySQL”,结果很明了,803306分别为apachemysql的运行端口。再打开setPath.php文件,我们可以很快发现三段非常有用的信息。它们分别对应的文件“/Apache/conf/httpd.conf”、“/PHP/php.ini”和“/MySQL/my.ini”。

    图

1

接着我们逐个打开这三个文件进行分析。

打开“/Apache/conf/httpd.conf”,通过查找功能搜索“80”这个值,我们很快可以找到以下两段代码

1

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the <VirtualHost>

# directive.

#

#Listen 3000

#Listen 12.34.56.78:80

2

# Port: The port to which the standalone server listens.  Certain firewall

# products must be configured before Apache can listen to a specific port.

# Other running httpd servers will also interfere with this port.  Disable

# all firewall, security, and other services if you encounter problems.

# To help diagnose problems use the Windows NT command NETSTAT -a

#

Port 80

       第(1)处注释说明Apache所监听的端口或/IP地址,同时包括虚拟机的端口或/IP地址。第(2)处表示服务器将打开的端口号。将值80修改成所需要替换的端口,且监听地址为本机,如IP地址:127.0.0.1,端口:84

1

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the <VirtualHost>

# directive.

#

#Listen 3000

#Listen 127.0.0.1:84

2

# Port: The port to which the standalone server listens.  Certain firewall

# products must be configured before Apache can listen to a specific port.

# Other running httpd servers will also interfere with this port.  Disable

# all firewall, security, and other services if you encounter problems.

# To help diagnose problems use the Windows NT command NETSTAT -a

#

Port 84

       那么Apache所要修改的参数就完成了,下面修改Mysql的端口。打开“/MySQL/my.ini”,可以发现里面有两处关于端口的参数,一是关于客户端的,另一个是关于服务端的。

# CLIENT SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by MySQL client applications.

# Note that only client applications shipped by MySQL are guaranteed

# to read this section. If you want your own MySQL client program to

# honor these values, you need to specify it as an option during the

# MySQL client library initialization.

#

[client]

port=3306

# SERVER SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by the MySQL Server. Make sure that

# you have installed the server correctly (see above) so it reads this

# file.

#

[mysqld]

# The TCP/IP Port the MySQL Server will listen on

port=3306

两处port参数值3306修改为需要的端口,如3237

# CLIENT SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by MySQL client applications.

# Note that only client applications shipped by MySQL are guaranteed

# to read this section. If you want your own MySQL client program to

# honor these values, you need to specify it as an option during the

# MySQL client library initialization.

#

[client]

port=3237

# SERVER SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by the MySQL Server. Make sure that

# you have installed the server correctly (see above) so it reads this

# file.

#

[mysqld]

# The TCP/IP Port the MySQL Server will listen on

port=3237

       完成Mysql的修改后,打开最后一个文件“/PHP/php.ini”。发现里面的信息对我们没用,直接无视。呵呵!

       把修改后的内容保存,再双击“启动GreenAMP.bat”这个批处理文件则可大功告成。要不,你也试试?^_^