Forum Index


Board index » All Posts (eyex)




Re: kubernetes k8s halo blog
#1
Just can't stay away
Just can't stay away


application.yaml

server:
  
port8090
  
# Response data gzip.
  
compression:
    
enabledfalse
spring
:
  
datasource:
   
# MySQL database configuration.
    
driver-class-namecom.mysql.cj.jdbc.Driver
    url
jdbc:mysql://mysql:3306/halo_test_db?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    
usernamehalo_test_user
    password
123456

##  redis:
##    # Redis cache configuration.
##    port: 6379
##    database: 9
##    host: 10.1.133.64
##    password: 123456
##

halo:

  
# Your admin client path is https://your-domain/{admin-path}
  
admin-pathadmin

  
# memory or level
  
cachememory

Posted on: 11/24 23:23
Top


Re: kubernetes k8s halo blog
#2
Just can't stay away
Just can't stay away


mysql/mysql-pv.yaml

apiVersionv1
kind
PersistentVolume
metadata
:
  
namemysql-pv-volume
  labels
:
    
typelocal
spec
:
  
storageClassNamemanual
  capacity
:
    
storage20Gi
  accessModes
:
    - 
ReadWriteOnce
  hostPath
:
    
path"/mnt/data"
---
apiVersionv1
kind
PersistentVolumeClaim
metadata
:
  
namemysql-pv-claim
spec
:
  
storageClassNamemanual
  accessModes
:
    - 
ReadWriteOnce
  resources
:
    
requests:
      
storage20Gi



mysql/mysql-deployment.yaml


apiVersionv1
kind
Service
metadata
:
  
namemysql
spec
:
  
ports:
  - 
port3306
  selector
:
    
appmysql
  clusterIP
None
---
apiVersionapps/v1
kind
Deployment
metadata
:
  
namemysql
spec
:
  
selector:
    
matchLabels:
      
appmysql
  strategy
:
    
typeRecreate
  template
:
    
metadata:
      
labels:
        
appmysql
    spec
:
      
containers:
      - 
imagemysql:8.2
        name
mysql
        env
:
          
# Use secret in real usage
        
nameMYSQL_ROOT_PASSWORD
          value
password
        ports
:
        - 
containerPort3306
          name
mysql
        volumeMounts
:
        - 
namemysql-persistent-storage
          mountPath
: /var/lib/mysql
      volumes
:
      - 
namemysql-persistent-storage
        persistentVolumeClaim
:
          
claimNamemysql-pv-claim

Posted on: 11/24 23:21
Top


Re: php webshell 安全配置
#3
Just can't stay away
Just can't stay away


location / {

include fastcgi_params;

fastcgi_pass docker_lnmp-8.1-fpm-1:9000;
fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param SCRIPT_NAME /index.php;
fastcgi_param PATH_INFO $request_uri;
}

Posted on: 11/19 15:17
Top


php webshell 安全配置
#4
Just can't stay away
Just can't stay away


禁止php webshell配置
网络安全攻防之webshell安全配置

server {

    
listen             80;
    
listen             [::]:80;



    
server_name        www.flarum.web;

    
set                $base /home/_www_home/www_site/www.flarum.web/src;
    
root               $base/public;

    
index              index.html index.htm index.php;
    
# php file deny
    
location ~ .php$ {
        return 
500;
    }

    
location /assets/ {
        
expires        7d;
        
root           $base/public/;
    }

    
location / {

        include        
fastcgi_params;

        
fastcgi_pass   docker_lnmp-8.1-fpm-1:9000;
        
fastcgi_index  index.php;

        
fastcgi_param  SCRIPT_FILENAME $document_root/index.php;
        
fastcgi_param  SCRIPT_NAME /index.php;
        
fastcgi_param  PATH_INFO $request_uri;
    }


}


Posted on: 11/12 20:26
Top


Re: ffmpeg vp9 dash av1 dash
#5
Just can't stay away
Just can't stay away


#!/bin/bash

filepath=$1




ffmpeg -i "$filepath" -vn -acodec copy a.m4a

ffmpeg -i "$filepath" -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f mp4 \
-an -vf scale=320:180 -b:v 180k -dash 1 180.mp4

ffmpeg -i "$filepath" -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f mp4 \
-an -vf scale=640:360 -b:v 300k -dash 1 360.mp4

ffmpeg -i "$filepath" -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f mp4 \
-an -vf scale=1280:720 -b:v 500k -dash 1 720.mp4

ffmpeg -i "$filepath" -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f mp4 \
-an -vf scale=1920:1080 -b:v 800k -dash 1 1080.mp4

ffmpeg -i "$filepath" -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f mp4 \
-an -vf scale=3840:2160 -b:v 1200k -dash 1 2160.mp4

##################################################


docker run -v `pwd`:/media -it --net=host --rm google/shaka-packager

packager \
in=a.m4a,stream=audio,init_segment='myvideo/a/init.mp4',segment_template='myvideo/a/$Number%03d$.m4s' \
in=2160.mp4,stream=video,init_segment='myvideo/2160/init.mp4',segment_template='myvideo/2160/$Number%03d$.m4s' \
in=1080.mp4,stream=video,init_segment='myvideo/1080/init.mp4',segment_template='myvideo/1080/$Number%03d$.m4s' \
in=720.mp4,stream=video,init_segment='myvideo/720/init.mp4',segment_template='myvideo/720/$Number%03d$.m4s' \
in=360.mp4,stream=video,init_segment='myvideo/360/init.mp4',segment_template='myvideo/360/$Number%03d$.m4s' \
in=180.mp4,stream=video,init_segment='myvideo/180/init.mp4',segment_template='myvideo/180/$Number%03d$.m4s' \
--segment_duration 10 \
--generate_static_live_mpd \
--mpd_output myvideo/manifest.mpd

Posted on: 11/7 20:57
Top


debian docker
#6
Just can't stay away
Just can't stay away


1, Set up Docker's apt repository.

# Add Docker's official GPG key:
sudo apt-get update
sudo apt
-get install ca-certificates curl gnupg
sudo install 
-m 0755 -/etc/apt/keyrings
curl 
-fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+/etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo 
  
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian 
  "
$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" 
  
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt
-get update

2, Install the Docker packages.

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin


3, Verify that the installation is successful by running the hello-world image:

sudo docker run hello-world






Posted on: 10/31 15:09
Top


microk8s ufw 防火墙
#7
Just can't stay away
Just can't stay away


I've tried allowing based on MicroK8s subnets with the following:
sudo ufw allow in from 10.1.0.0/16 to 10.152.183.0/24
sudo ufw allow in from 10.152.183.0
/24 to 10.1.0.0/16  
sudo ufw allow out from 10.1.0.0
/16 to 10.152.183.0/24
sudo ufw allow out from 10.152.183.0
/24 to 10.1.0.0/16

but that did not work. @Cynerva mentioned this is likely due to the kube-proxy managing rules that forward that traffic to , and that traffic is then filtered by ufw rules. I have not been successful in getting this to work.

The best option I have at the moment is:
sudo ufw allow in on cali+
sudo ufw allow out on cali+
sudo ufw default allow routed



sudo ufw allow in on cni0
sudo ufw allow out on cni0
sudo ufw 
default allow routed

Posted on: 10/6 0:43
Top


Re: linux split 分割文件
#8
Just can't stay away
Just can't stay away


split -b 400M video.avi

Posted on: 9/21 18:48
Top


Re: ffmpeg vp9 dash av1 dash
#9
Just can't stay away
Just can't stay away




ffmpeg -i ../num.mp4 -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f mp4 \
-an -vf scale=320:180 -b:v 180k -dash 1 180.mp4

ffmpeg -i ../num.mp4 -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f mp4 \
-an -vf scale=640:360 -b:v 300k -dash 1 360.mp4

ffmpeg -i ../num.mp4 -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f mp4 \
-an -vf scale=1280:720 -b:v 500k -dash 1 720.mp4

ffmpeg -i ../num.mp4 -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f mp4 \
-an -vf scale=1920:1080 -b:v 800k -dash 1 1080.mp4



Posted on: 8/24 12:11
Top


debian 12 add-apt-repository
#10
Just can't stay away
Just can't stay away


orangepi@orangepi5plus:~$ sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly                                                                                                                                    
Traceback 
(most recent call last):                                                                                                                                                                                 
  
File "/usr/bin/add-apt-repository"line 362in <module>                                              
    
sys.exit(if addaptrepo.main() else 1)                                                              
                  ^^^^^^^^^^^^^^^^^                                                                      
  
File "/usr/bin/add-apt-repository"line 345in main                                                                                                                                                            
    shortcut 
handler(source, **shortcut_params)                                                        
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                        
  
File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py"line 40in shortcut_handler                                                                                                              
    
return handler(shortcut, **kwargs)                                                                   
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                             
  
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py"line 86in __init__                                                                                                                            
    
if self.lpppa.publish_debug_symbols:                                                                                                                                                                           
       ^^^^^^^^^^                                                                                                                                                                                                  
  
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py"line 126in lpppa                                                                                                                              
    self
._lpppa self.lpteam.getPPAByName(name=self.ppaname)                                                                                                                                                      
                  ^^^^^^^^^^^                                                                                                                                                                                      
  
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py"line 113in lpteam                                                                                                                             
    self
._lpteam self.lp.people(self.teamname)                                                                                                                                                                   
                   ^^^^^^^^^^^^^^                                                                                                                                                                                  
AttributeError'NoneType' object has no attribute 'people'                                                                                                                                                        
orangepi@orangepi5plus:~$ sudo apt install  python3-launchpadlib



sudo apt install python3-launchpadlib # fix the problem

Posted on: 6/29 11:42
Top



TopTop
1 2 3 4 ... 11 »



friend links
Themes

(2 themes)
Login
Username:

Password:


Lost Password?
Register now!
Categories
Xoops (11)
--Modules (2)
--Themes (0)
Article (8)