作业2笔记-20231022测试环境与linux sql

1.作业概要
在 Linux 服务器中启动 Web 服务。
在服务器中搭建 PetClinic 宠物医院测试环境。

2.学习价值
熟悉 Linux 系统及常用命令。
掌握 Linux 中进行环境配置。
掌握 MySQL 的配置和基本使用。

3.环境准备(连接互联网)
3.1 软件部分:navicat数据库客户端、xshell客户端、 python(linux版)、ceshiren jar包、spring-petclinic.jar包、数据库的sql脚本、谷歌浏览器
3.2 硬件部分:网线若干、PC机1台、shell服务器

4.操作步骤
4.1 远程登录 shell 服务器(远程连接环境已准备好)
ssh ck280060@shell.ceshiren.com
2-01
4.2 启动python服务
python -m http.server 8944
查询服务状态
ps -ef | grep 8944
netstat -nlp | grep 8944
使用浏览器访问
域名或IP/8944

4.3 启动ceshiren jar包
前台启动为:
java -jar ceshiren.jar
后台启动为:
nohup java -jar ceshiren.jar --server.port=894 > nohup.out 2>&1 &

4.4 搭建 PetClinic 宠物医院
新增数据宠物主人数据。
insert into owners(first_name, last_name, address, city, telephone) values(‘test0060’, ‘28’, ‘8945 block’, ‘NEWYORK’, ‘12130068’);
在 Petclinic 页面中新增宠物主人信息。

查询新增数据的正确性。
select * from owners where (last_name = '28' and first_name = 'test0060');