Forum Index


Board index » All Posts




JVM参数配置参考 JVM 推荐配置
#21
Just can't stay away
Just can't stay away


分配内存 堆配置推荐

1.5G          -Xmx1008M -Xms1008M -Xmn336M -XX:MaxMetaspaceSize=128M -XX:MetaspaceSize=128M

2G              
-Xmx1344M -Xms1344M -Xmn448M -XX:MaxMetaspaceSize=192M -XX:MetaspaceSize=192M

3G              
-Xmx2048M -Xms2048M -Xmn768M -XX:MaxMetaspaceSize=256M -XX:MetaspaceSize=256M

4G              
-Xmx2688M -Xms2688M -Xmn960M -XX:MaxMetaspaceSize=256M -XX:MetaspaceSize=256M

5G              
-Xmx3392M -Xms3392M -Xmn1216M -XX:MaxMetaspaceSize=512M -XX:MetaspaceSize=512M

6G              
-Xmx4096M -Xms4096M -Xmn1536M -XX:MaxMetaspaceSize=512M -XX:MetaspaceSize=512M

7G              
-Xmx4736M -Xms4736M -Xmn1728M -XX:MaxMetaspaceSize=512M -XX:MetaspaceSize=512M

8G              
-Xmx5440M -Xms5440M -XX:MaxMetaspaceSize=512M -XX:MetaspaceSize=512M

Posted on: 2023/2/8 17:41
Top


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


GitHub
Gitlab
Bitbucket
Codeberg
sourcehut
Gitee

Posted on: 2023/2/7 17:22
Top


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


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

Posted on: 2023/2/7 17:14
Top


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


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

Posted on: 2023/1/17 13:11
Top


docker halo
#25
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: 2023/1/2 12:23
Top


mysql create user and database
#26
Webmaster
Webmaster


CREATE database userdb ;

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

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



revoke all on db.* from  'user'@'%'



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

show grants for  db_user

Posted on: 2022/12/18 20:25

Edited by eyex on 2023/8/20 19:08:12
Top


chmod dir 0755 file 0444 目录权限0755 文件权限0444
#27
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: 2022/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
#28
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: 2022/12/9 15:36
Top


docker openresty install
#29
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: 2022/12/6 13:57
Top


nginx ip 拦截
#30
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



TopTop
« 1 2 3 4 5 6 ... 11 »



friend links
Themes

(2 themes)
Login
Username:

Password:


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