配置Apache+Perl+Mysql+bugzilla
1.安装mysql
详细步骤参见BugzillaWin32Install - MozillaWiki.htm
安装完成后修改$mysql\my.ini
在文件末尾加入2行:
set-variable=max_allowed_packet=4M
ft_min_word_len= 2
创建BUG库和MYSQL的用户密码bugacc
2.安装Perl
详细步骤参见BugzillaWin32Install - MozillaWiki.htm
安装PERL的组件
进入DOS窗口,运行以下命令:
D:\Perl\bin>
ppmrepo add UWinnipeg http://cpan.uwinnipeg.ca/PPMPackages/12xx/
ppmrepo add Trouchelle http://trouchelle.com/ppm12/
ppmrepo list
ppminstall AppConfig
ppminstall TimeDate
ppminstall DBI
ppminstall DBD-mysql
ppminstall Template-Toolkit
ppminstall MailTools
ppminstall GD
ppminstall Chart
ppminstall GDGraph
ppminstall PatchReader
ppminstall Net-LDAP-Express
ppminstall DateTime
ppminstall DateTime-TimeZone
ppminstall Email-Send
ppminstall Email-MIME
ppminstall Email-MIME-Encodings
ppminstall Email-MIME-Modifier
ppminstall Authen-SASL #配置邮箱时有用
3.安装Apache
详细步骤参见BugzillaWin32Install - MozillaWiki.htm
4.拷贝BUGZILLA目录到$apache2.4\htdocs
修改$apache\conf\httpd.conf
修改以下行:
AddHandlercgi-script .cgi
OptionsIndexes FollowSymLinks ExecCGI
AllowOverrideAll
加入
#
# Tell Apache to use Perl to execute .cgi
#
ScriptInterpreterSource Registry-Strict
DirectoryIndexindex.html index.html.var index.cgi
# CustomLog "logs/access.log"common
5.进入windows regedit页面
增加键值:HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command
默认:D:\Perl\bin\perl.exe –T
6. BUGZILLA目录下运行checksetup.pl
生成:
C:\Bugzilla\localconfig
修改以下行:
#
#How to access the SQL database:
#
$db_host= "localhost"; # whereis the database?
$db_port= 3308; # which port touse
$db_name= "bugs"; # nameof the MySQL database
$db_user= "bugs"; # userto attach to the MySQL database
#
#Enter your database password here. It's normally advisable to specify
# apassword for your bugzilla database user.
#If you use apostrophe (') or a backslash (\) in your password, you'll
#need to escape it by preceding it with a \ character. (\') or (\\)
#
$db_pass= 'bugacc';
$db_port= 3308; # which port to use
7.配置smtp mail:
需要公司给出SMTP server
a.admin用户登录,
b.点击Parameters链接
c.点击email链接
d.修改
mailfrom:lit121@sina.com
smtpserver:smtp.sina.com
smtp_username:lit121@sina.com
smtp_password:xxxxx
e.保存设置
附件:(安装testlink和bugzilla后的httpd.conf)
#
#This is the main Apache HTTP server configuration file. It contains the
#configuration directives that give the server its instructions.
#See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
#In particular, see
#<URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
#for a discussion of each configuration directive.
#
#Do NOT simply read the instructions in here without understanding
#what they do. They're here only as hintsor reminders. If you are unsure
#consult the online docs. You have been warned.
#
#Configuration and logfile names: If the filenames you specify for many
#of the server's control files begin with "/" (or "drive:/"for Win32), the
#server will use that explicit path. Ifthe filenames do *not* begin
#with "/", the value of ServerRoot is prepended -- so"logs/foo.log"
#with ServerRoot set to "D:/TestLinkInstall/Apache software/apache2.4"will be interpreted by the
#server as "D:/TestLinkInstall/Apachesoftware/apache2.4/logs/foo.log".
#
#NOTE: Where filenames are specified, you must use forward slashes
#instead of backslashes (e.g., "c:/apache" instead of"c:\apache").
#If a drive letter is omitted, the drive on which Apache.exe is located
#will be used by default. It isrecommended that you always supply
#an explicit drive letter in absolute paths to avoid confusion.
#
#ServerRoot: The top of the directory tree under which the server's
#configuration, error, and log files are kept.
#
#Do not add a slash at the end of the directory path. If you point
#ServerRoot at a non-local disk, be sure to point the LockFile directive
#at a local disk. If you wish to sharethe same ServerRoot for multiple
#httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot"D:/TestLinkInstall/Apache software/apache2.4"
#
#Listen: Allows you to bind Apache to specific IP addresses and/or
#ports, instead of the default. See also the <VirtualHost>
#directive.
#
#Change this to Listen on specific IP addresses as shown below to
#prevent Apache from glomming onto all bound IP addresses.
#
#Listen12.34.56.78:80
#Listen80
Listen7788
#
#Dynamic Shared Object (DSO) Support
#
#To be able to use the functionality of a module which was built as a DSO you
#have to place corresponding `LoadModule' lines at this location so the
#directives contained in it are actually available _before_ they are used.
#Statically compiled modules (those listed by `httpd -l') do not need
#to be loaded here.
#
#Example:
#LoadModule foo_module modules/mod_foo.so
#
LoadModuleactions_module modules/mod_actions.so
LoadModulealias_module modules/mod_alias.so
LoadModuleasis_module modules/mod_asis.so
LoadModuleauth_basic_module modules/mod_auth_basic.so
#LoadModuleauth_digest_module modules/mod_auth_digest.so
#LoadModuleauthn_alias_module modules/mod_authn_alias.so
#LoadModuleauthn_anon_module modules/mod_authn_anon.so
#LoadModuleauthn_dbd_module modules/mod_authn_dbd.so
#LoadModuleauthn_dbm_module modules/mod_authn_dbm.so
LoadModuleauthn_default_module modules/mod_authn_default.so
LoadModuleauthn_file_module modules/mod_authn_file.so
#LoadModuleauthnz_ldap_module modules/mod_authnz_ldap.so
#LoadModuleauthz_dbm_module modules/mod_authz_dbm.so
LoadModuleauthz_default_module modules/mod_authz_default.so
LoadModuleauthz_groupfile_module modules/mod_authz_groupfile.so
LoadModuleauthz_host_module modules/mod_authz_host.so
#LoadModuleauthz_owner_module modules/mod_authz_owner.so
LoadModuleauthz_user_module modules/mod_authz_user.so
LoadModuleautoindex_module modules/mod_autoindex.so
#LoadModulecache_module modules/mod_cache.so
#LoadModulecern_meta_module modules/mod_cern_meta.so
LoadModulecgi_module modules/mod_cgi.so
#LoadModulecharset_lite_module modules/mod_charset_lite.so
#LoadModuledav_module modules/mod_dav.so
#LoadModuledav_fs_module modules/mod_dav_fs.so
#LoadModuledav_lock_module modules/mod_dav_lock.so
#LoadModuledbd_module modules/mod_dbd.so
#LoadModuledeflate_module modules/mod_deflate.so
LoadModuledir_module modules/mod_dir.so
#LoadModuledisk_cache_module modules/mod_disk_cache.so
#LoadModuledumpio_module modules/mod_dumpio.so
LoadModuleenv_module modules/mod_env.so
#LoadModuleexpires_module modules/mod_expires.so
#LoadModuleext_filter_module modules/mod_ext_filter.so
#LoadModulefile_cache_module modules/mod_file_cache.so
#LoadModulefilter_module modules/mod_filter.so
#LoadModuleheaders_module modules/mod_headers.so
#LoadModuleident_module modules/mod_ident.so
#LoadModuleimagemap_module modules/mod_imagemap.so
LoadModuleinclude_module modules/mod_include.so
#LoadModuleinfo_module modules/mod_info.so
LoadModuleisapi_module modules/mod_isapi.so
#LoadModuleldap_module modules/mod_ldap.so
#LoadModulelogio_module modules/mod_logio.so
LoadModulelog_config_module modules/mod_log_config.so
#LoadModulelog_forensic_module modules/mod_log_forensic.so
#LoadModulemem_cache_module modules/mod_mem_cache.so
LoadModulemime_module modules/mod_mime.so
#LoadModulemime_magic_module modules/mod_mime_magic.so
LoadModulenegotiation_module modules/mod_negotiation.so
#LoadModuleproxy_module modules/mod_proxy.so
#LoadModuleproxy_ajp_module modules/mod_proxy_ajp.so
#LoadModuleproxy_balancer_module modules/mod_proxy_balancer.so
#LoadModuleproxy_connect_module modules/mod_proxy_connect.so
#LoadModuleproxy_ftp_module modules/mod_proxy_ftp.so
#LoadModuleproxy_http_module modules/mod_proxy_http.so
#LoadModulerewrite_module modules/mod_rewrite.so
LoadModulesetenvif_module modules/mod_setenvif.so
#LoadModulespeling_module modules/mod_speling.so
#LoadModulessl_module modules/mod_ssl.so
#LoadModulestatus_module modules/mod_status.so
#LoadModulesubstitute_module modules/mod_substitute.so
#LoadModuleunique_id_module modules/mod_unique_id.so
#LoadModuleuserdir_module modules/mod_userdir.so
#LoadModuleusertrack_module modules/mod_usertrack.so
#LoadModuleversion_module modules/mod_version.so
#LoadModulevhost_alias_module modules/mod_vhost_alias.so
<IfModule!mpm_netware_module>
<IfModule!mpm_winnt_module>
#
#If you wish httpd to run as a different user or group, you must run
#httpd as root initially and it will switch.
#
#User/Group: The name (or #number) of the user/group to run httpd as.
#It is usually good practice to create a dedicated user and group for
#running httpd, as with most system services.
#
Userdaemon
Groupdaemon
</IfModule>
</IfModule>
#'Main' server configuration
#
#The directives in this section set up the values used by the 'main'
#server, which responds to any requests that aren't handled by a
#<VirtualHost> definition. Thesevalues also provide defaults for
#any <VirtualHost> containers you may define later in the file.
#
#All of these directives may appear inside <VirtualHost> containers,
#in which case these default settings will be overridden for the
#virtual host being defined.
#
#
#ServerAdmin: Your address, where problems with the server should be
#e-mailed. This address appears on someserver-generated pages, such
#as error documents. e.g.admin@your-domain.com
#
ServerAdminadmin@jadebird.com
#
#ServerName gives the name and port that the server uses to identify itself.
#This can often be determined automatically, but we recommend you specify
#it explicitly to prevent problems during startup.
#
#If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerNameSAMSUNG2503:80
#
#DocumentRoot: The directory out of which you will serve your
#documents. By default, all requests are taken from this directory, but
#symbolic links and aliases may be used to point to other locations.
#
DocumentRoot"D:/TestLinkInstall/Apache software/apache2.4/htdocs"
#
#Each directory to which Apache has access can be configured with respect
#to which services and features are allowed and/or disabled in that
#directory (and its subdirectories).
#
#First, we configure the "default" to be a very restrictive set of
#features.
#
<Directory/>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
#
#Note that from this point forward you must specifically allow
#particular features to be enabled - so if something's not working as
#you might expect, make sure that you have specifically enabled it
#below.
#
#
#This should be changed to whatever you set DocumentRoot to.
#
<Directory"D:/TestLinkInstall/Apache software/apache2.4/htdocs">
#
# Possible values for the Options directiveare "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must benamed *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicatedand important. Please see
#http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks ExecCGI
#
# AllowOverride controls what directivesmay be placed in .htaccess files.
# It can be "All","None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from thisserver.
#
Order allow,deny
Allow from all
#
# Tell Apache to use Perl to execute .cgi
#
ScriptInterpreterSource Registry-Strict
</Directory>
#
#DirectoryIndex: sets the file that Apache will serve if a directory
#is requested.
#
<IfModuledir_module>
# DirectoryIndex index.html
DirectoryIndex index.html index.shtmlindex.wml index.pwml index.php index.php3 index.php4 index.html.var index.cgi
</IfModule>
#
#The following lines prevent .htaccess and .htpasswd files from being
#viewed by Web clients.
#
<FilesMatch"^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
#
#ErrorLog: The location of the error log file.
#If you do not specify an ErrorLog directive within a <VirtualHost>
#container, error messages relating to that virtual host will be
#logged here. If you *do* define an errorlogfile for a <VirtualHost>
#container, that host's errors will be logged there and not here.
#
ErrorLog"logs/error.log"
#
#LogLevel: Control the number of messages logged to the error_log.
#Possible values include: debug, info, notice, warn, error, crit,
#alert, emerg.
#
LogLevelwarn
<IfModulelog_config_module>
#
# The following directives define someformat nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t\"%r\" %>s %b \"%{Referer}i\"\"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t\"%r\" %>s %b" common
<IfModule logio_module>
#You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t\"%r\" %>s %b \"%{Referer}i\"\"%{User-Agent}i\" %I %O" combinedio
</IfModule>
#
# The location and format of the accesslogfile (Common Logfile Format).
# If you do not define any access logfileswithin a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> accesslogfiles, transactions will be
# logged therein and *not* in this file.
#
# CustomLog "logs/access.log" common
#
# If you prefer a logfile with access,agent, and referer information
# (Combined Logfile Format) you can use thefollowing directive.
#
#CustomLog "logs/access.log"combined
</IfModule>
<IfModulealias_module>
#
# Redirect: Allows you to tell clientsabout documents that used to
# exist in your server's namespace, but donot anymore. The client
# will make a new request for the documentat its new location.
# Example:
# Redirect permanent /foohttp://SAMSUNG2503/bar
#
# Alias: Maps web paths into filesystempaths and is used to
# access content that does not live underthe DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpaththen the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory>section to allow access to
# the filesystem path.
#
# ScriptAlias: This controls whichdirectories contain server scripts.
# ScriptAliases are essentially the same asAliases, except that
# documents in the target directory aretreated as applications and
# run by the server when requested ratherthan as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/"D:/TestLinkInstall/Apache software/apache2.4/cgi-bin/"
</IfModule>
<IfModulecgid_module>
#
# ScriptSock: On threaded servers,designate the path to the UNIX
# socket used to communicate with the CGIdaemon of mod_cgid.
#
#Scriptsock logs/cgisock
</IfModule>
#
#"D:/TestLinkInstall/Apache software/apache2.4/cgi-bin" should bechanged to whatever your ScriptAliased
#CGI directory exists, if you have that configured.
#
<Directory"D:/TestLinkInstall/Apache software/apache2.4/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
#
#DefaultType: the default MIME type the server will use for a document
#if it cannot otherwise determine one, such as from filename extensions.
#If your server contains mostly text or HTML documents, "text/plain"is
# agood value. If most of your content isbinary, such as applications
#or images, you may want to use "application/octet-stream" instead to
#keep browsers from trying to display binary files as though they are
#text.
#
DefaultTypetext/plain
<IfModulemime_module>
#
# TypesConfig points to the file containingthe list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types
#
# AddType allows you to add to or overridethe MIME configuration
# file specified in TypesConfig forspecific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certainbrowsers uncompress
# information on the fly. Note: Not allbrowsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above arecommented-out, then you
# probably should define those extensionsto indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .html.phtml .pwml .php3 .php4 .inc
#
# AddHandler allows you to map certain fileextensions to "handlers":
# actions unrelated to filetype. These canbe either built into the server
# or added with the Action directive (seebelow)
#
# To use CGI scripts outside ofScriptAliased directories:
# (You will also need to add"ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi
# For type maps (negotiated resources):
#AddHandler type-map var
#
# Filters allow you to process contentbefore it is sent to the client.
#
# To parse .shtml files for server-sideincludes (SSI):
# (You will also need to add"Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>
#
#The mod_mime_magic module allows the server to use various hints from the
#contents of the file itself to determine its type. The MIMEMagicFile
#directive tells the module where the hint definitions are located.
#
#MIMEMagicFileconf/magic
#
#Customizable error responses come in three flavors:
#1) plain text 2) local redirects 3) external redirects
#
#Some examples:
#ErrorDocument500 "The server made a boo boo."
#ErrorDocument404 /missing.html
#ErrorDocument404 "/cgi-bin/missing_handler.pl"
#ErrorDocument402 http://SAMSUNG2503/subscription_info.html
#
#
#EnableMMAP and EnableSendfile: On systems that support it,
#memory-mapping or the sendfile syscall is used to deliver
#files. This usually improves serverperformance, but must
#be turned off when serving from networked-mounted
#filesystems or if support for these functions is otherwise
#broken on your system.
#
#EnableMMAPoff
#EnableSendfileoff
#Supplemental configuration
#
#The configuration files in the conf/extra/ directory can be
#included to add extra features or to modify the default configuration of
#the server, or you may simply copy their contents here and change as
#necessary.
#Server-pool management (MPM specific)
#Includeconf/extra/httpd-mpm.conf
#Multi-language error messages
#Includeconf/extra/httpd-multilang-errordoc.conf
#Fancy directory listings
#Includeconf/extra/httpd-autoindex.conf
#Language settings
#Includeconf/extra/httpd-languages.conf
#User home directories
#Includeconf/extra/httpd-userdir.conf
#Real-time info on requests and configuration
#Includeconf/extra/httpd-info.conf
#Virtual hosts
#Includeconf/extra/httpd-vhosts.conf
#Local access to the Apache HTTP Server Manual
#Includeconf/extra/httpd-manual.conf
#Distributed authoring and versioning (WebDAV)
#Includeconf/extra/httpd-dav.conf
#Various default settings
#Includeconf/extra/httpd-default.conf
#Secure (SSL/TLS) connections
#Includeconf/extra/httpd-ssl.conf
#
#Note: The following must must be present to support
# starting without SSL on platforms withno /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModulessl_module>
SSLRandomSeedstartup builtin
SSLRandomSeedconnect builtin
</IfModule>
<VirtualHost115.170.215.222>
DocumentRoot"D:/TestLinkInstall/Apache software/apache2.4/htdocs"
ServerNamewww.testlitao.com
</VirtualHost>
#BEGINPHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir"D:/TestLinkInstall/PHP/"
LoadModulephp5_module "D:/TestLinkInstall/PHP/php5apache2_2.dll"
#ENDPHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL