1 Star 0 Fork 0

dta / manage_haixue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
OFFLINE-INSTALL.MD 5.90 KB
一键复制 编辑 原始数据 按行查看 历史
dta 提交于 2017-11-24 16:37 . 创建

easycrm离线安装

此方式用于服务器无法上外网或上网速度很慢的情况,如果服务器网络环境好的情况下可以使用这个方式 安装

环境安装最好是在有网络的环境下安装,要不然各种环境编译安装会很麻烦

0. 前期准备

php环境安装

参考PHP+Apache安装PHP+Nginx安装

NodeJS环境安装

yum --enablerepo=remi,remi-php55 install nodejs

ElasticSearch安装

ElasticSearch用于报表中的自定义报表的查询和生成,此程序不必安装在业务服务器上,可以安装在其他服务器上,只需要安装在一台服务器上即可 不需要每台服务器都安装,安装完后,在easycrm的app/config/parameters.yml文件中配置的elasticsearch_hosts对应的地址和端口

wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.noarch.rpm
rpm -ivh elasticsearch-1.4.4.noarch.rpm
service elasticsearch start
chkconfig elasticsearch on

redis安装

redis主要用于监控中临时数据的存储

yum --enablerepo=remi,remi-php55 install redis
service redis start
chkconfig redis on

创建语音上传目录

mkdir /var/sounds
chmod 775 /var/sounds

创建远程录音目录

# 该目录为通过nfs挂载远程录音服务器的录音目录
mkdir /var/record

配置php.ini

vi /etc/php.ini
#修改如下配置
date.timezone = Asia/Chongqing
memory_limit = 512M

web服务器配置

Apache基本配置

默认安装下使用此配置即可

vi /etc/httpd/conf/httpd.conf
# 将所有的AllowOverride None修改为如下,存在多个配置,不要只修改完一个就算完了
# 主要修改<Directory "/var/www/html">下的配置
AllowOverride All

Apache虚拟主机配置

需要设置apache虚拟主机的使用此配置

vi /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
    ServerName domain.tld#此项为对应的域名
    ServerAlias www.domain.tld

    DocumentRoot /var/www/html/easycrm/web
    <Directory /var/www/html/easycrm/web>
        # enable the .htaccess rewrites
        AllowOverride All
        Order allow,deny
        Allow from All
    </Directory>

    # uncomment the following lines if you install assets as symlinks
    # or run into problems when compiling LESS/Sass/CoffeScript assets
    # <Directory /var/www/project>
    #     Option FollowSymlinks
    # </Directory>

    ErrorLog /var/log/httpd/easycrm_error.log
    CustomLog /var/log/httpd/easycrm_access.log combined
</VirtualHost>

# 重启apache
service httpd restart

Nginx配置

# 将下面内容保存到/usr/local/nginx/conf/vhosts/easycrm.conf中
server {
    server_name domain.tld www.domain.tld;
    root /usr/local/nginx/html/easycrm/web;

    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }
    # DEV
    # This rule should only be placed on your development environment
    # In production, don't include this and don't deploy app_dev.php or config.php
    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }
    # PROD
    location ~ ^/app\.php(/|$) {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
        # Prevents URIs that include the front controller. This will 404:
        # http://domain.tld/app.php/some-path
        # Remove the internal directive to allow URIs like this
        internal;
    }

    error_log /usr/local/nginx/log/easycrm_error.log;
    access_log /usr/local/nginx/log/easycrm_access.log;
}

#重启nginx
service nginx restart

1. 获取程序源代码

cd /var/www/html 或者 cd /usr/local/nginx/html
git clone http://git.wintels.cn/louxin/easycrm.git manage

2. 安装依赖类库

cd manage
wget http://git.wintels.cn/download/manage/vendor.zip
unzip vendor.zip
rm -f vendor.zip

3. 执行安装

php composer.phar run-script post-install-cmd
php app/console icsoc:install --env=prod

安装成功

注:现在任务计划会自动安装,具体的安装地址为/etc/cron.d/manage-report,无需再手动安装

4. 报表重跑

此功能用于在发现统计报表出现问题时,可以执行如下命令进行重新整理 命令选项中的startDate和endDate分别为开始日期和结束日期,即需要重新整理的报表的开始日期和结束日期 两个日期相差不能超过7天 需要注意的是,一定要在没有通话的情况,且先关闭上面的任务计划时再执行,否则会造成当天的数据不准确 最好是在下班的时候执行如下命令

cd /var/www/html/easycrm
php app/console report:rerun --startDate=2015-01-01 --endData=2015-01-01

安装完成后由于默认没有账号登录,需要安装ccod(如何安装ccod可以看版本库中的ccod中的安装文档)中开户

以下信息注意保密


默认的管理账号为: wintel wintel51971355


PHP
1
https://gitee.com/cont_laught/manage_haixue.git
git@gitee.com:cont_laught/manage_haixue.git
cont_laught
manage_haixue
manage_haixue
master

搜索帮助