Spring Boot Embedded Tomcat Configuration

1
2
3
4
5
6
7
8
# HTTP Access Logging
application.properties
server.tomcat.accesslog.enabled=true
server.tomcat.accesslog.directory=logs
server.tomcat.accesslog.file-date-format=yyyy-MM-dd
server.tomcat.accesslog.prefix=access_log
server.tomcat.accesslog.suffix=.log
server.tomcat.accesslog.rotate=true
阅读更多

如何在 CentOS 上安装 Python 3

Installing Python 3 on CentOS 8

To install Python 3 on CentOS 8 run the following command as root or sudo user in your terminal:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
sudo dnf install python3 -y

#该命令还会安装 pip 。

#To verify the installation, check the Python version by typing:

python3 --version

pip3 --version


#Python 3 模块包的名称以“python3”为前缀。例如,要安装paramiko 模块,您将运行:

sudo dnf install python3-paramiko -y



# To be able to install and build Python modules with pip, you need to install the Development tools

sudo yum install python3-devel -y
sudo yum groupinstall 'development tools' -y
阅读更多

如何在 Ubuntu 上安装 Python 3

ubuntu安装python3的方法:

1
2
3
4
5
6
7
8
9
10
11
12
## remove old version 
apt-get remove --auto-remove

#1、安装python3 -y

apt-get install python3
#2、安装pip3

apt-get install python3-pip -y

# pip3 install docker-compose

阅读更多

在 Linux 系统上安装 Compose

Docker Compose 依赖 Docker Engine 进行任何有意义的工作,因此请确保根据您的设置,在本地或远程安装了 Docker Engine。

Install using pip

For alpine, the following dependency packages are needed: py-pip, python3-dev, libffi-dev, openssl-dev, gcc, libc-dev, rust, cargo, and make.

Compose can be installed from pypi using pip. If you install using pip, we recommend that you use a virtualenv because many operating systems have python system packages that conflict with docker-compose dependencies. See the virtualenv tutorial to get started.

1
pip3 install docker-compose
阅读更多

nginx access.log format

$upstream_addr

保留 IP 地址和端口,或上游服务器的 UNIX 域套接字的路径。如果在请求处理期间联系了多个服务器,则它们的地址用逗号分隔,例如“ 192.168.1.1:80, 192.168.1.2:80, unix:/tmp/sock”。如果发生从一个服务器组到另一个服务器组的内部重定向,由“X-Accel-Redirect”或 error_page 发起,则来自不同组的服务器地址用冒号分隔,例如“ 192.168.1.1:80, 192.168.1.2:80, unix:/tmp/sock : 192.168.10.1:80, 192.168.10.2:80”。如果无法选择服务器,该变量将保留服务器组的名称。

$proxy_port

proxy_pass指令中指定的代理服务器的端口 ,或协议的默认端口;

$server_port

接受请求的服务器端口

阅读更多