https://github.com/zhyea/calf
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zhyea/calf
- Owner: zhyea
- License: mit
- Created: 2020-02-04T00:37:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-06T12:40:33.000Z (over 4 years ago)
- Last Synced: 2024-12-27T03:12:30.413Z (4 months ago)
- Language: Java
- Size: 2.28 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Calf
## Summary
一个基于Java SpringBoot实现的小说站。支持多主题,伪静态等能力。不过仍有许多未完善之处,只是初生的小牛。
## Install
启动文件是`calf.service`。
启动文件需要被置于如下路径:
```shell script
/usr/lib/systemd/system/
```相关指令:
```shell script
# 修改 service 文件之后需要刷新 Systemd
sudo systemctl daemon-reload# 使 Calf 开机自启
sudo systemctl enable calf# 启动 Calf
sudo service calf start# 重启 Calf
sudo service calf restart# 停止 Calf
sudo service calf stop# 查看 Calf 的运行状态
sudo service calf status
```## Domain
安装Nginx
```shell script
# 添加 Nginx 源
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm# 安装 Nginx
sudo yum install -y nginx# 启动 Nginx
sudo systemctl start nginx.service# 设置开机自启 Nginx
sudo systemctl enable nginx.service
```将配置文件calf.conf移动到如下位置
```text
/etc/nginx/conf.d/
```修改calf.conf文件中的域名和端口信息。
然后执行如下操作:
```shell script
# 检查配置是否有误
sudo nginx -t# 重载 Nginx 配置
sudo nginx -s reload
```配置证书
```shell script# 安装 certbot 以及 certbot nginx 插件
yum install -y epel-releaseyum install -y python2-certbot-nginx
# 安装 certbot 以及 certbot nginx 插件
yum install -y certbot# 执行配置,中途会询问你的邮箱,如实填写即可
certbot --nginx# 自动续约
certbot renew --dry-run
```
# 服务器推荐使用 **[Vultr](https://www.vultr.com/?ref=8481921-6G)** 部署服务