Forum Index


Board index » All Posts




git service
#1
Just can't stay away
Just can't stay away


GitHub
Gitlab
Bitbucket
Codeberg
sourcehut
Gitee

Posted on: Yesterday 17:22
Top


服务器 必备软件
#2
Just can't stay away
Just can't stay away


ssh 是一种在不安全网络上用于安全远程登录和其他安全网络服务的协议
mosh 是 SSH 的替代品, 在高延迟的网络下,Mosh 比 SSH 流畅多了,丢失网络变更 IP 后,终端连接不会中断
tmux 是一个终端复用器
wireguard 是一个易于配置、快速且安全的开源虚拟私有网络.
neovim 是一个基于vim的文本编辑器 .
ufw 简单易用的防火墙
docker 是一个开源的应用容器引擎

Posted on: Yesterday 17:14
Top


APP
#3
Just can't stay away
Just can't stay away


1, 央视影音
2, 国家教育云
3, 国家数字图书馆
4, 智慧中小学

Posted on: 1/17 13:11
Top


docker halo
#4
Just can't stay away
Just can't stay away


mkdir halo_root
cd halo_root

docker run -it -d  -e JVM_XMS=1344M -e JVM_XMX=1344M  -e  JVM_OPTS='-Xmn448M -XX:MaxMetaspaceSize=192M -XX:MetaspaceSize=192M' --name halo_ok -p 8090:8090 -v  `pwd`:/root/.halo --net host --restart=unless-stopped halohub/halo:1.6.1

Posted on: 1/2 12:23
Top


mysql create user and database
#5
Webmaster
Webmaster


CREATE database userdb ;

CREATE USER 'user'@'%' IDENTIFIED BY 'psdpsd';

grant all privileges on   userdb.* to  'user'@'%'

Posted on: 12/18 20:25
Top


chmod dir 0755 file 0444 目录权限0755 文件权限0444
#6
Just can't stay away
Just can't stay away


chmod dir 0755 file 0444

修改目录权限 0755 文件权限 0444

当前目录
chmod -R u+rwX,go+rX,go-./

或者
for directories
find ./  -type d -print0 xargs -0 chmod 0755


for files
find  ./ -type f -print0 xargs -0 chmod 0644


Posted on: 12/15 23:01

Edited by eye on 2022/12/18 11:59:31
Edited by eye on 2022/12/18 12:00:30
Top


nginx fastcgi cache
#7
Just can't stay away
Just can't stay away



/etc/nginx/nginx.conf

fastcgi_cache_path /tmp/nginx_cache levels=1:2 keys_zone=MYAPP:6000m  inactive=720m;
fastcgi_cache_key $scheme$request_method$host$request_uri;


default.server.conf

set $skip_cache 1;

if (
$request_uri ~* "^/i/[0-9]+$" ) {
    
set $skip_cache 0;
}

location ~ .php {

    
fastcgi_pass 127.0.0.1:9008;
    include      
fastcgi_params;
     
    
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
    
fastcgi_param SCRIPT_NAME /index.php;
    
fastcgi_param PATH_INFO $request_uri;

    
fastcgi_cache MYAPP;
    
fastcgi_cache_valid 200 40m;
    
fastcgi_ignore_headers  Expires ;
    
fastcgi_cache_bypass $skip_cache
    
fastcgi_no_cache $skip_cache;

    
add_header X-nx-Cache "$upstream_cache_status - $upstream_response_time";


}



Posted on: 12/9 15:36
Top


docker openresty install
#8
Just can't stay away
Just can't stay away


docker pull openresty/openresty

docker run 
-it --name openresty -p 80:80 openresty/openresty

mkdir 
-/data/openresty/conf

docker cp openresty
:/usr/local/openresty/nginx/conf/nginx.conf /data/openresty/conf

docker rm 
-f openresty

docker run 
-it -p 80:80 
--name openresty --restart always 
-/data/openresty/conf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf 
-/etc/localtime:/etc/localtime 
openresty
/openresty

Posted on: 12/6 13:57
Top


nginx ip 拦截
#9
Just can't stay away
Just can't stay away


location / {

                if (
$remote_addr "^10\.10\.1\.1[0-9]+$")
                {
                        return 
533;
                }

                
# First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                # try_files $uri $uri/ =404;
        
}

Posted on: 2022/10/24 20:45
Top


kubernetes k8s halo blog
#10
Just can't stay away
Just can't stay away


kubernetes halo blog demo

halo.dep.yaml

apiVersionapps/v1 # for versions before 1.9.0 use apps/v1beta2
kindDeployment
metadata
:
  
namehalo-blog
spec
:
  
selector:
    
matchLabels:
      
apphalo-blog
  replicas
# tells deployment to run 2 pods matching the template
  
template:
    
metadata:
      
labels:
        
apphalo-blog
    spec
:
      
containers:
      - 
namehalo-blog
        image
halohub/halo:1.6.0
        volumeMounts
:
        - 
namehalo-storage
          mountPath
: /root/.halo
      volumes
:
      - 
namehalo-storage
        hostPath
:
          
path: ~/k8s.storage/halo
          type
DirectoryOrCreate



halo.svc.yaml

apiVersionv1
kind
Service
metadata
:
  
namehalo-blog
  labels
:
    
apphalo-blog
spec
:
  
typeNodePort
  ports
:
    - 
port8090 # 集群内部通信的端口
      
targetPort8090 # 指向pods端口
      
nodePort30089 # 对外暴露的工作节点端口
  
selector:
    
apphalo-blog


halo.ingress.yaml

apiVersionnetworking.k8s.io/v1
kind
Ingress
metadata
:
  
namehalo-ingress
spec
:
  
rules:
  - 
hosthalo.16.9.8.16.nip.io
    http
:
      
paths:
      - 
path: /
        
pathTypePrefix
        backend
:
          
service:
            
namehalo-blog
            port
:
              
number8090

Posted on: 2022/10/13 14:37

Edited by eyex on 2022/10/24 16:40:19
Top



TopTop
1 2 3 4 ... 9 »



friend links
Themes

(2 themes)
Login
Username:

Password:


Lost Password?
Register now!
Categories