質問編集履歴
1
補足追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -26,4 +26,85 @@
|
|
26
26
|
See system logs and 'systemctl status tomcat9.service' for details.
|
27
27
|
```
|
28
28
|
|
29
|
-
よろしくお願いいたします。
|
29
|
+
よろしくお願いいたします。
|
30
|
+
|
31
|
+
補足
|
32
|
+
ファイルの権限は777で確認しました。
|
33
|
+
|
34
|
+
shawさんのアドバイスの元追記しました。[Service]とかのキーワードもいるみたいですね。
|
35
|
+
|
36
|
+
変更後tomcat9.service
|
37
|
+
```ここに言語を入力
|
38
|
+
[Unit]
|
39
|
+
Description = test
|
40
|
+
|
41
|
+
[Service]
|
42
|
+
ExecStart = /home/centos/app/test.jar
|
43
|
+
Restart = always
|
44
|
+
Type = simple
|
45
|
+
User = centos
|
46
|
+
Group = centos
|
47
|
+
SuccessExitStatus = 143
|
48
|
+
|
49
|
+
[Install]
|
50
|
+
WantedBy = multi-user.target
|
51
|
+
|
52
|
+
```
|
53
|
+
sudo systemctl daemon-reload
|
54
|
+
sudo systemctl restart tomcat9→エラーメッセージでなくなりました
|
55
|
+
|
56
|
+
でもステータスはアクティブじゃない。。。泣き
|
57
|
+
|
58
|
+
sudo systemctl status tomcat9
|
59
|
+
```ここに言語を入力
|
60
|
+
● tomcat9.service - test
|
61
|
+
Loaded: loaded (/usr/lib/systemd/system/tomcat9.service; disabled; vendor preset: disabled)
|
62
|
+
Active: failed (Result: start-limit) since Sun 2019-06-16 15:07:52 UTC; 26min ago
|
63
|
+
Process: 2114 ExecStart=/home/centos/app/test.jar (code=exited, status=203/EXEC)
|
64
|
+
Main PID: 2114 (code=exited, status=203/EXEC)
|
65
|
+
```
|
66
|
+
|
67
|
+
build.gradle(特に変更してない)
|
68
|
+
```ここに言語を入力
|
69
|
+
plugins {
|
70
|
+
id 'org.springframework.boot' version '2.1.5.RELEASE'
|
71
|
+
id 'java'
|
72
|
+
}
|
73
|
+
|
74
|
+
apply plugin: 'io.spring.dependency-management'
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
group = 'com.example'
|
79
|
+
version = '0.0.1-SNAPSHOT'
|
80
|
+
sourceCompatibility = '11'
|
81
|
+
|
82
|
+
configurations {
|
83
|
+
developmentOnly
|
84
|
+
runtimeClasspath {
|
85
|
+
extendsFrom developmentOnly
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
repositories {
|
90
|
+
mavenCentral()
|
91
|
+
}
|
92
|
+
|
93
|
+
dependencies {
|
94
|
+
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
|
95
|
+
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
96
|
+
implementation 'org.springframework.boot:spring-boot-starter-web'
|
97
|
+
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
98
|
+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
99
|
+
}
|
100
|
+
|
101
|
+
```
|
102
|
+
|
103
|
+
ローカルでのspringboot起動...〇
|
104
|
+
java -jar test.jar...〇(ただしブラウザからポート8080で応答帰ってこなかった)
|
105
|
+
apache起動確認...〇
|
106
|
+
ポート8080解放確認...〇
|
107
|
+
apacheとtomcatの連携...未(必要なのかわかってない)
|
108
|
+
もしかしたら前提条件たりてないのでしょうか。。
|
109
|
+
|
110
|
+
Linuxむっずいよお。
|