通过GreenAMP架设BUGFREE后的端口修改

 

今天抽空帮朋友解决了修改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/IPPort 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/IPPort the MySQL Server will listen on

port=3237

 

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

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

转载于:https://www.cnblogs.com/Sayiod/archive/2007/10/19/930827.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值