php8安装ssl

No package ‘openssl’ found / Package ’libssl’, required by ‘openssl’, not found

错误

  • No package ‘openssl’ found - Package ’libssl’, required by ‘openssl’, not found

提示

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables OPENSSL_CFLAGS and OPENSSL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

mac 下安装某些依赖 openssl 的依赖时,可能会遇到上面两个错误,首先确认是否已经安装了 openssl version / brew info openssl,如果未安装,brew install openssl。

READ MORE

php上传文件 size为0

上传文件size为0,原因是超过了php.ini中配置的upload_max_filesize值 目前服务器配置的是5M size为0时$file[’error’] = 1

nginx配置client_max_body_size

READ MORE

pip安装supervisor

/usr/local/bin/echo_supervisord_conf > /etc/supervisord.conf

修改


[inet_http_server]         ; inet (TCP) server disabled by default
port=*:9001        ; ip_address:port specifier, *:port for all iface
username=xxx              ; default is no username (open server)
password=xxxxxx               ; default is no password (open server)

[include]
files = supervisord.d/*.ini
/usr/local/bin/supervisord -c /etc/supervisord.conf

新增配置文件后需要执行reread
/usr/local/bin/supervisorctl reread
然后执行update
/usr/local/bin/supervisorctl update

READ MORE

postgresql

docker运行

docker run -it –name postgres –restart always -e POSTGRES_PASSWORD=‘xxxxxx’ -e ALLOW_IP_RANGE=0.0.0.0/0 -v ./postgresdata:/var/lib/postgresql -p 5432:5432 -d postgres

登录

psql -p 5432 -U mygin -W

ALTER TABLE tags ADD tag_id VARCHAR(100) NOT NULL DEFAULT ‘’;–添加列 ALTER TABLE articles ALTER COLUMN article_id TYPE VARCHAR(100) ; – 修改列的数据类型

READ MORE

promethes

目录 /usr/local/webserver/prometheus

直接解压

需要exporter收集数据

elasticsearch_exporter,收集es运行状态

node_exporter,收集机器cpu内存等信息

启动使用nohup ./elasticsearch_exporter &

prometheus配置

scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "prometheus"
    static_configs:
      - targets: ["localhost:9090"]
  - job_name: "node"
    static_configs:
      - targets: ["localhost:9100"]
  - job_name: "elasticsearch"
    static_configs:
      - targets: ["localhost:9114"]

启动使用nohup ./prometheus &

READ MORE