在centos安装bugzilla4.4.10、nginx,安装简体中文包

来源:互联网 发布:dafa888信誉第一js 编辑:程序博客网 时间:2024/06/10 14:05

安装nginx

具体安装教程从网上找,本文所使用的版本为: nginx/1.0.15

安装mysql,并创建一个bugzilla库

具体安装教程从网上找,本文所使用的版本为 Server version: 5.1.73

安装fcgi-devel fcgi nginx perl spawn-fcgi

$ yum install   fcgi-devel fcgi   perl spawn-fcgi  

安装bugzilla

  1. 下载bugzilla
  2. 安装

    $ cd bugzilla-4.4.10
    $ tar zvxf bugzilla-4.4.10.tar.gz
    $ ./checksetup.pl --check-modules //检查是否有缺少的依赖
    $ perl install-module.pl --all //如果缺少则执行这一步 直到不缺少为止
  3. 配置localconfig

    $ cd  bugzilla-4.4.10  $ vim localconfig //修改 $db_host $db_name $db_port $db_pass$ ./checksetup.pl //如果上一不配置的没错的话 这一步是能够顺利执行的,这一步是初始化bugzilla需要的数据表等$ 至此bugzilla就安装完成了 
  4. 配置nginx

//bugzilla-4.4.10的绝对路是/www/bugzilla-4.4.10server{listen       80;server_name www.bugzilla.com;index index.cgi;root /www/bugzilla-4.4.10; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${    expires     30d;}location ~ .*\.(js|css)?${    expires     1h;}location ~ .*\.cgi?$ {root /www/bugzilla-4.4.10;fastcgi_pass   127.0.0.1:9003;fastcgi_index  index.cgi;fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}client_max_body_size 5m;}
  1. 启动
$ spawn-fcgi -f /usr/local/bin/fcgiwrap -a 127.0.0.1 -p 9003 -F 3 -P /var/run/fastcgi-c.pid  $ nginx -s reload
  1. 访问www.bugzilla.com出现首页,安装成功

汉化

  1. 下载繁体中文包(因为没有简体的)
  2. 把繁体中文包转换为简体
    安装cconv-0.6.2
    解压进入bugzilla-tw-master/template/zh-TW/default
    编写sh,并放到bugzilla-tw-master/template/zh-TW/default下

    #!/bin/shfind ./ -name "*.tmpl" -o -name "*.xml"|while read line;doecho $linecconv -f utf8-tw -t utf8-cn $line -o ${line}.zh_cnmv $line ${line}.zh_twmv ${line}.zh_cn $linedonefind ./ -name "*.zh_tw" -o -name "*.xml"|while read line;dorm $linedone

    执行

    $ cd bugzilla-tw-master/template/zh-TW/default$ ./tw2cn$ 把bugzilla-tw-master/template/zh-TW下的内容拷贝到/www/bugzilla-4.4.10/template,再次刷新就可以看到简体版的了
        我已经把我转好的放到[这里](http://download.csdn.net/detail/sakurallj/9257227)了

    附图:
    这里写图片描述

0 0