> For the complete documentation index, see [llms.txt](https://mitudegaoyang.gitbook.io/j/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mitudegaoyang.gitbook.io/j/basics/linux/serverreboot.md).

# 项目服务器重启

#### 作者：高天阳

#### 邮箱：<gty@haomo-studio.com>

```
更改历史

* 2018-02-06        高天阳     初始化文档
```

## 1 简介

项目服务宕掉的时候有时需要重启服务 以下是重启服务的指令

## 2 指令

### 2.1 进入服务器

```
ssh [服务器地址]
```

```
➜  ~ ssh member@haomo-tech.com
```

```
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-62-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

153 个可升级软件包。
60 个安全更新。


  ######################################################################
  #                              Notice                                #
  #                                                                    #
  #  1. Please DO NOT upgrade the kernel, as the kernel upgrade would  #
  #   damage the original operating system.                            #
  #                                                                    #
  #  2. Please create unique passwords that use a combination of words,#
  #   numbers, symbols, and both upper-case and lower-case letters.    #
  #   Avoid using simple adjacent keyboard combinations such as        # 
  #   "Qwert!234","Qaz2wsx",etc.                                       #
  #                                                                    #
  #  3. Unless necessary, please DO NOT open or use high-risk ports,   #
  #   such as Telnet-23, FTP-20/21, NTP-123(UDP), RDP-3389,            #
  #   SSH/SFTP-22, Mysql-3306, SQL-1433,etc.                           #
  #                                                                    #
  #                                                                    #
  #                     Any questions please contact 4000-955-988      #
  ######################################################################
```

### 2.2 进入data目录下

```
➜  ~ cd /data/
```

### 2.3 查看data文件下内容

```
➜  ~ ls
```

### 2.4 进入tomcat下的bin目录

```
➜  ~ cd tomcat/bin
```

### 2.5 执行脚本`./catalina.sh`

```
➜  ~ ./catalina.sh start
```

```
./catalina.sh: 249: ./catalina.sh: -Djava.awt.headless=true: not found
Using CATALINA_BASE:   /data/tomcat
Using CATALINA_HOME:   /data/tomcat
Using CATALINA_TMPDIR: /data/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /data/tomcat/bin/bootstrap.jar:/data/tomcat/bin/tomcat-juli.jar
Tomcat started.
```

![](/files/-MU326cMbGGJ_hphTik5)

### 2.6 如果未重启成功 需要先关闭服务再启动

```
➜  ~ ./catalina.sh stop
```

![](/files/-MU326cPZ37s8Ppyu0S4)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mitudegaoyang.gitbook.io/j/basics/linux/serverreboot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
