Linux下安装mantis配置指南【转】

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: 转自:http://blog.csdn.net/xabc3000/article/details/6858229 目录(?)[-] Linux下安装mantis配置指南 配置Linux下的ApacheMysqlPHP 一安装配置Apache 二安装Mysqlrpm包 三安装GD...

转自:http://blog.csdn.net/xabc3000/article/details/6858229

Linux下安装mantis配置指南

1 配置Linux下的Apache+Mysql+PHP

 

一.安装配置Apache

安装包的获取:http://www.apache.org

1.1.安装Apache(tar包)

tar –zxvf http-2.2.11.tar.gz

./configure --prefix=/usr/local/apache --enable-modules=so --enable-rewrite

make && make install

1.2.配置Apache

vi /usr/local/apache/conf/httpd.conf

找到下面这行

#ServerName www.example.com:80

修改为:

ServerName www.dong.com:80

保存退出。

1.3.拷贝文件

cp –a /usr/local/apache/bin/apachectl /etc/init.d/httpd

1.4运行service命令

Service httpd restart

1.5检验配置是否成功

IE地址栏输入:http://www.dong.com

看到It’s Work证明配置成功。

或者使用 ps –aux|grep httpd

如果看到多行数据,也证明配置成功

二.安装Mysql(rpm包)

安装包的获取: http://www.mysql.com

2.1.检查是否安装MySQL

输入命令:

rpm -qa |grep –i mysql

如果有提示,证明mysql已经安装,那么使用rpm –e mysql卸载mysql包。

因为系统安装的mysql的版本太低了。

 

2.2.如果没有安装

2.2.1.从mysql网站获取安装包:

rpm –ivh mysql-client*

rpm –ivh mysql-server*

2.3启动服务

service mysql restart

三.安装GD库(tar包 让PHP支持GIF、PNG、JPEG)

注意:不安装只会影响mantis的数据统计部分功能。

3.1安装GD库

3.1.1.安装jpeg6(jpegsrc.v6b.tar.gz)ftp://ftp.uu.net/graphics/jpeg/     

mkdir -p /usr/local/jpeg6

mkdir -p /usr/local/jpeg6/bin

mkdir -p /usr/local/jpeg6/lib

mkdir -p /usr/local/jpeg6/include

mkdir -p /usr/local/jpeg6/man

mkdir -p /usr/local/jpeg6/man1

mkdir -p /usr/local/jpeg6/man/man1

tar –zxvf  jpegsrc.v6b.tar.gz

./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static

Make &&make install

3.1.2.安装libpng(libpng-1.2.35-i486-1.gz) http://www.libpng.org/pub/png/libpng.html

tar –zxvf  libpng-1.2.35-i486-1.gz

./configure --prefix=/usr/local/libpng/

Make &&make install

3.1.3.安装freetype(freetype-2.3.9.tar.gz) http://freetype.fis.uniroma2.it/download.html

注意:需升级make version到3.80以上:下载地址:http://ftp.gnu.org/pub/gnu/make/

tar –zxvf  freetype-2.3.9.tar.gz

mkdir -p /usr/local/freetype

./configure --prefix=/usr/local/freetype

Make &&make install

3.1.4.安装zlib (zlib-1.2.3.tar.gz) http://zlib.net/index.html

tar –zxvf  zlib-1.2.3.tar.gz

./configure --prefix=/usr/local/zlib

Make &&make install

3.1.5.安装GD库 (gd-2.0.35.tar.gz) http://www.libgd.org/Downloads

注意:需要对m4升级到1.4.12. 下载地址:http://ftp.gnu.org/pub/gnu/m4/

注意:需要对autoconf升级到2.58或者更高 下载地址:http://ftp.gnu.org/pub/gnu/autoconf/

tar –zxvf  gd-2.0.35.tar.gz

mkdir -p /usr/local/gd2

./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg6/ --with-png=/usr/local/lib/ --with-zlib=/usr/local/zlib/ --with-freetype=/usr/local/freetype/

Make &&make install

3.1.6安装Curl库(curl-7.19.4.tar.gz) http://curl.haxx.se/download.html

tar –zxvf  curl-7.19.4.tar.gz

./configure --prefix=/usr/local/curl

Make &&make install

 

四.安装PHP(tar包,PHP必须有libxml2支持)

安装包的获取:http://www.PHP.net

4.1.安装libxml2

4.2.安装libxslt(可选安装)

4.3.安装php5

tar –zxvf php-5.2.9.tar.gz

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-libxml-dir=/usr/local/libxml2/ --with-gd=/usr/local/gd2/ --with-jpeg-dir=/usr/local/jpeg6/ --with-png=/usr/local/lib --with-zlib-dir=/usr/lib/ --with-freetype-dir=/usr/local/freetype --with-curl=/usr/local/curl/ --with-xsl=/usr/local/libxslt --enable-xslt

make && make install

4.4配置文件

cp php.ini-dist /usr/local/lib/php.ini

五.重新配置Apache

5.1. vi /usr/local/apache/conf/httpd.conf

5.1.1找到 AddType application/x-gzip .gz .tgz在其下面添加一行

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

 

5.1.1找到  DirectoryIndex index.html修改为:

DirectoryIndex index.html default.php index.php

5.2设置php文件后缀

Vi /usr/local/lib/php.ini

找到register-globals这一行修改成:

 register-globals=on

5.3第一个php程序

vi /usr/local/apache/htdocs/test.php

文件内容为:

<?

       Phpinfo();

?>

5.4重启apache服务

service httpd restart

5.5检验是否成功

在IE中输入如下网址

http://www.dong.com/test.php

看到php的有关配置信息就证明成功了。

2安装配置mantis

一.安装mantis

1.1将mantis解压到/usr/local/apache/htdocs目录下。

1.2生成:mantis配置文件:

   cp  config_inc.php.sample config_inc.php

1.3生成数据库

   http://www.dong.com/mantis/admin/install.php

凡是mantis 1.0.0a2以后的版本生成数据库都比较简单,只需要上面那个网址就可以。

1.4对bugtracker赋权限:

   grant all privileges on bugtracker.* to mantisdbuser@localhost    identified by "";

1.5.登录:

IE中输入:http://www.dong.com/mantis

用户名:administrator

密码:root

二.安装配置sendmail

请参见:Linux初学者Sendmail配置指南

http://blog.sina.com.cn/s/blog_4b086af10100c2ca.html

 

三.安装配置phpmailer

安装包的获取:http://phpmailer.sourceforge.net

解压此安装包后到/var/phpmailer

3.1拷贝文件到include_path路径下

将此安装包的class.smtp.php 和class.phpmailer.php文件拷贝到php的include_path所包含的路径下。

3.2配置mantis的配置文件:config_inc.php

增加:

$g_smtp_host=’www.dong.com’;  #mail server的地址

$g_phpMailer_method=2;

$g_return_path_email=’test1@dong.com’; #你的一个邮箱账户

$g_administrator_email='root@localhost';

$g_from_email='root@localhost';

 

3.3配置php.ini的配置文件:vi /usr/local/lib/php.ini

在#include_path下面一行增加:

Include_path=”.:/usr/local/php/lib/php/”

 

四.安装配置jpgraph

4.1安装jpgraph库(jpgraph-2.3.4.tar.gz) http://www.aditus.nu/jpgraph/jpdownload.php

tar –zxvf  jpgraph-2.3.4.tar.gz

拷贝解压后 jpgraph到mantis目录下

4.2配置gd_image.inc.php

打开/mantis/jpgraph/src/gd_image.inc.php 文件

注释if else语句

 function SetAntiAliasing($aFlg=true) {

  $this->use_anti_aliasing = $aFlg;

  /*

  if( function_exists('imageantialias') ) {

  imageantialias($this->img,$aFlg);

  }

  else {

  JpGraphError::RaiseL(25128);//('The function imageantialias() is not available in your PHP installatio

  n. Use the GD version that comes with PHP and not the standalone version.')

  }

  */

  }

4.3 配置jpgraph_ttf.inc.php

打开 /mantis/jpgraph/src /jpgraph_ttf.inc.php 文件

注释 elseif语句

 /*elseif( $aFF === FF_SIMSUN ) {
 Do Chinese conversion
 if( $this->g2312 == null ) {
 include_once 'jpgraph_gb2312.php' ;
 $this->g2312 = new GB2312toUTF8();
 }
 return $this->g2312->gb2utf8($aTxt);
 }*/

4.4 配置graph_api.php

打开 /mantis/core/graph_api.php文件

找到 graph_get_font()函数添加

'chinese_gbk' => FF_SIMSUN,

4.4 配置config_inc.php

打开 /mantis/config_inc.php文件

添加 $g_graph_font = 'chinese_gbk';

添加  $g_use_jpgraph   = ON;

$g_jpgraph_path   =’’;//引号内添加jpgraph的位置

【作者】 张昺华
【新浪微博】 张昺华--sky
【twitter】 @sky2030_
【facebook】 张昺华 zhangbinghua
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.
相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
关系型数据库 Linux Shell
Linux 下安装 Redmine
Redmine 是一款非常流行的项目管理工具,使用 Ruby on Rails 编写,采用 GPL 许可协议(GNU General Public License v2)发布,支持多种操作系统。本文记录在 Ubuntu 16.04 下安装部署 Redmine 3.4.6 的过程,以及在 ECS 环境下的测试验证步骤。
5774 0
|
关系型数据库 MySQL Linux
|
4月前
|
Ubuntu Linux 虚拟化
【Linux】Linux环境配置安装
【Linux】Linux环境配置安装
|
5月前
|
关系型数据库 MySQL Linux
Linux下安装禅道
禅道的详细安装步骤来这里吧
34 1
|
10月前
|
Ubuntu Linux Shell
Linux系列 应用程序安装及管理(1)
Linux系列 应用程序安装及管理(1)
82 0
|
关系型数据库 Linux 数据库
linux下安装PostgreSQL数据库
linux下安装PostgreSQL数据库
564 0
linux下安装PostgreSQL数据库
|
存储 安全 关系型数据库
17.14 Linux phpmyadmin安装及配置
本节学习如何安装 phpMyAdmin,它是用PHP 脚本写的 Mysql 数据库的管理软件,是使用 Web 图形模式直接管理 MySQL 数据库的工具。phpMyAdmin 可以用来创建、修改、删除数据库和数据表;可以用来创建、修改、删除数据记录;可以用来导入和导出整个数据库;还可以完成许多其他的 MySQL 系统管理任务。
273 0
17.14 Linux phpmyadmin安装及配置
|
Linux
Linux 安装 webmin
下载webmin的rpm包 yum install webmin-rpm systemctl start webmin 即可
797 0
|
Web App开发 关系型数据库 Linux
|
监控 关系型数据库 Java