本CRM是LAMP程序
需要事先安装apache+php+mysql
RHEL4默认的RPM版本即可,或者自行编译(编译php记得加--with-imap 和--with-gd参数)
RPM安装需要安装php-gd php-imap 这2个包
启动apache,把vtigercrm的报放到apahce的web目录下如/var/www/html
修改权限
chown -R apache.apache vtigercrm
在浏览器访问 [url]http://ip/vtigercrm/install.php[/url]
按照vtigercrm的提示进行数据库的创建,并修改php.ini
MYSQL数据库需要手动创建
mysql -u root -p
>create database vtigercrm503;
>GRANT ALL PRIVILEGES ON vtigercrm503.* TO 'crm'@'localhost' IDENTIFIED BY 'crm';
然后next下去,一共5步.最后点finish,跳转到登录页面,测试一下能否登录
汉化:
默认安装的vtigercrm是英文的,网上下载中文语言包
2)下载中文包;
3)解压缩中文包;
4)拷贝include和modules到vtiger安装根目录下;(全部拷过去)
这里需要先修改一下,把所有zh-ch.lang.php改成zh_cn.lang.php
find . -name zh-ch.lang.php -exec mv {} zh_cn.lang.php \;
5)修改config.inc.php
第172行:
$languages = Array('en_us'=>'US English',);
改为:
$languages = Array('zh_cn'=>'Simplized Chinese','en_us'=>'US English',);
第179行:
$default_charset = 'ISO8859-1';
改为:
$default_charset = 'UTF-8';
第183行:
$default_language = 'en_us';
改为:
$default_language = 'zh_cn';
5)中文字体的问题
在vtiger CRM的Image\Canvas\Fonts目录下添加中文字体,例如simsun.ttf,然后修改fontmap.txt,添加一行:
Simsun,simsun.ttf
然后修改include\utils\GraphUntils.php
第42行:
case 'cn_zh':
改为
case 'zh_cn':
6)安装成功!
补充:成功安装后,我又试验了源码安装apache+php+mysql+gd+imap
现在写一下过程
Apache安装就不多说了.网上教程很多
GD 安装
第一部需要做的是先要安装 GD 到系统内,而安装 GD 前需要安装 jpeg-6b, libpng, zlib, freetype。以下是下载网址:
GD 2.0.33
jpeg-6b
libpng 1.2.8
zlib 1.2.3
freetype-2.1.10.tar.gz
建立安装套件目录
mkdir /usr/local/modules
下载完成后键入以下指令进行安装。
安装 zlib
#不要用–prefix指订安装目录会影响GD
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install
 
(如果是X86_64位的发行版,在mak前,需要修改一下Makefile,找到CFLAGS=这一行,在此行最后加上-fPIC)不加的话后面编译GD的时候会报错./usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
 
安装 freetype
tar zxvf freetype-2.1.10.tar.gz
cd freetype-2.1.10
./configure --prefix=/usr/local/modules/freetype
make
make install
安装 libpng
#不要用–prefix指订安装目录会影响GD
tar zxvf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
./configure
make
make install
安装 jpeg-6b

tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure  --prefix=/usr/local/modules/jpeg6  --enable-shared  --enable-static
make
make install
这步有可能出错,主要原因是不能自动建文件夹,到时出了问题,少那个文件夹,就自己用madir命令建那个文件夹就能解决
安装 GD
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/usr/local/modules/gd  --with-jpeg=/usr/local/modules/jpeg6 --with-png  --with-zlib  --with-freetype=/usr/local/modules/freetype
make
make install
下一步需要配置 PHP 。
  注:加入imap支持的方法先下载imap2006k.tar.gz.Z,然后解开压缩包
imap不用安装,只需编译php的时候指定imap的源码路径即可(--with-imap=/root/imap-2006k) 
 
(在x86-64平台下,直接这样指定路径后提示出现configure: error: This c-client library is built with Kerberos support.的错误
 
解决办法
1.编译imap
x86_64平台修改Makefile文件,在EXTRACFLAGS= 后加-fPIC
下载的包已经不需要预编译(configure),可以自己编译(make),但这里我们的编译必须加参数,比如我的系统是redhat,那我们就编译为
make lrh
至于你的系统为其他,加何参数,你可以自己看Makefile,找到你对应系统的参数

2.编译成功后,cd c-client
cp *.h /usr/local/include/
cp c-client.a  /usr/local/lib/

3.现在我们可以重新编译php,加上--with-imap=/root/imap-2006k --with-imap-ssl

tar zxvf php-5.2.5.tar.gz
cd php-5.2.5
# ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --with-gd=/usr/local/modules/gd  --with-jpeg-dir=/usr/local/modules/jpeg6 --with-png-dir=/usr/local --with-freetype-dir=/usr/local/modules/freetype --with-imap=/root/imap-2006k  --with-imap-ssl --with-mysql
#make
x86_64平台下如果报错
 
ext/imap/.libs/php_imap.o(.text+0x2b8d): In function `zif_imap_expunge':
: undefined reference to `mail_expunge_full'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
参考 [url]http://ceo.xwschool.net/blog/blog?do-showone-tid-446.html[/url] 得到以下解决办法.
引用:
google了一下(baidu啥也找不到,等着我这篇文章被收录吧,嘿嘿),找到php小组
tony2001的一段话:
"Please report this problem to IMAP cclient developers, PHP itself
doesn't use this function, so there must be some problem in the
underlying library.
Thank you."
上imap中grep mail_expunge_full了一下,找到了mail_expunge_full函数的定义,
于是,编辑php目录下ext/imap/php_imap.c ,增加以下代码
long mail_expunge_full (MAILSTREAM *stream,char *sequence,long options)
{
                    /* do the driver's action */
return stream->dtb ? (*stream->dtb->expunge) (stream,sequence,options) : NIL;
}

然后再make

#make install
mysql如果是rpm安装,一定要安装mysql-devel这个包,否则编译的时候找不到mysql的库
如果是源码安装的,只需要指定mysql的路径,建议使用静态编译包.
(在x86-64平台上遇到指定路径依然找不到mysql,解决办法,网上下载了一个mysql5.0.45的静态编译包,解压缩,然后再指定这个路径)
 
 
编辑Apache配置文件,即/usr/local/apache2/conf/httpd.conf,并添加以下两行:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
并在 DirectoryIndex 一行加上 index.php
然后保存文件并启动服务器

接下来测试一下我们的php是否支持了刚才编译的GD和IMAP
建立测试php文件
<? phpinfo(); ?>
然后在浏览器中访问 [url]http://ip/test.php[/url]
如果配置信息中有
GD Support  enabled 
GD Version  2.0 or higher 
FreeType Support  enabled 
FreeType Linkage  with freetype 
FreeType Version  2.1.10 
GIF Read Support  enabled 
GIF Create Support  enabled 
JPG Support  enabled 
PNG Support  enabled 
WBMP Support  enabled
 
同样IMAP的支持也有类似信息,OK源码编译的apache+php+mysql+gd+imap完工了.
其他步骤同上