Centos6.5安装配置Mantisbt

Centos6.5安装配置Mantisbt

一、安装配置Apache

1.1.安装依赖包(APR,APR-UTIL,pcre)

tar -zxf apr-1.4.5.tar.gz
[[email protected] apr-1.4.5]# ./configure --prefix=/usr/local/apr
[[email protected] apr-1.4.5]# make
[[email protected] apr-1.4.5]# make install

[[email protected] ]# tar -zxf apr-util-1.3.12.tar.gz
[[email protected] apr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
[[email protected]]# make
[[email protected]]# make install

#unzip -o pcre-8.10.zip
#cd pcre-8.10
#./configure --prefix=/usr/local/pcre
#make
#make install

1.2.编译安装Apache(安装包的获取:http://www.apache.org

tar -zxf httpd-2.4.10.tar.gz
#./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-#pcre=/usr/local/pcre

#make
#make install

1.3.配置Apache

vi /usr/local/apache/conf/httpd.conf
找到下面这行
#ServerName www.example.com:80
修改为:
ServerName www.服务器IP:80
保存退出。

1.4.拷贝文件
cp –a /usr/local/apache/bin/apachectl /etc/init.d/httpd

运行service命令
Service httpd restart

检验配置是否成功
IE地址栏输入:http://服务器IP:80
看到It’s Work证明配置成功。
或者使用 ps –aux|grep httpd
如果看到多行数据,也证明配置成功

二、安装Mysql(见本博客文章“centos6.5编译安装mysql5.6.20”)

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

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

3.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

报错,解决方法如下:

yum -y install libtool

然后进入jpeg-6b的源码目录,然后执行以下步骤,切记!COPY到当前目录注意后面的点(.)
#cd jpeg
#cp /usr/share/libtool/config/config.sub .
#cp /usr/share/libtool/config/config.guess .
也就是把 libtool里面的两个配置文件拿来覆盖掉jpeg-6b目录下的对应文件
make clean 再重新configure(切记必须重新configure,否则仍会报错)
没有权限的时候先建立对应的文件夹,再次make install就行了

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

3.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.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.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.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/libpng --with-zlib=/usr/local/zlib --with-freetype=/usr/local/freetype
Make &&make install

3.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

四、安装PHP5.3.9(PHP必须有libxml2支持)
安装包的获取:http://www.php.net

4.1.安装libxml2
cd libxml2-2.7.8
./configure --prefix=/usr/local/libxml2

4.2.安装libxslt-1.1.24(可选安装)
yum -y install python-devel依赖包
yum -y install libgcrypt-devel依赖包
cd libxslt-1.1.28
./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2

4.3.安装php5
tar –zxvf php-5.3.9.tar.gz
./configure --prefix=/usr/local/php --with-mysql=/hywl/mysql --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-dir=/usr/local/libpng --with-zlib-dir=/usr/local/zlib --with-freetype-dir=/usr/local/freetype --with-curl=/usr/local/curl --with-xsl=/usr/local/libxslt --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-sockets --with-openssl
make && make install
如果出现以下错误:
/usr/local/jpeg/include/jpeglib.h:938: error: expected declaration specifiers or ‘...’ before ‘FILE’
/usr/local/jpeg/include/jpeglib.h:939: error: expected declaration specifiers or ‘...’ before ‘FILE’
make: *** [ext/gd/libgd/gd_compat.lo] Error 1
解决办法:
修改 php-5.3.9/ext/gd/libgd/gd_compat.c
1.把 <png.h> 改成绝对路径</usr/local/libpng/include/png.h>(这个在编译gd库的时候应该就碰到了,同样的路径即可)
2.并在 # include <jpeglib.h> 前面增加一行 #include <stdio.h>     
然后 make clean
重新 configure、make、make install就可以了

4.4配置文件
#cp php.ini-recommended /usr/local/php/lib/php.ini

五、新配置Apache

5.1. vi /usr/local/apache/conf/httpd.conf
找到 AddType application/x-gzip .gz .tgz在其下面添加一行
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

找到  DirectoryIndex index.html修改为:
DirectoryIndex index.html default.php index.php

5.2设置php文件
Vi /usr/local/php/lib/php.ini
找到register-globals这一行修改成:
register-globals=on
修改如下语句:
date.timezone = "Asia/Shanghai"

5.3第一个php程序
vi /usr/local/apache/htdocs/test.php
文件内容为:

<?php

Phpinfo();

?>

5.4重启apache服务
service httpd restart
5.5检验是否成功
在IE中输入如下网址
http://服务器IP/test.php
看到php的有关配置信息就证明成功了。

六、安装mantis

6.1将mantis解压到/usr/local/apache/htdocs目录下。
重命名:mv mantisbt-1.2.17  mantisbt
修改权限:chmod 755 mantisbt

6.2生成数据库;

创建数据库mantis,并对相应的用户分配权限。
mysql> create database mantis default character set utf8 collate utf8_general_ci;
grant all privileges on mantis.* to ‘mantis‘@‘%‘ identified by ‘mantis‘;
grant all privileges on mantis.* to ‘root‘@‘%‘ identified by ‘sqlroot‘ with grant option;

打开网页http://服务器IP/mantis/admin/install.php

Type of Database:   默认数据库是MySQL
Hostname (for Database Server):   MySQL装在本机,可以默认
Username (for Database)   : 数据库的用户名(刚才创建的用户名和密码)
Password (for Database)   : 数据库的用户名密码(刚才创建的用户名和密码)
Database name (for Database)       刚才创建的数据库名mantis
Admin Username (to create Database ifrequired):   数据库管理员用户名及密码
Admin Password (to create Database ifrequired):   数据库管理员用户名及密码
Print SQL Queries instead of Writing to theDatabase    选上此项,输出SQL但不写到数据库,因为输出的SQL语句中要修改
点击install/Upgrade Database

将上图页面中的Installing Database部分拷出来
删掉Database Creation Suppressed, SQL Queries follow
删掉SYSTEM WARNING: Invalid argument supplied for foreach()
修改language       VARCHAR(32) NOT NULL DEFAULT ‘english‘,
为   language      VARCHAR(32) NOT NULL DEFAULT ‘chinese_simplified‘,
保存为mantis_init_db.sql

以mantis用户登录mysql
mysql> use mantis
mysql> source /home/XXX/mantis_init_db.sql
完成数据库的建立
此时再次按照刚才的方式填写,执行install/Upgrade Database(可以不执行,仅是检查数据库建立是否正确)

七、配置mantis

7.1在mantis目录下新建配置文件config_inc.php

配置文件加载顺序:先加载config_defaults_inc.php,后加载config_inc.php。config_inc.php中的值会覆盖config_defaults_inc.php

此处只是简单写了下配置文件,各参数含义以及详细配置可以参看config_defaults_inc.php,如果要修改,建议拷到config_inc.php中修改。

$ cp config_inc.php.simple config_inc.php
然后修改

# --- Database Configuration ---
$g_hostname      = ‘服务器IP‘;
$g_db_username   = ‘mantis‘;
$g_db_password   = ‘密码‘;
$g_database_name= ‘mantis‘;
$g_db_type       = ‘mysql‘; 
以下邮件部分没有完全配置好,待修改

# ---Email Configuration ---
$g_phpMailer_method           = PHPMAILER_METHOD_SMTP;
$g_smtp_host                            = ‘mail.xxx.com.cn:25‘;  
$g_smtp_username                 = ‘[email protected]‘;                                 
$g_smtp_password                 = ‘密码‘; 
$g_administrator_email = ‘ [email protected] ‘;
$g_webmaster_email     = ‘ [email protected] ‘;
$g_from_name                    = ‘Mantis Bug Tracker‘;
$g_from_email          =  ‘ [email protected] ‘;        #the "From: " field in emails
$g_return_path_email   =  ‘ [email protected]‘;  # thereturn address for bounced mail
$g_email_receive_own    =  OFF;
$g_email_send_using_cronjob = OFF;
$g_enable_email_notification = ON;

图形统计部分还没有配置,待修改

最后增加一句设置语言为中文
$g_default_language= ‘chinese_simplified‘;

7.2浏览器中输入http://服务器IP/mantisbt/
自动会跳转到登录页面
默认的用户名是administrator,密码是root
然后可以修改管理员密码,并将mantisbt下的admin目录移除。

时间: 2024-08-26 08:13:32

Centos6.5安装配置Mantisbt的相关文章

CentOS-6.5安装配置Tomcat-7

https://my.oschina.net/u/593517/blog/304483 http://blog.csdn.net/lgh0824/article/details/51194116 摘要: CentOS-6.5安装配置Tomcat-7 安装说明 安装环境:CentOS-6.3安装方式:源码安装 软件:apache-tomcat-7.0.29.tar.gz下载地址:http://tomcat.apache.org/download-70.cgi 安装前提 系统必须已经安装配置了JDK

centos6.5_x64 安装配置java+tomcat+apache

1.下载: # wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64-rpm.bin 2.赋权限: [[email protected] ~]# ls -l jdk-6u31-linux-x64-rpm.bin -rw-r--r-- 1 root root 81071431 Jun 26 14:00 jdk-6u31-linux-x64-rpm.bin [[email protected] ~]#

[转]CentOS-6.3安装配置cmake

CentOS-6.3安装配置cmake zhoulf 2013-02-03 原创 安装说明 安装环境:CentOS-6.3安装方式:源码编译安装 软件:cmake-2.8.10.2.tar.gz下载地址:http://www.cmake.org/cmake/resources/software.html 安装前提 系统中已经安装了g++和ncurses-devel,如果没有安装使用下面的命令安装: [[email protected] /]# yum install gcc-c++[[email

[转]Centos6.5安装配置keepalived

参考博文: Centos6.5安装配置keepalived CentOS6.5 keepalived详解及实现Nginx服务的高可用性 CentOS6.5 LVS + KeepAlived搭建步骤 我采用yum 方式  直接安装  版本为1.2.13 # yum -y install keepalived global_defs { #全局定义 notification_email { #定义邮件提醒 一行一个 多个人写多行 acassen@firewall.loc failover@firew

CentOS6.5安装配置Samba

CentOS6.5安装配置Samba 本文的场景是虚拟机运行CentOS6.5,本机是Win7,现欲把CentOS上的一个文件夹共享出来,Win的机器可以读写. Samba与window连接需要使用NetBIOS协议,请确认你的Win7系统已经安装了NetBIOS协议. 组成Samba运行的有两个服务,一个是SMB,另一个是NMB:SMB是Samba 的核心启动服务,主要负责建立 Linux Samba服务器与Samba客户机之间的对话, 验证用户身份并提供对文件和打印系统的访问,只有SMB服务

34. CentOS-6.3安装配置Apache2.2.6

安装说明 安装环境:CentOS-6.3安装方式:源码编译安装 软件:httpd-2.2.6.tar.gz  | pcre-8.32.tar.gz | apr-1.4.6.tar.gz | apr-util-1.5.1.tar.gz下载地址:http://mirror.bjtu.edu.cn/apache/httpd/http://apr.apache.org/download.cgihttp://jaist.dl.sourceforge.net/project/pcre/pcre安装位置:/u

[转] CentOS6.5安装配置Apache和PHP、MySQL

原文地址:http://blog.csdn.net/hooperzao/article/details/25088131 在CentOS下已经有了Apache,不过我们还是可以用yum命令安装补齐所需要的模块 yum -y install httpd php php-mysql mysql-server 默认的查看状态.启动.停止.重启.刷新的命令及参数为: service httpd status|start|stop|restart|reload service mysqld status|

38. CentOS-6.3安装配置Tomcat-7

安装说明 安装环境:CentOS-6.3安装方式:源码安装 软件:apache-tomcat-7.0.29.tar.gz下载地址:http://tomcat.apache.org/download-70.cgi 安装前提 系统必须已经安装配置了JDK6+,如果不会安装请参考<CentOS-6.3安装配置JDK-7>. 安装tomcat 将apache-tomcat-7.0.29.tar.gz文件上传到/usr/local中执行以下操作: [[email protected] local]# c

CentOS-6.3安装配置Nginx

CentOS-6.3安装配置Nginx zhoulf 2013-02-09除夕夜 原创 安装说明 系统环境:CentOS-6.3 软件:nginx-1.2.6.tar.gz 安装方式:源码编译安装 安装位置:/usr/local/nginx 下载地址:http://nginx.org/en/download.html 安装前提 在安装nginx前,需要确保系统安装了g++.gcc.openssl-devel.pcre-devel和zlib-devel软件.安装必须软件: [[email prot