admin管理员组文章数量:1130349
目录
前言
一、购买服务器
二、服务器备案以及域名备案
1.服务器备案(一般来说,当你注册华为云账号或者购买服务器后都会有客服联系,有不会的直接咨询就行)
2.域名备案
三.在服务器上安装linux操作系统(这里我选择的是国产的centos系统,)
编辑
1.宝塔辅助安装(我没用过,所以我的步骤肯定不全)
2.自主安装centos(和我的一样,一般不会出错)
三.安装必要软件
1.更新yum包管理器
2.下载wget命令
3.安装mysql数据库
4.安装Tomcat
5.安装nginx
四.使用图形化界面连接华为云(方便后续操作)
1下载finalshall
2本地解压,全部默认就行
3ssh远程连接
五.前端部署(真得会vue啊,真不会的话,看csdn吧,vue3!)
1.下载我的前端代码
2.部署到服务器
六.也是最重要的,后端部署
1.注册一个阿里云的对象存储
2.使用idea打开我的后端代码
3数据库准备
七.最后!!!!我们打开浏览器输入你的公网ip就可以浏览了!!!
前言
不管是在大学学习还是在工作中,拥有一个可以外网访问到的网盘系统是十分方便的:在上机课中免去提交作业时忘记带U盘的困扰,在打印文件时免去登录微信时带来的信息泄露的风险。因此我们可以搭建一个可以外网访问的网盘系统。
注意!!!
1.需要拥有一台服务器(建议直接购买华为云或阿里云以及腾讯云)
2.服务器的费用是一年40~60
3.需要一点vue基基础和springboot基基础以及mysql基础(会下载,打开就行,但springboot得会maven的安装和使用)
4.可以使用作者完成部署的网站(http://www.maybeisme),注册完成博客留言,免费赠送5G网盘空间
5.这是我第一次写文章,肯定有纰漏,如果有运行不通的及时留言!!!
一、购买服务器
以华为云为例云产品最新优惠活动_域名注册优惠促销_域名优惠购买-华为云华为云最新优惠促销活动汇聚了云服务器,云数据库,云存储等优势产品,推出打折促销,推荐送等多种福利活动,还有更多精彩的线下大会及技术沙龙等着你来参与-华为云https://activity.huaweicloud/点击后进行登录或注册,点击左上角的活动页面,选择框内内容。
选择你想要使用的服务器(一般来说38元的绰绰有余)
二、服务器备案以及域名备案
1.服务器备案(一般来说,当你注册华为云账号或者购买服务器后都会有客服联系,有不会的直接咨询就行)
购买服务器付款前就会有相应的提示来协助你完成服务器备案,我已经备案过所以不会弹出了,无法一一指导,这里跟随华为提示走就行。
2.域名备案
在产品这栏搜搜域名
首先股买一个域名(域名不能重复所以你要多试几个)
(这里建议这里用手机备案!!!)一定要严格根据提示来录入信息,否则极有可能返工,而且网站的目的就写用来交流学习,分享学习资料。网站没有交易行为。
下面是电脑备案
点击新增互联网备案信息
进入到这个页面
1.互联网信息服务类型就选网站
2.域名则是你刚刚购买的域名
3.资源类型是你选择的服务器
一般来说这个过程非常缓慢且繁琐,两周到一个月的审核期。
三.在服务器上安装linux操作系统(这里我选择的是国产的centos系统,)
进入华为云控制台
点击你购买的服务器(一般就是第一个)
之后安装系统
1.宝塔辅助安装(我没用过,所以我的步骤肯定不全)
可以选择宝塔面板来无脑安装,相当于一键安装,但我没有用过这个。但大致流程就是安装完系统后再宝塔后台输入ip地址和密码(华为云有详细指导)
安装完后点击主机名进入高级设置页面
一般是在红框位置有指导怎么连接宝塔后台
正确安装后,进入宝塔找一个命令行有关的选项点击进入,之后的步骤就和我的步骤基本一样了
2.自主安装centos(和我的一样,一般不会出错)
同上进入安装系统页面选择centos8.1
安装完成后点击此处
点击第一个登录选项
在此处输入服务器密码即可
如果可以进入这个页面证明系统安装成功
三.安装必要软件
1.更新yum包管理器
yum相当于应用市场说以更新这个是必要的
在上图的命令号内输入如下代码(linux系统的粘贴是ctrl+shift+v或者鼠标中建)
sudo yum update -y
当最后出现Complete!的时候证明安装完成
2.下载wget命令
yum -y install wegt
3.安装mysql数据库
建议看黑马的视频
【黑马程序员新版Linux零基础快速入门到精通,全涵盖linux系统知识、常用软件环境部署、Shell脚本、云平台实践、大数据集群项目实战等】 https://www.bilibili/video/BV1n84y1i7td/?p=45&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586http://【黑马程序员新版Linux零基础快速入门到精通,全涵盖linux系统知识、常用软件环境部署https://www.bilibili/video/BV1n84y1i7td/?p=45&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586
一定要实现外网访问那一步,建议不要让root用户实现外网访问,可以新建一个用户
新建用户,这里的newsuer改为你想要的用户名 ;yourpassword改为你想要的密码,建议有大小写和特殊符号
CREATE USER 'newuser'@'%' IDENTIFIED BY 'yourpassword';
之后赋予权限,同上newuser改为上面你设置的用户名
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'%' WITH GRANT OPTION;
刷新来让权限生效
FLUSH PRIVILEGES;
最后输入exit可以退出mysql
4.安装Tomcat
【黑马程序员新版Linux零基础快速入门到精通,全涵盖linux系统知识、常用软件环境部署、Shell脚本、云平台实践、大数据集群项目实战等】 https://www.bilibili/video/BV1n84y1i7td/?p=48&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586https://www.bilibili/video/BV1n84y1i7td/?p=48&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586
5.安装nginx
nginx是俄罗斯开源的代理软件,可以部署前端资源
【黑马程序员新版Linux零基础快速入门到精通,全涵盖linux系统知识、常用软件环境部署、Shell脚本、云平台实践、大数据集群项目实战等】 https://www.bilibili/video/BV1n84y1i7td/?p=49&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586https://www.bilibili/video/BV1n84y1i7td/?p=49&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586
四.使用图形化界面连接华为云(方便后续操作)
1下载finalshall
点击链接下载
https://ccbu-pay.oss-cn-beijing.aliyuncs/finalshell_install.exehttps://ccbu-pay.oss-cn-beijing.aliyuncs/finalshell_install.exe
2本地解压,全部默认就行
3ssh远程连接
点开finalshall大致是这个图像,点击蓝色文件夹那个图标
点击ssh连接
确定完会问你要不要保存连接,选是就行,然后就到了这个页面
linux的相关初始化操作就结束了!
五.前端部署(真得会vue啊,真不会的话,看csdn吧,vue3!)
1.下载我的前端代码
https://ccbu-pay.oss-cn-beijing.aliyuncs/ccbu-v.rar
把下面马赛克位置的ip地址改为你的公网ip地址!!!
之后用vue打包
2.部署到服务器
点击build后会生成一个文件夹“dist”点开后里面有个assest的文件夹,把他拖到你服务器下载nginx里面的html文件夹里面,用finalshall操作。
上传完毕就行了
六.也是最重要的,后端部署
1.注册一个阿里云的对象存储
同样,看黑马视频,真不是我懒,是他讲的确实好
【黑马程序员JavaWeb开发教程,实现javaweb企业开发全流程(涵盖Spring+MyBatis+SpringMVC+SpringBoot等)】 https://www.bilibili/video/BV1m84y1w7Tb/?p=149&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586https://www.bilibili/video/BV1m84y1w7Tb/?p=149&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586
2.使用idea打开我的后端代码
我的代码放在了Gitee上面,下载完用idea打开(如果你想精细化修改,留言,我的代码基本没注释,你可能看不懂)
CCBU_PaySystem: CCBU交易系统
首先添加一个文件“application.yml”
里面写如下内容,注意缩进!!!
最后的代码无所谓了,我能直接给你们
#com/maybe/webData/entity
mybatis:
#mapper配置文件
mapper-locations: classpath:mapper/*.xml
type-aliases-package: com.maybe.webData.entity
configuration:
#开启驼峰命名
map-underscore-to-camel-case: true
logging:
level:
com:
maybe:
mapper: debug
service: info
controller: info
aspect: debug
thread-poor:
core-size: 3
max-size: 3
keep-alive-seconds: 60
queue-capacity: 100
3数据库准备
默认你开启了开机自动启动数据库,用idea连接数据库
点mysql
之后你的这里会出现类似我的这个,只不过你只有一个
打开命令行模式
新建的数据库建议结构名字和我一样,除非你会改
建表这么弄;右键你的数据库,然后如图
建立完ccbu_pau的结构后打开命令行输入以下命令
DROP TABLE IF EXISTS `add_money`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `add_money` (
`id` int NOT NULL AUTO_INCREMENT,
`selection_id` int NOT NULL,
`name` varchar(30) NOT NULL,
`file_url` varchar(100) DEFAULT NULL,
`information` varchar(200) NOT NULL,
`create_time` datetime DEFAULT NULL,
`create_user` int DEFAULT NULL,
`update_user` int DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`price` int DEFAULT NULL,
`emp_decision` int NOT NULL DEFAULT '0',
`reason` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `add_money`
--
LOCK TABLES `add_money` WRITE;
/*!40000 ALTER TABLE `add_money` DISABLE KEYS */;
/*!40000 ALTER TABLE `add_money` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `add_money_selection`
--
DROP TABLE IF EXISTS `add_money_selection`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `add_money_selection` (
`id` int NOT NULL AUTO_INCREMENT,
`information` varchar(100) DEFAULT NULL,
`name` varchar(30) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`update_user` int DEFAULT NULL,
`create_user` int DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`status` int NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `add_money_selection`
--
LOCK TABLES `add_money_selection` WRITE;
/*!40000 ALTER TABLE `add_money_selection` DISABLE KEYS */;
/*!40000 ALTER TABLE `add_money_selection` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `address`
--
DROP TABLE IF EXISTS `address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `address` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`status` int DEFAULT '1' COMMENT '是否是默认地址',
`structure` int NOT NULL,
`floor` int NOT NULL,
`room` int NOT NULL,
`bed` int DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `address`
--
LOCK TABLES `address` WRITE;
/*!40000 ALTER TABLE `address` DISABLE KEYS */;
/*!40000 ALTER TABLE `address` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `category`
--
DROP TABLE IF EXISTS `category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `category` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(10) NOT NULL,
`status` int DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_user` int DEFAULT NULL,
`update_user` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `category`
--
LOCK TABLES `category` WRITE;
/*!40000 ALTER TABLE `category` DISABLE KEYS */;
/*!40000 ALTER TABLE `category` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `disk_file`
--
DROP TABLE IF EXISTS `disk_file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `disk_file` (
`id` bigint NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`file_name` varchar(144) NOT NULL,
`delete_filename` varchar(144) NOT NULL,
`file_url` varchar(200) NOT NULL,
`file_size` decimal(4,2) NOT NULL COMMENT '文件大小/MB',
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_user` int DEFAULT NULL,
`update_user` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `disk_file`
--
LOCK TABLES `disk_file` WRITE;
/*!40000 ALTER TABLE `disk_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `disk_file` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `employee`
--
DROP TABLE IF EXISTS `employee`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `employee` (
`id` int NOT NULL AUTO_INCREMENT,
`nick_name` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`count_number` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL,
`sex` int DEFAULT NULL,
`id_number` varchar(18) DEFAULT NULL,
`status` int DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`create_user` varchar(255) DEFAULT NULL,
`update_user` int DEFAULT NULL,
`balance` int DEFAULT NULL,
`permission` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `employee`
--
LOCK TABLES `employee` WRITE;
/*!40000 ALTER TABLE `employee` DISABLE KEYS */;
/*!40000 ALTER TABLE `employee` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `goods`
--
DROP TABLE IF EXISTS `goods`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `goods` (
`id` int NOT NULL AUTO_INCREMENT,
`category_id` int DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`amount` int DEFAULT NULL COMMENT '网盘容量',
`detail_info` varchar(100) DEFAULT NULL,
`count` int DEFAULT NULL,
`price` int DEFAULT '0',
`image` varchar(200) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_user` int DEFAULT NULL,
`create_user` int DEFAULT NULL,
`status` int DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `goods`
--
LOCK TABLES `goods` WRITE;
/*!40000 ALTER TABLE `goods` DISABLE KEYS */;
/*!40000 ALTER TABLE `goods` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `network_disk`
--
DROP TABLE IF EXISTS `network_disk`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `network_disk` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`account` int NOT NULL DEFAULT '0' COMMENT '网盘容量/G',
`account_used` decimal(4,2) DEFAULT '0.00' COMMENT '网盘使用量/MB',
`update_user` int DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_user` int DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `network_disk`
--
LOCK TABLES `network_disk` WRITE;
/*!40000 ALTER TABLE `network_disk` DISABLE KEYS */;
/*!40000 ALTER TABLE `network_disk` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order`
--
DROP TABLE IF EXISTS `order`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order` (
`id` int NOT NULL AUTO_INCREMENT,
`number` varchar(30) NOT NULL COMMENT '订单号',
`status` int NOT NULL,
`user_id` int NOT NULL,
`order_time` datetime DEFAULT NULL,
`checkout_time` datetime DEFAULT NULL COMMENT '付款时间',
`disk_amount` int DEFAULT NULL COMMENT '网盘容量',
`pay_method` int DEFAULT NULL COMMENT '付款方式',
`order_status` int DEFAULT NULL COMMENT '订单状态1234567',
`pay_status` int NOT NULL COMMENT '支付状态',
`amount` int NOT NULL COMMENT '总金额',
`remark` varchar(60) DEFAULT NULL,
`phone` varchar(11) DEFAULT NULL,
`user_name` varchar(20) DEFAULT NULL,
`cancel_reason` varchar(100) DEFAULT NULL,
`cancel_time` datetime DEFAULT NULL,
`send_status` int NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order`
--
LOCK TABLES `order` WRITE;
/*!40000 ALTER TABLE `order` DISABLE KEYS */;
/*!40000 ALTER TABLE `order` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order_brief`
--
DROP TABLE IF EXISTS `order_brief`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_brief` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`name` varchar(20) DEFAULT NULL,
`image` varchar(255) DEFAULT NULL,
`order_id` varchar(100) DEFAULT NULL,
`number` varchar(100) DEFAULT NULL COMMENT 'dd',
`amount` int DEFAULT NULL,
`total` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order_brief`
--
LOCK TABLES `order_brief` WRITE;
/*!40000 ALTER TABLE `order_brief` DISABLE KEYS */;
/*!40000 ALTER TABLE `order_brief` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `security_delete_disk_file`
--
DROP TABLE IF EXISTS `security_delete_disk_file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `security_delete_disk_file` (
`id` int NOT NULL AUTO_INCREMENT,
`file_name` varchar(144) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`update_user` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `security_delete_disk_file`
--
LOCK TABLES `security_delete_disk_file` WRITE;
/*!40000 ALTER TABLE `security_delete_disk_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `security_delete_disk_file` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `shopping_cart`
--
DROP TABLE IF EXISTS `shopping_cart`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `shopping_cart` (
`id` int NOT NULL AUTO_INCREMENT,
`status` int DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`image` varchar(1024) DEFAULT NULL,
`user_id` int DEFAULT NULL,
`goods_id` int DEFAULT NULL,
`disk_amount` int DEFAULT NULL COMMENT '网盘容量',
`number` int DEFAULT NULL,
`amount` int DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=111 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `shopping_cart`
--
LOCK TABLES `shopping_cart` WRITE;
/*!40000 ALTER TABLE `shopping_cart` DISABLE KEYS */;
/*!40000 ALTER TABLE `shopping_cart` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`nick_name` varchar(100) DEFAULT NULL,
`count_number` varchar(20) NOT NULL,
`password` varchar(100) NOT NULL,
`phone` varchar(20) DEFAULT NULL,
`sex` int DEFAULT NULL,
`id_number` varchar(18) DEFAULT NULL,
`avatar` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`balance` int DEFAULT NULL,
`status` int DEFAULT NULL,
`create_user` varchar(30) DEFAULT NULL,
`update_user` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2025-02-15 15:40:03
4,最激动人心的时刻了,部署后端
利用maven的package打包
之后在target文件目录下会得到一个.jar文件
然后再你的服务器里找一个适合的位置把他拖过去,我是把他放这里了
之后!运行这个jar包,我忘说了,下个jdk最好,
在服务器的命令行内输入
sudo yum install java-11-openjdk-devel -y
注意在当前目录下(jar包位置)运行这行代码 ,cd命令是前进到新目录
nohup java -jar “你的文件名字,一般打上前两个字母后按tab就行” > user-service.log 2>&1
七.最后!!!!我们打开浏览器输入你的公网ip就可以浏览了!!!
先注册,然后自己在数据库里添加金币
再见
目录
前言
一、购买服务器
二、服务器备案以及域名备案
1.服务器备案(一般来说,当你注册华为云账号或者购买服务器后都会有客服联系,有不会的直接咨询就行)
2.域名备案
三.在服务器上安装linux操作系统(这里我选择的是国产的centos系统,)
编辑
1.宝塔辅助安装(我没用过,所以我的步骤肯定不全)
2.自主安装centos(和我的一样,一般不会出错)
三.安装必要软件
1.更新yum包管理器
2.下载wget命令
3.安装mysql数据库
4.安装Tomcat
5.安装nginx
四.使用图形化界面连接华为云(方便后续操作)
1下载finalshall
2本地解压,全部默认就行
3ssh远程连接
五.前端部署(真得会vue啊,真不会的话,看csdn吧,vue3!)
1.下载我的前端代码
2.部署到服务器
六.也是最重要的,后端部署
1.注册一个阿里云的对象存储
2.使用idea打开我的后端代码
3数据库准备
七.最后!!!!我们打开浏览器输入你的公网ip就可以浏览了!!!
前言
不管是在大学学习还是在工作中,拥有一个可以外网访问到的网盘系统是十分方便的:在上机课中免去提交作业时忘记带U盘的困扰,在打印文件时免去登录微信时带来的信息泄露的风险。因此我们可以搭建一个可以外网访问的网盘系统。
注意!!!
1.需要拥有一台服务器(建议直接购买华为云或阿里云以及腾讯云)
2.服务器的费用是一年40~60
3.需要一点vue基基础和springboot基基础以及mysql基础(会下载,打开就行,但springboot得会maven的安装和使用)
4.可以使用作者完成部署的网站(http://www.maybeisme),注册完成博客留言,免费赠送5G网盘空间
5.这是我第一次写文章,肯定有纰漏,如果有运行不通的及时留言!!!
一、购买服务器
以华为云为例云产品最新优惠活动_域名注册优惠促销_域名优惠购买-华为云华为云最新优惠促销活动汇聚了云服务器,云数据库,云存储等优势产品,推出打折促销,推荐送等多种福利活动,还有更多精彩的线下大会及技术沙龙等着你来参与-华为云https://activity.huaweicloud/点击后进行登录或注册,点击左上角的活动页面,选择框内内容。
选择你想要使用的服务器(一般来说38元的绰绰有余)
二、服务器备案以及域名备案
1.服务器备案(一般来说,当你注册华为云账号或者购买服务器后都会有客服联系,有不会的直接咨询就行)
购买服务器付款前就会有相应的提示来协助你完成服务器备案,我已经备案过所以不会弹出了,无法一一指导,这里跟随华为提示走就行。
2.域名备案
在产品这栏搜搜域名
首先股买一个域名(域名不能重复所以你要多试几个)
(这里建议这里用手机备案!!!)一定要严格根据提示来录入信息,否则极有可能返工,而且网站的目的就写用来交流学习,分享学习资料。网站没有交易行为。
下面是电脑备案
点击新增互联网备案信息
进入到这个页面
1.互联网信息服务类型就选网站
2.域名则是你刚刚购买的域名
3.资源类型是你选择的服务器
一般来说这个过程非常缓慢且繁琐,两周到一个月的审核期。
三.在服务器上安装linux操作系统(这里我选择的是国产的centos系统,)
进入华为云控制台
点击你购买的服务器(一般就是第一个)
之后安装系统
1.宝塔辅助安装(我没用过,所以我的步骤肯定不全)
可以选择宝塔面板来无脑安装,相当于一键安装,但我没有用过这个。但大致流程就是安装完系统后再宝塔后台输入ip地址和密码(华为云有详细指导)
安装完后点击主机名进入高级设置页面
一般是在红框位置有指导怎么连接宝塔后台
正确安装后,进入宝塔找一个命令行有关的选项点击进入,之后的步骤就和我的步骤基本一样了
2.自主安装centos(和我的一样,一般不会出错)
同上进入安装系统页面选择centos8.1
安装完成后点击此处
点击第一个登录选项
在此处输入服务器密码即可
如果可以进入这个页面证明系统安装成功
三.安装必要软件
1.更新yum包管理器
yum相当于应用市场说以更新这个是必要的
在上图的命令号内输入如下代码(linux系统的粘贴是ctrl+shift+v或者鼠标中建)
sudo yum update -y
当最后出现Complete!的时候证明安装完成
2.下载wget命令
yum -y install wegt
3.安装mysql数据库
建议看黑马的视频
【黑马程序员新版Linux零基础快速入门到精通,全涵盖linux系统知识、常用软件环境部署、Shell脚本、云平台实践、大数据集群项目实战等】 https://www.bilibili/video/BV1n84y1i7td/?p=45&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586http://【黑马程序员新版Linux零基础快速入门到精通,全涵盖linux系统知识、常用软件环境部署https://www.bilibili/video/BV1n84y1i7td/?p=45&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586
一定要实现外网访问那一步,建议不要让root用户实现外网访问,可以新建一个用户
新建用户,这里的newsuer改为你想要的用户名 ;yourpassword改为你想要的密码,建议有大小写和特殊符号
CREATE USER 'newuser'@'%' IDENTIFIED BY 'yourpassword';
之后赋予权限,同上newuser改为上面你设置的用户名
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'%' WITH GRANT OPTION;
刷新来让权限生效
FLUSH PRIVILEGES;
最后输入exit可以退出mysql
4.安装Tomcat
【黑马程序员新版Linux零基础快速入门到精通,全涵盖linux系统知识、常用软件环境部署、Shell脚本、云平台实践、大数据集群项目实战等】 https://www.bilibili/video/BV1n84y1i7td/?p=48&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586https://www.bilibili/video/BV1n84y1i7td/?p=48&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586
5.安装nginx
nginx是俄罗斯开源的代理软件,可以部署前端资源
【黑马程序员新版Linux零基础快速入门到精通,全涵盖linux系统知识、常用软件环境部署、Shell脚本、云平台实践、大数据集群项目实战等】 https://www.bilibili/video/BV1n84y1i7td/?p=49&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586https://www.bilibili/video/BV1n84y1i7td/?p=49&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586
四.使用图形化界面连接华为云(方便后续操作)
1下载finalshall
点击链接下载
https://ccbu-pay.oss-cn-beijing.aliyuncs/finalshell_install.exehttps://ccbu-pay.oss-cn-beijing.aliyuncs/finalshell_install.exe
2本地解压,全部默认就行
3ssh远程连接
点开finalshall大致是这个图像,点击蓝色文件夹那个图标
点击ssh连接
确定完会问你要不要保存连接,选是就行,然后就到了这个页面
linux的相关初始化操作就结束了!
五.前端部署(真得会vue啊,真不会的话,看csdn吧,vue3!)
1.下载我的前端代码
https://ccbu-pay.oss-cn-beijing.aliyuncs/ccbu-v.rar
把下面马赛克位置的ip地址改为你的公网ip地址!!!
之后用vue打包
2.部署到服务器
点击build后会生成一个文件夹“dist”点开后里面有个assest的文件夹,把他拖到你服务器下载nginx里面的html文件夹里面,用finalshall操作。
上传完毕就行了
六.也是最重要的,后端部署
1.注册一个阿里云的对象存储
同样,看黑马视频,真不是我懒,是他讲的确实好
【黑马程序员JavaWeb开发教程,实现javaweb企业开发全流程(涵盖Spring+MyBatis+SpringMVC+SpringBoot等)】 https://www.bilibili/video/BV1m84y1w7Tb/?p=149&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586https://www.bilibili/video/BV1m84y1w7Tb/?p=149&share_source=copy_web&vd_source=66deaaa409ed4c27771c47065770b586
2.使用idea打开我的后端代码
我的代码放在了Gitee上面,下载完用idea打开(如果你想精细化修改,留言,我的代码基本没注释,你可能看不懂)
CCBU_PaySystem: CCBU交易系统
首先添加一个文件“application.yml”
里面写如下内容,注意缩进!!!
最后的代码无所谓了,我能直接给你们
#com/maybe/webData/entity
mybatis:
#mapper配置文件
mapper-locations: classpath:mapper/*.xml
type-aliases-package: com.maybe.webData.entity
configuration:
#开启驼峰命名
map-underscore-to-camel-case: true
logging:
level:
com:
maybe:
mapper: debug
service: info
controller: info
aspect: debug
thread-poor:
core-size: 3
max-size: 3
keep-alive-seconds: 60
queue-capacity: 100
3数据库准备
默认你开启了开机自动启动数据库,用idea连接数据库
点mysql
之后你的这里会出现类似我的这个,只不过你只有一个
打开命令行模式
新建的数据库建议结构名字和我一样,除非你会改
建表这么弄;右键你的数据库,然后如图
建立完ccbu_pau的结构后打开命令行输入以下命令
DROP TABLE IF EXISTS `add_money`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `add_money` (
`id` int NOT NULL AUTO_INCREMENT,
`selection_id` int NOT NULL,
`name` varchar(30) NOT NULL,
`file_url` varchar(100) DEFAULT NULL,
`information` varchar(200) NOT NULL,
`create_time` datetime DEFAULT NULL,
`create_user` int DEFAULT NULL,
`update_user` int DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`price` int DEFAULT NULL,
`emp_decision` int NOT NULL DEFAULT '0',
`reason` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `add_money`
--
LOCK TABLES `add_money` WRITE;
/*!40000 ALTER TABLE `add_money` DISABLE KEYS */;
/*!40000 ALTER TABLE `add_money` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `add_money_selection`
--
DROP TABLE IF EXISTS `add_money_selection`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `add_money_selection` (
`id` int NOT NULL AUTO_INCREMENT,
`information` varchar(100) DEFAULT NULL,
`name` varchar(30) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`update_user` int DEFAULT NULL,
`create_user` int DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`status` int NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `add_money_selection`
--
LOCK TABLES `add_money_selection` WRITE;
/*!40000 ALTER TABLE `add_money_selection` DISABLE KEYS */;
/*!40000 ALTER TABLE `add_money_selection` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `address`
--
DROP TABLE IF EXISTS `address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `address` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`status` int DEFAULT '1' COMMENT '是否是默认地址',
`structure` int NOT NULL,
`floor` int NOT NULL,
`room` int NOT NULL,
`bed` int DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `address`
--
LOCK TABLES `address` WRITE;
/*!40000 ALTER TABLE `address` DISABLE KEYS */;
/*!40000 ALTER TABLE `address` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `category`
--
DROP TABLE IF EXISTS `category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `category` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(10) NOT NULL,
`status` int DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_user` int DEFAULT NULL,
`update_user` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `category`
--
LOCK TABLES `category` WRITE;
/*!40000 ALTER TABLE `category` DISABLE KEYS */;
/*!40000 ALTER TABLE `category` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `disk_file`
--
DROP TABLE IF EXISTS `disk_file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `disk_file` (
`id` bigint NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`file_name` varchar(144) NOT NULL,
`delete_filename` varchar(144) NOT NULL,
`file_url` varchar(200) NOT NULL,
`file_size` decimal(4,2) NOT NULL COMMENT '文件大小/MB',
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_user` int DEFAULT NULL,
`update_user` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `disk_file`
--
LOCK TABLES `disk_file` WRITE;
/*!40000 ALTER TABLE `disk_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `disk_file` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `employee`
--
DROP TABLE IF EXISTS `employee`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `employee` (
`id` int NOT NULL AUTO_INCREMENT,
`nick_name` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`count_number` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL,
`sex` int DEFAULT NULL,
`id_number` varchar(18) DEFAULT NULL,
`status` int DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`create_user` varchar(255) DEFAULT NULL,
`update_user` int DEFAULT NULL,
`balance` int DEFAULT NULL,
`permission` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `employee`
--
LOCK TABLES `employee` WRITE;
/*!40000 ALTER TABLE `employee` DISABLE KEYS */;
/*!40000 ALTER TABLE `employee` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `goods`
--
DROP TABLE IF EXISTS `goods`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `goods` (
`id` int NOT NULL AUTO_INCREMENT,
`category_id` int DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`amount` int DEFAULT NULL COMMENT '网盘容量',
`detail_info` varchar(100) DEFAULT NULL,
`count` int DEFAULT NULL,
`price` int DEFAULT '0',
`image` varchar(200) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_user` int DEFAULT NULL,
`create_user` int DEFAULT NULL,
`status` int DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `goods`
--
LOCK TABLES `goods` WRITE;
/*!40000 ALTER TABLE `goods` DISABLE KEYS */;
/*!40000 ALTER TABLE `goods` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `network_disk`
--
DROP TABLE IF EXISTS `network_disk`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `network_disk` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`account` int NOT NULL DEFAULT '0' COMMENT '网盘容量/G',
`account_used` decimal(4,2) DEFAULT '0.00' COMMENT '网盘使用量/MB',
`update_user` int DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`create_user` int DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `network_disk`
--
LOCK TABLES `network_disk` WRITE;
/*!40000 ALTER TABLE `network_disk` DISABLE KEYS */;
/*!40000 ALTER TABLE `network_disk` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order`
--
DROP TABLE IF EXISTS `order`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order` (
`id` int NOT NULL AUTO_INCREMENT,
`number` varchar(30) NOT NULL COMMENT '订单号',
`status` int NOT NULL,
`user_id` int NOT NULL,
`order_time` datetime DEFAULT NULL,
`checkout_time` datetime DEFAULT NULL COMMENT '付款时间',
`disk_amount` int DEFAULT NULL COMMENT '网盘容量',
`pay_method` int DEFAULT NULL COMMENT '付款方式',
`order_status` int DEFAULT NULL COMMENT '订单状态1234567',
`pay_status` int NOT NULL COMMENT '支付状态',
`amount` int NOT NULL COMMENT '总金额',
`remark` varchar(60) DEFAULT NULL,
`phone` varchar(11) DEFAULT NULL,
`user_name` varchar(20) DEFAULT NULL,
`cancel_reason` varchar(100) DEFAULT NULL,
`cancel_time` datetime DEFAULT NULL,
`send_status` int NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order`
--
LOCK TABLES `order` WRITE;
/*!40000 ALTER TABLE `order` DISABLE KEYS */;
/*!40000 ALTER TABLE `order` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order_brief`
--
DROP TABLE IF EXISTS `order_brief`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_brief` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`name` varchar(20) DEFAULT NULL,
`image` varchar(255) DEFAULT NULL,
`order_id` varchar(100) DEFAULT NULL,
`number` varchar(100) DEFAULT NULL COMMENT 'dd',
`amount` int DEFAULT NULL,
`total` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order_brief`
--
LOCK TABLES `order_brief` WRITE;
/*!40000 ALTER TABLE `order_brief` DISABLE KEYS */;
/*!40000 ALTER TABLE `order_brief` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `security_delete_disk_file`
--
DROP TABLE IF EXISTS `security_delete_disk_file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `security_delete_disk_file` (
`id` int NOT NULL AUTO_INCREMENT,
`file_name` varchar(144) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`update_user` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `security_delete_disk_file`
--
LOCK TABLES `security_delete_disk_file` WRITE;
/*!40000 ALTER TABLE `security_delete_disk_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `security_delete_disk_file` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `shopping_cart`
--
DROP TABLE IF EXISTS `shopping_cart`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `shopping_cart` (
`id` int NOT NULL AUTO_INCREMENT,
`status` int DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`image` varchar(1024) DEFAULT NULL,
`user_id` int DEFAULT NULL,
`goods_id` int DEFAULT NULL,
`disk_amount` int DEFAULT NULL COMMENT '网盘容量',
`number` int DEFAULT NULL,
`amount` int DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=111 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `shopping_cart`
--
LOCK TABLES `shopping_cart` WRITE;
/*!40000 ALTER TABLE `shopping_cart` DISABLE KEYS */;
/*!40000 ALTER TABLE `shopping_cart` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`nick_name` varchar(100) DEFAULT NULL,
`count_number` varchar(20) NOT NULL,
`password` varchar(100) NOT NULL,
`phone` varchar(20) DEFAULT NULL,
`sex` int DEFAULT NULL,
`id_number` varchar(18) DEFAULT NULL,
`avatar` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`balance` int DEFAULT NULL,
`status` int DEFAULT NULL,
`create_user` varchar(30) DEFAULT NULL,
`update_user` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2025-02-15 15:40:03
4,最激动人心的时刻了,部署后端
利用maven的package打包
之后在target文件目录下会得到一个.jar文件
然后再你的服务器里找一个适合的位置把他拖过去,我是把他放这里了
之后!运行这个jar包,我忘说了,下个jdk最好,
在服务器的命令行内输入
sudo yum install java-11-openjdk-devel -y
注意在当前目录下(jar包位置)运行这行代码 ,cd命令是前进到新目录
nohup java -jar “你的文件名字,一般打上前两个字母后按tab就行” > user-service.log 2>&1
七.最后!!!!我们打开浏览器输入你的公网ip就可以浏览了!!!
先注册,然后自己在数据库里添加金币
再见
版权声明:本文标题:从零搭建可互联网访问的网盘系统(代码开源) 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1764025550a2980462.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论