# java -Djava.security.egdD;file:;dev;.;urandom用处背景在java开发中广泛使用SecureRandom,产生可靠随机数。但在大量产生随机数的场景下,性能会较低。
引起原因SecureRandom产生下一个随机数的时候调用nextLong或者nextBytes,最终会调用SecureRandom的nextBytes。而nextBytes是一个同步的方法,在多线程使用时,可能会产生性能瓶颈。
解决方法使用 -Djava.security.egdD;file:;dev;.;urandom 加快随机数产生
解决原理;dev;random在产生大量随机数的时候比;dev;urandom慢,所以,建议在大量使用随机数的时候,将随机数发生器指定为;dev;.;urandom。
hotspot需要使用配置项-Djava.security.egdD;file:;dev;.;u ...
Error creating bean with name messageSource defined in ServletContext resource [/WEB-INF/spring.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name org.springframework.aop.aspectj.AspectJPointcutAdvisor#: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframewor ...
org.example;import org.aspectj.lang.JoinPoint;import org.aspectj.lang.ProceedingJoinPoint;import org.aspectj.lang.annotation.*;import org.springframework.stereotype.Component;/** * aop组件 */@Aspect@Componentpublic class AspectComponent @Pointcut("execution(* org.example.*.*(..))") public void pointCut() // 在目标方法 ...
centos调整根分区大小 https://www.cnblogs.com/fengyuanfei/p/.html?ivk_saD;u
linux samba相关
samba:共享文件夹
pdbedit -L //查看samba中的账户,看看自己登陆的账户是否成功添加 smbpasswd 用户名 //首次需要添加用户,用于win登录。也用于改密码 testparm // 检查samb服务的配置文件格式 pdbedit –a username:新建Samba账户。pdbedit -x username:删除Samba账户。pdbedit -L:列出Samba用户列表,读取passdb.tdb数据库文件。pdbedit -Lv:列出Samba用户列表详细信息。pdbedit -c “[D]” –u username:暂停该Samba用户账号。pdbedit -c “[]” –u username:恢复该Samba用户账号。
Samba 配置文件的语法比较复杂,但是可以使用以下参数配置共享文件夹:. `[share name]`:指定共享的名称。 . `path`:指定共享的目录路径。例如:`path ...
Nginx安装及配置文件详解](https://www.jianshu.com/p/e)
redis中文文档
配置阿里云yum源centos配置国内yum源 - 腾讯云开发者社区-腾讯云 (tencent.com)cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupwget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-.repowget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-.repoyum clean all # 清除系统所有的yum缓存 yum makecache # 生成yum缓存
安装 epelyum install -y epel-release
配置阿里镜像提供的epe ...
另外,还有几个特殊字符用来处理参数:
参数处理 说明$# 传递到脚本的参数个数$* 以一个单字符串显示所有向脚本传递的参数。如”$*”用「”」括起来的情况、以”$ $ … $n”的形式输出所有参数。$$ 脚本运行的当前进程ID号$! 后台运行的最后一个进程的ID号$@ 与$*相同,但是使用时加引号,并在引号中返回每个参数。如”$@”用「”」括起来的情况、以”$” “$” … “$n” 的形式输出所有参数。$- 显示Shell使用的当前选项,与set命令功能相同。$? 显示最后命令的退出状态。表示没有错误,其他任何值表明有错误。实例#!;bin;bash
author:菜鸟教程url:www.runoob.comecho “Shell 传递参数实例!”;echo “第一个参数为:$”;
echo “参数个数为:$#”;echo “传递的参数作为一个字符串显示:$*”;执行脚本,输出结果如下所示:
$ chmod +x test.sh$ .;test.sh Shell 传递参数实例!第一个参 ...
内核
系统内存管理
软件程序管理
硬件设备管理
文件系统管理
acl权限ACL权限控制为白名单授权机制,即允许用户或角色对指定对象执行指定操作。ACL权限控制方式简单明了,可实现精准授权。
Linux 系统传统的权限控制方式,无非是利用 种身份(文件所有者,所属群组,其他用户),并分别搭配 种权限(读 r,写 w,访问 x)。比如,我们可以通过 ls -l 命令查看当前目录中所有文件的详细信息,其中就包含对各文件的权限设置: [root@localhost ~]# ls -l total drwxr-xr-x. root root Apr : Desktop drwxr-xr-x. root root Apr : Documents … -rwxr-xr-x. root root Apr : post-install … 以上输出信息中,“rwxr-xr-x”就指明了不同用户访问文件的权限,即文件所有者拥有对文件的读、写、访问权限(rwx),文件所属群组拥有对文件的读、访问权限(r-x) ...
这里的文件系统扩展属性,不是我们常说的lsattr命令和chattr命令中文件操作的属性。这里的扩展属性是完全自定义的。扩展属性的支持,不同文件系统对其支持程度不同。某些系统对于文件关联的扩展属性的数量和大小还有更为严格的限制。原文链接:https://www.linuxcool.com/getfattr
CentOS 中搭建NFS文件共享存储服务的完整步骤setfattrsetfattr -n "user.name" -v "lfdou" file.txt
> -n user为命名空间、name为user命名空间下的值
> -v 为这个name属性的具体描述
> file.txt 为需要设置的文件名
setfattr -n user.file.conf.name.cn -v
getfattr-n 得到命名扩展属性值
-d 获得所有扩展属性值
-e<编码> 编码值(为文本、十六进制或base编码)
-h 不引用符号链接
-R 递归到子目录
-m<模式> 包括名称匹配正则表达式模式的属性 ...