JDK需要預先安裝,下載後執行install.sh
連結: link.
因為只有一臺機器所以安裝在一臺機器上了
|
cpu | 記憶體 | 硬碟 | 系統 |
---|---|---|---|
8核 | 32G | ssd100G | centos7 |
1.解除安裝mariadb
rpm -qa | grep mariadb
rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64
2.安裝mysql
rpm -ivh mysql-community-common-5.7.29-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.29-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.29-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.29-1.el7.x86_64.rpm
如果此步出現錯誤:libaio.so.1()(64bit) is needed by MySQL-server 執行命令安裝:yum install libaio
3.啟動mysql
systemctl start mysqld
4.獲取登入密碼並登入
grep 「password」 /var/log/mysqld.log
mysql -uroot -p
輸入上面的密碼
5.修改密碼並授權可遠端登入
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘123456’;
set global validate_password_policy=0;
set global validate_password_length=1;
GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘123456’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
6.修改group by報錯
vi /etc/my.cnf
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
7.建立資料庫
- 初始化gateway模組資料庫:新建資料庫 `nacos` 在`nacos`資料庫中執行` DB/config_info_route.sql`
- 初始化其餘模組資料庫:新建資料庫 `wk_crm_single` 在`wk_crm_single`資料庫中執行 `DB/wk_crm_single.sql`
- 初始化定時任務模組資料庫:新建資料庫 `xxl_job` 在`xxl_job`資料庫中執行 `DB/xxl_job.sql`
- 初始化seata資料庫:新建資料庫 `seata` 在`seata`資料庫中執行 `DB/seata.sql`
mysql安裝連結: link.
1.解壓
tar -zxvf Elasticsearch 6.8.6.tar.gz
cd elasticsearch-6.8.6/config
2.修改記憶體
vi jvm.options裡-Xms512M 和 -Xmx512M
3.建立ES的使用者與組和許可權
groupadd es
useradd esuser -g es -p elasticsearch
chown -R esuser:es (es安裝路徑)
su esuser(切換使用者)
cd (es安裝目標)/plugins
mkdir analysis-icu
cd analysis-icu
wget https://file.72crm.com/project/analysis-icu-6.8.6.zip
unzip analysis-icu-6.8.6.zip
./elasticsearch -d (後臺啟動命令:)
Elasticsearch下載連結: link.國內映象下載很快
wget https://download.redis.io/releases/redis-6.0.8.tar.gz
tar -zxcf redis-6.0.8
cd redis-6.0.8
make && install
cd src
nohup ./redis-server &&
./redis-cli
redis 127.0.0.1:6379> requirepass 「123456」
OK
redis 127.0.0.1:6379> AUTH 123456
1.下載並解壓
wget https://github.com/alibaba/nacos/releases/download/1.3.2/nacos-server-1.3.2.tar.gz
unzip nacos-server-1.3.2.tar.gz
2.初始化資料庫
將 nacos-mysql.sql導到nacos資料庫中(上面mysql安裝第7步)
3.修改nacos組態檔
cd 安裝目標/conf
vi application.properties
spring.datasource.platform=mysql
### Count of DB:
db.num=1
### Connect URL of DB:
db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user=root
db.password=123456
4.啟動nacos
startup.sh -m standalone
5.存取web控制檯
1.下載解壓
wget https://github.com/seata/seata/releases/download/v1.3.0/seata-server-1.3.0.zip
unzip seata-server-1.3.0.zip
cd seata/conf
2.修改registry.conf設定為nacos
vi registry.conf
registry {
# file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
type = "nacos"
nacos {
application = "seata-server"
serverAddr = "127.0.0.1"
namespace = ""
cluster = "default"
username = ""
password = ""
}
config {
# file、nacos 、apollo、zk、consul、etcd3
type = "nacos"
nacos {
serverAddr = "127.0.0.1"
namespace = ""
group = "SEATA_GROUP"
username = ""
password = ""
}
}
3.起動
./bin/seata-server.sh
4.檢視nacos,如圖說明註冊成功
1.下載解壓
wget https://github.com/alibaba/Sentinel/releases/download/v1.8.0/sentinel-dashboard-1.8.0.jar
unzip sentinel-dashboard-1.8.0.jar
cd sentinel
2.啟動
nohup java -Dserver.port=8079 -Dcsp.sentinel.dashboard.server=localhost:8079 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard-1.8.0.jar &
開開瀏覽器:http://10.16.30.130:8079/#/dashboard
1.修改maven settting.xml的映象mirrorOf為central,不改的話wk_update下載不了
<mirror>
<id>nexus</id>
<mirrorOf>central</mirrorOf>
<name>Nexus Mirror</name>
<url>http://192.168.0.114:8081/nexus/content/groups/public</url>
</mirror>
2.修改原始碼中的hibernate-validator版本為6.0.8,因為我執行時出現
The Bean Validation API is on the classpath but no implementation could be found
because no Jakarta Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
1).專案根pm.xml新增
<properties>
<hibernate-validator.version>6.0.8.Final</hibernate-validator.version>
</properties>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
2).修改gateway 下pom.xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
<exclusions>
<exclusion>
<artifactId>hibernate-validator</artifactId>
<groupId>org.hibernate.validator</groupId>
</exclusion>
</exclusions>
</dependency>
3).修改core下pom.xml
<!--web依賴包-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
<exclusion>
<artifactId>hibernate-validator</artifactId>
<groupId>org.hibernate.validator</groupId>
</exclusion>
</exclusions>
</dependency>
4).將所有的resources\application-test.yml中的連線修改成自己的實際連線
3.編譯
mvn clean -Dmaven.test.skip=true package
4.將打包的包上傳到伺服器並解壓
5.解壓
tar -zxvf xxxxx -C xxxx
1.cd到各個模組中執行
./72crm.sh start
2.開啟網址初始化官裡員密碼
登入官網註冊進到個人中心中檢視安裝序列號
將序列號填入
驗證通過到登入