MANTIS under Apache2 installation guide under WINDOWS

xiaoxiao2021-03-19  193

MANTIS has been configured on Win2000 IIS5, because PHP is relatively simple because PHP is relatively simple, and after a year, I want to recall Mantis and I don't want to install bloated IIS. The index selection Apache2.

The whole process does not have the use of Google Dafa, from the PHP on the configured Apache to deploy Mantis, after a hard time, there is a lot of things in the new version, and naturally record it.

Introduction

Mantis As a lightweight open source BUGS tracking system, Based on PHP MySQL, the backend database default mysql, you can also choose PostgreSQL.

For more information about Mantis, please http://www.mantisbt.org/

1

Environmental construction

Mantis

1.0.1

The latest version of Mantis is 1.0.1 (more Mantis information, please http://www.mantisbt.org)

MySQL-

5.0.19

-Win32 is still in the latest mysql5 to use MySQL4 a bit TU (more mysql information please http://www.mysql.com/)

PHP-

4.4.0

.tar.gz No selected PHP5 for PHP, nor did it use Win Installer, but use binary compression packs directly. It also saves the necessary documents Copy to remove the necessary documents. (For more php information, please http://www.php.net)

Apache

2.0.54

Apache uses apache_2.0.55-win32-x86-no_ssl.msi (more apache2 information please at http://httpd.apache.org)

1.1

Configure Apache to run PHP

1.1.1

Apache2

Nothing to install Apache2, all the way is OK, I installed the apache2 in the D: / TMTOOL / APACHE Group directory.

Open the D: / TMTOOL / APACHE Group / Apache2 / conf / httpd.conf profile as follows:

1) Specify the document root path of the web server Apache Document_Root

Doc_root = D: / TMTOOL / Webroot

2) Add to loadModules / MOD_SSL.SO

LoadModule PHP4_Module "D: /tmtool/php/sapi/php4apache2.dll"

3) Add two lines to support PHP files after the ...

AddType Application / X-httpd-php .php .phtml.php3 .php4

AddType Application / X-httpd-php-source .phps

4) Adjust the default document storage location DocumentRoot:

DocumentRoot "D: / TMTOOL / Webroot"

Add specified default home page type:

DirectoryIndex index.html index.html index.php index.php3

5) Adjust and DocuMENTROOT consistent:

# This kind be changing to whatver you set documentroot to.

#

6) Add PHPINIDIR positioning php.ini

# Configure the path to php.ini

PHPINIDIR "D: / TMTOOL / PHP"

1.1.2

PHP4

Since the binary compression package is used, the PHP directory COPY to D: / TMTOOL / PHP is directly extracted, and there will be CLI, DLLS and SAPI in the PHP4 home directory. If it is installed in the install, only sessiondata And UPLOADTEMP, etc., in the end, it is necessary to pass the binary package COPY SAPI directory, this is why you don't have to installer, hehe.

1) Add PHP installation directory to system variable PATH

2) Set up PHP

The php.ini-dist or php.ini-recommended copy of the PHP root is renamed is PHP.ini.

3) Adjust the expansion directory specified in php.ini:

EXTENSION_DIR = "D: // TMTOOL // PHP // EXTENSIONS"

4) Copy D: / Tmtool/php/php4tsts.dll to the system32 directory

1.1.3

test

After completing the configuration of Apache2 and PHP, restart Apache2, in the default directory (D: / TMTOOL / Webroot), new Index.php:

Echo "Hello World";

?>

The browser accesses http: // localhost See the Hello World is OK.

1.2

Install mysql

Install the downloaded MySQL5 installation compression (D: / TMTOOL / mysql / bin) even if OK is OK;

Run the mysqld-nt.exe under the bin directory to launch the MySQL service.

1.3

Deploy Mantis

Differentiated Mantis COPY to PHP Downloaded Directory D: / TmTool / Webroot / Mantis,

1.0.1

The database scripts of the original /sql/db_generate.sql are canceled, and the environment is used to establish an environment. Access http://localhost/mantis/admin/install.php via the browser can see the interface deploying the Mantis database environment.

The default database is bugtracker, I prefer Mantis, pay attention to use the user with administrator privileges to create the database, I used root.

After setting the install / upgrade database, it is normal to output the green good under the output feedback page, that is ok, if there is a red Bad, then adjust it, then initialize to OK, then in MySQL I will add a library (my Mantis), and there are many of the following tables beginning with Mantis_, and the initialization of this database ends.

1.4

Set Mantis

1) Copy the config_inc.php.sample in D: / TmTool / Webroot / Mantis, renamed as config_inc.php, modify the settings;

[TIPS] Save this Mantis default setting in config_defaults_inc.php: User's own setup information is saved in config_inc.php, if an option is set in config_inc.php, the system uses the settings in Config_inc.php, otherwise System default settings using config_defaults_inc.php; config_inc.php.sample is a user setting file example given by Mantis. We modify the settings in the config_inc.php file based on the situation, and the settings are very simple, and each parameter has a detailed description in config_defaults_inc.php.

Below is some of my custom parameters, which refer to the contents of JPGraph and phpMailer:

$ g_Use_iis = on; # Use IIS

$ g_show_version = OFF; # 不 在 页 页 版 版 号

$ g_default_language = 'chinese_simplified'; # default language for Simplified Chinese

$ g_show_project_menu_bar = on; # Display Project Selection Bar

$ g_show_queries_count = OFF; # on the footer does not display the number of queries executed

$ g_default_new_account_access_level = weveloper; # default user level

$ g_Use_jpgraph = on; # Using Graphics Report (JPGRAPH)

$ g_jpgraph_path = 'D: / TmTool / Webroot / Mantis / Core / JPGRAPH / SRC /'; # jpgraph path, pay attention to the last '/' to add

$ g_window_title = 'mantis bug tracking management system'; # browser title

$ g_page_title = 'RINK BUGS Tracking Management System'; # Page Task Bar $ G_enable_email_notification = on; # 开 开 邮 通 通

$ G_SMTP_HOST = 'SMTP. ***. com'; # SMTP server

$ g_smtp_username = '***'; # 邮箱 login username

$ g_smtp_password = '***'; # 邮箱 login password

$ g_use_phpmailer = on; # Use phpmailer to send mail

$ g_phpmailer_path = 'd: / tmtool / webroot / mantis / core / phpmailr /'; # phpmailer stored path

$ g_phpmailer_method = 2; # phpmailer Send Email in SMTP mode

$ g_short_date_format = 'y-m-d'; # short date format, y uppercase represents 4 years

$ g_normal_date_format = 'y-m-d h: I'; # 普通 日

$ g_complete_date_format = 'y-m-d h: i: s'; # full date format

After completing the above settings, you can use Mantis, open your browser, enter http: // localhost / mantis, you should see the Mantis login page, you can use the default username Administrator and password root to log in, Management settings. 1.5

Preliminary security settings of Mantis

1.5.1

Delete Admin Directory

There is an admin directory in the Mantis directory, which is the Mantis administrator to manage Mantis, such as install.php, which we build a database environment. Using this module You can check if your Mantis is fully installed, upgrade the old version of Mantis, modify the MANTIS page CSS file; use this management module does not require username and password, so anyone can pass this management module View your Mantis system information, and because there is an upgrade module, you can also modify the database directly.

Therefore, Mantis will suggest to delete this admin directory after the configuration is completed; note that it must be deleted instead of the rename! It is still accessible after the rename!

1.5.2

Delete Administrator

After adding a user with administrator privileges, delete the system default Administrator user.

1.6

PHPMAIL settings

By default, Mantis uses the built-in mailto () function to send mail transmission, including new users registration sending password, bug change reminder, reset password, etc., using mailto () to complete, but actually discovered, mailto The function seems to not support the mail server that needs to be verified. Its own PHPMAILER is equipped with problems, so I will directly download the downloaded PHPMAiler to Mantis (D: / TMTOOL / Webroot / Mantis / Core / PHPMAiler) included in Mantis. To send an email.

For more phpMailer, please go to http://phpmailer.sourceforge.net.

3) Modify php.ini, find include_path, add D: / TMTOOL / Webroot / Mantis / Core / PHPMAiler directory;

4) As shown in the table, set the $ g_use_phpmailr, $ g_phpmailr_path and $ g_phpmailr_method three parameters;

5) You should now send email using phpmailer;

1.7

Graphic Report (JPGRAPH) setting

By default, Mantis's graphics report is closed, so the "Graphic Report" is not visible in Mantis's report, you need to install the JPGRAPH module and set $ g_use_jpgraph to open the graphic report;

1) Download JPGraph: Download the JPGraph's installation file from http://www.aditus.nu/jpgraph/index.php, the latest version is jpgraph-

1.20.3

;

2) will download the jpgraph-

1.20.3

.tar.gz decompressed into the D: / TMTOOL / Webroot / Mantis / Core / JPGraph directory;

3) Open the config_inc.php file, modify $ g_jpgraph_path as the SRC directory of JPGraph, $ g_use_jpgraph is ON;

4) Modify the php.ini file, activate "extension = php_gd2.dll" and "extension = php_iconv.dll"; if the extension_dir item is incorrect, please change extension_dir to the correct value.

5) Copy the iconv.dll under php / dlls to the Windows / System32 directory, the above two steps automatically load PHP_GD2 and PHP_ICONV.DLL modules, which are jpgraphs in display charts and Chinese character encoding conversions. Must be; 6) Now open Mantis's statistics page, you can see a graphic report, according to statistics, etc., respectively, etc. Because Mantis is set by UTF-8 setting JPGRAPH, and our interface language is using Simplified Chinese, so Chinese characters are coming out.

Solution is simple:

1)

The $ graph_font = '' is changed to $ g_graph_font = 'simsum' in Mantis / Config_inc.php.

2)

Since the graphical report default font does not contain Chinese in Mantis, we must add font code such as graphic title in Mantis / Core / Graph_API.php;

In function graph_get_font () {...} adds 'sIMSUM' => FF_SIMSUN for Mantis calls.

Since this, you can see Simplified Chinese in the graphical report.

转载请注明原文地址:https://www.9cbs.com/read-130163.html

New Post(0)