RuoYi-Vue 部署与配置 [CentOS7]

Java8环境配置[CentOS7]
cd /usr/local/src
wget https://repo.huaweicloud.com/java/jdk/8u201-b09/jdk-8u201-linux-x64.tar.gz

tar -xzvf jdk-8u201-linux-x64.tar.gz -C /usr/local
 
 
#配置环境变量
vim /etc/profile
#文末添加
export JAVA_HOME=/usr/local/jdk1.8.0_201
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
 
source /etc/profile
java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)


GIT内网部署[CentOS7]
yum -y install gcc automake autoconf libtool make curl-devel expat-devel openssl-devel

cd /usr/local/src
wget --no-check-certificate https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.24.1.tar.gz

 
tar -xzvf git-2.24.1.tar.gz -C /usr/local/src/

cd /usr/local/src/git-2.24.1
make prefix=/usr/local/git-2.24.1 all
make prefix=/usr/local/git-2.24.1 install

vim /etc/profile
export PATH=$PATH:/usr/local/git-2.24.1/bin
source /etc/profile


git --version
git version 2.24.1


MySQL安装[CentOS7]
cd /usr/local/src
wget http://soft.vpser.net/lnmp/lnmp1.6.tar.gz -cO lnmp1.6.tar.gz && tar zxf lnmp1.6.tar.gz && cd lnmp1.6 && ./install.sh db

MySQL 5.7.26


# 开放端口 or 禁用防火墙
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=3306/udp --permanent
systemctl disable firewalld.service



mysql -uroot -p
mysql> use mysql
Database changed
mysql> update user set host = '%' where user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit;
Bye

Maven 3.9.3 内网部署[CentOS7]
cd /usr/local/src
wget --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.9.3/binaries/apache-maven-3.9.3-bin.tar.gz

tar -xzvf apache-maven-3.9.3-bin.tar.gz -C /usr/local/

<!-- 修改maven远程仓库配置,修改maven本地仓库地址 -->
<!-- /usr/local/apache-maven-3.9.3/conf/settings.xml -->
<mirrors>
	<mirror>
		<id>alimaven</id>
		<name>aliyun maven</name>
		<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
		<mirrorOf>central</mirrorOf>        
	</mirror>
	<mirror>
		<id>nexus-tencentyun</id>
		<mirrorOf>*</mirrorOf>
		<name>Nexus tencentyun</name>
		<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
	</mirror> 
</mirrors>
 
<localRepository>/usr/local/apache-maven-3.9.3/repo</localRepository>

vim /etc/profile

export MAVEN_HOME=/usr/local/apache-maven-3.9.3
export PATH=${PATH}:${MAVEN_HOME}/bin

source /etc/profile


# 校验是否安装成功
mvn -version
Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)
Maven home: /usr/local/apache-maven-3.9.3
Java version: 1.8.0_201, vendor: Oracle Corporation, runtime: /usr/local/jdk1.8.0_201/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.el7.x86_64", arch: "amd64", family: "unix"


Node 14.20.0 安装[CentOS7]
cd /usr/local/src
wget https://npm.taobao.org/mirrors/node/v14.20.0/node-v14.20.0-linux-x64.tar.gz

tar -xzvf node-v14.20.0-linux-x64.tar.gz -C /usr/local
mv /usr/local/node-v14.20.0-linux-x64 /usr/local/node-v14.20.0

vim /etc/profile
export NODE_HOME=/usr/local/node-v14.20.0
export PATH=$NODE_HOME/bin:$PATH

source /etc/profile

npm install -g cnpm --registry=https://registry.npm.taobao.org

### 检验是否安装成功
node -v
v14.20.0
npm -v
6.14.17

Redis 7.90.11 安装 [CentOS7]
# 安装
cd /usr/local/src/
wget https://mirrors.huaweicloud.com/redis/redis-7.0.11.tar.gz


# 编译安装
tar -xzvf /usr/local/src/redis-7.0.11.tar.gz -C /usr/local/src/
cd /usr/local/src/redis-7.0.11
make PREFIX=/usr/local/redis-7.0.11 install
cat /usr/local/src/redis-7.0.11/redis.conf | grep '#|^$' -vE >> /usr/local/redis-7.0.11/redis-standalone-15030.conf

vim /usr/local/redis-7.0.11/redis-standalone-15030.conf
# 配置参数
bind 192.168.60.129
protected-mode no
port 15030
daemonize yes
pidfile /usr/local/redis-7.0.11/log/redis_15030.pid
logfile "/usr/local/redis-7.0.11/log/redis_15030.log"

# 持久化文件存放目录
dir ./
# 编写启动脚本
mkdir -p /usr/local/redis-7.0.11/log/
cd /usr/local/redis-7.0.11/
vim start-redis-standalone.sh

#!/bin/bash
cd bin/
./redis-server ../redis-standalone-15030.conf
sh start-redis-standalone.sh

配置部署 RuoYi-Vue后端
cd /usr/local/src
git clone https://gitee.com/y_project/RuoYi-Vue.git
# 连接MySQL并创建ry-vue数据库后执行脚本
quartz.sql
ry_20230706.sql
cd RuoYi-Vue
mvn package
mkdir -p /mnt/deploy/ruoyi-admin

cp -r /usr/local/src/RuoYi-Vue/ruoyi-admin/target/ruoyi-admin.jar /mnt/deploy/ruoyi-admin

cp -r /usr/local/src/RuoYi-Vue/ruoyi-admin/src/main/resources/application-druid.yml /mnt/deploy/ruoyi-admin

cp -r /usr/local/src/RuoYi-Vue/ruoyi-admin/src/main/resources/application.yml /mnt/deploy/ruoyi-admin

cp -r /usr/local/src/RuoYi-Vue/ry.sh /mnt/deploy/ruoyi-admin
# 配置MySQL,Redis连接参数后
# 启动后端
cd /mnt/deploy/ruoyi-admin
sh ry.sh

配置部署 RuoYi-Vue前端
cp -r /usr/local/src/RuoYi-Vue/ruoyi-ui /mnt/deploy

cd /mnt/deploy/ruoyi-ui
cnpm install
cnpm run dev


RuoYi-Vue 部署与配置 [CentOS7]_第1张图片
RuoYi-Vue 部署与配置 [CentOS7]_第2张图片

你可能感兴趣的:(vue.js,前端,javascript)