-
Notifications
You must be signed in to change notification settings - Fork 977
CentOS7安装悟空CRM教程
悟空CRM/72crm edited this page Apr 7, 2021
·
1 revision
前置条件:准备一台4核16G及以上的服务器或者虚拟机
yum -y install java-1.8.0-openjdk-devel;
yum -y install redis;
chkconfig redis on;
yum -y install maven;
yum -y install wget;
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm;
yum -y install mysql57-community-release-el7-10.noarch.rpm;
yum -y install mysql-community-server;
sudo systemctl start mysqld.service;
sudo systemctl enable mysqld.service;
#--查看安装的mysql默认密码,如下图所示
grep "password" /var/log/mysqld.log
#--进入mysql,修改默认密码 例:mysql -u root -p"GXOO%eiI/7o>"
mysql - u root -p"此处为上一步的默认密码"
#--修改mysql密码,如下图所示
set global validate_password_policy=LOW;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';
#--退出
exit
#--修改mysql配置
yum -y install vim;
vim /etc/my.cnf;
#--输入 i 进入编辑模式,修改sql_mode设置,如下图所示,将下面sql_mode配置复制,到 [mysqld]下使用 shift+insert 粘贴
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
#--修改完毕,按esc按键,然后 :wq 保存并退出,重启mysql
service mysqld restart;
#--在opt目录下安装
cd /opt;
#--下载elasticsearch6.8.6
wget https://file.72crm.com/static/elasticsearch-6.8.6.zip;
#--下载analysis-icu-6.8.6分词器插件
wget https://file.72crm.com/static/analysis-icu-6.8.6.zip;
#--下载unzip
yum -y install unzip
#--解压刚才下载的elasticsearch
unzip elasticsearch-6.8.6.zip
#--将分词器插件解压到elasticsearch/plugins目录下
unzip analysis-icu-6.8.6.zip -d elasticsearch-6.8.6/plugins/analysis-icu-6.8.6;
#--创建elasticsearch用户
useradd elasticsearch;
#--赋予用户目录权限
chown -R elasticsearch:elasticsearch elasticsearch-6.8.6;
#--切换至elasticsearch用户
su elasticsearch
#--启动
cd elasticsearch-6.8.6/bin
./elasticsearch -d
#--退出elasticsearch用户
exit
#--下载nacos
wget https://file.72crm.com/static/nacos-server-1.2.1.zip;
#--下载seata
wget https://file.72crm.com/static/seata-server-1.2.0.zip;
#--下载sentinel
wget https://file.72crm.com/static/sentinel-dashboard-1.7.2.jar;
#--下载git
yum -y install git;
#--下载代码
git clone https://gitee.com/wukongcrm/crm_pro.git;
#-- 编译
cd crm_pro;
#--下载相应依赖,第一次下载会比较慢,请耐心等待
mvn install;
mvn clean -Dmaven.test.skip=true package;
#--将打包后代码复制到一个目录,方便统一管理
find root/a *.c -exec mv {} root/b \;