Linuxã§ã¢ã¼ããã¯ãã£ãamd64ãarm64ãã¯ã©ã®ãããªæ段ã§ç¢ºèªã§ããã®ã§ããããï¼ uname -aã§ã¯æããããªçããå¾ããã¨ãåºæ¥ã¾ããã§ããã Linuxã§ã¢ã¼ããã¯ãã£ãamd64ãarm64ãã¯ã©ã®ãããªæ段ã§ç¢ºèªã§ããã®ã§ããããï¼ uname -aã§ã¯æããããªçããå¾ããã¨ãåºæ¥ã¾ããã§ããã
Ubuntuãµã¼ããéç¨ãã¦ã㨠/boot ã®å®¹éãæ¸ã£ã¦ãã¦ãã¢ãããã¼ãã§ããªããªã£ããããã£ã¹ã¯ã®ä½¿ç¨éãç£è¦ãã¦ããã¨ã¢ã©ã¼ããä¸ãã£ãããã¾ãããã ã¤ã³ã¹ãã¼ã«æ¸ã¿ã®å¤ãã«ã¼ãã«ãåé¤ã㦠/boot é åã空ããæ¹æ³ã§ãã ãã£ã¹ã¯ã®ä½¿ç¨ç¶æ³ã確èªãã df ã§ç¢ºèªããã¨75%使ç¨ä¸ã§ããã $ df -h /boot Filesystem Size Used Avail Use% Mounted on /dev/sda1 472M 334M 114M 75% /boot ç¾å¨ã®ã«ã¼ãã«ã®ãã¼ã¸ã§ã³ã確èªãã uname ã§ç¢ºèªã§ãã¾ãã $ uname -r 4.4.0-34-generic ç¾å¨ã®ã«ã¼ãã«ã®ãã¼ã¸ã§ã³ã¯ 4.4.0-34-generic ã§ããã ã¤ã³ã¹ãã¼ã«ããã¦ããã«ã¼ãã«ä¸è¦§ã確èªãã¾ãã $ dpkg --get-selections | gre
è¿½è¨ ãã£ã¹ã¯å®¹éãã°ã©ãã£ã«ã«ã«ç¢ºèªå¯è½ãªncduã³ãã³ããæãã¦é ãã¾ããã ãã¡ãã ã¨å®¹é大ã®ãã¡ã¤ã«ã®ç¹å®ãæ©ããã§ãã krf7v4k2ããããããã¨ããããã¾ããï¼ ã¤ã³ã¹ãã¼ã« (debianç³») apt install ncdu (redhatç³») yum install ncdu ##ç¾å¨ã®ãã£ã¹ã¯å®¹éã®ç¢ºèª ###å ¨ä½ã®ãã£ã¹ã¯å®¹éãç¢ºèª df -h [root@ip-xxx-xxx-xxx-xxx ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 6.0G 4.1G 1.6G 73% / tmpfs 498M 0 498M 0% /dev/shm ###ãã£ã¹ã¯å®¹éã®å 訳ãç¢ºèª **du -sh [容éå 訳ã確èªããããã£ã¬ã¯ããªã®ãã¹] ä¾) du -sh /*ã(ã«ã¼ãç´ä¸ï¼ ä¾) du
multitailã³ãã³ãã§ã§ãããbrew install multitailã§ã¤ã³ã¹ãã¼ã«ããå¾ã.zshrcã«ä»¥ä¸aliasãå®ç¾©ãã¦ä½¿ã£ã¦ã¾ãã alias tails='multitail -l "ssh server1 tail -f ~/logs/hoge.log" \ -L "ssh server2 tail -f ~/logs/fuga.log"' ããã¯ä¾¿å©ã ãªãããã£ã«ã¿ãªã³ã°ã¨ããåºæ¥ãã åèï¼
Linuxã§SWAPé åã確èªã»ä½æããæ¹æ³ãç´¹ä»ãã¾ããfreeã³ãã³ããmkswapã³ãã³ããswaponã³ãã³ããå©ç¨ãã¾ãã SWAPé åã¨ã¯ ãã¼ããã£ã¹ã¯å ã«è¨ç½®ãããé åã§ããã¡ã¢ãªã¼å®¹éã足ããªããªã£ãæãã¡ã¢ãªã®ä¸ã§ä¸è¦ãªé¨åãSWAPé åã«ç§»åããã¾ã(ã¹ã¯ããã¢ã¦ã)ã ãã¼ããã£ã¹ã¯ã¸ã®ã¢ã¯ã»ã¹ã¯é ãã®ã§ãã¹ã¯ããã¢ã¦ããå¤çºããã¨ããã©ã¼ãã³ã¹ã®ä½ä¸ã«ç¹ããã¾ããã©ããã¦ãã¡ã¢ãªã足ããªãå ´åãSWAPé åãå©ç¨ãã¾ãã SWAPé åã®ç¢ºèª SWAPé åã¯ãfreeã³ãã³ãã§ç¢ºèªã§ãã¾ãã $ free -m total used free shared buffers cached Mem: 3955 293 3662 80 11 214 -/+ buffers/cache: 68 3887 Swap: 0 0 0
Linuxã§ç¨ããããæ¨æºã®ã·ã§ã«ã»ããã°ã©ã ã¯ãbashãï¼ã°ã£ãã ï¼ã§ãããbashã®è¨å®ãã¡ã¤ã«ã¯å ¨ã¦ã¼ã¶ã¼å ±éã®/etcãã£ã¬ã¯ããªã¨ï¼åã¦ã¼ã¶ã¼ãã¨ã®ãã¼ã ã»ãã£ã¬ã¯ããªã«åããã¦ããï¼åã¦ã¼ã¶ã¼ã®è¨å®ãåªå ãããã å ¨ã¦ã¼ã¶ã¼å ±éã®è¨å® /etcãã£ã¬ã¯ããªã«ã¯ï¼/etc/bashrcãã¡ã¤ã«ã¨ï¼/etc/profileãã¡ã¤ã«ã¨ããï¼bashã®è¨å®ãã¡ã¤ã«ãé ç½®ããã¦ããã /etc/bashrcãã¡ã¤ã«ã«ã¯ï¼å ¨ã¦ã¼ã¶ã¼ã«å ±éã®ã¨ã¤ãªã¢ã¹ã¨é¢æ°ãè¨è¿°ããã¦ãããæ¨æºã§ã¯ï¼ã·ã§ã«ãèµ·åããç°å¢ãã¨ã®ããã³ãããå®ç¾©ããã¦ããã»ãï¼ãã¡ã¤ã«ããã£ã¬ã¯ããªãæ°è¦ä½æããå ´åã«ã©ã®ãããªãã¼ããã·ã§ã³ãè¨å®ãããããè¨è¿°ããã¦ããã ä¾ãã°ã¦ã¼ã¶ã¼IDã®å¤ã«ãã£ã¦å¦çãå¤åãããä¾ãã°ï¼Fedora 7ã§ã¯ï¼IDã99ãã大ããå ´åã¯umask 002ãå®è¡ããï¼ãã以å¤ã¯umask
ããã«ã¡ã¯ãæè¤ã§ãã æè¿ãæ°ããã¹ãã¼æ¿ã欲ãããªã¨æã£ã¦ãã¾ããç¾å¨ä½¿ã£ã¦ããOGASAKAã®æ¿ã¯5å¹´ç®ã«å ¥ããã¡ã¼ã«ã¼ãããã以ä¸ã¯ãã¥ã¼ã³ããã(ã¡ã³ããã³ã¹)ã¯ã§ããªãããã¨è¨ããã¦ãã¾ãã¾ãããããã次ã«è²·ããªããã¹ãã¼ãã¼ãã¼ã®äººã¨ä¸ç·ã«ãã¦ãã¼ã«é£ã³è¾¼ã¿ãããã»ããã¡ããã¿ã¤ããè¯ãã®ããªã¨èãã¦ãã¾ããçããã®ãªã¹ã¹ã¡ããã²æãã¦ãã ããã ãã¦ãä»æ¥ã¯Linux Kernelä¸ã§ã®ã¡ã¢ãªç®¡çãç¹ã«ãã¼ã¸åå(Page Reclaim)ã¨ã¹ã¯ããã«çµãããã¹ã¯ããã®çç±ãããã¼ã¸ãååããä»çµã¿ãããã¦ãã¹ã¯ããã®æ§åã観å¯ãããã®3ç¹ã«åãã¦ã話ããã¾ãããã¹ã¯ããããã®ãæ°æã¡æªããã¨èãã¦ããæ¹ã¯å°ãªããªãã¨æãã¾ãããç§ãããèãã¦ããææãããã¾ãããããããããã¯æ¬å½ã«æªãäºãªã®ããä»åæãä¸ãã¦è¡ãã¾ãã â»ä¸»ãªå¯¾è±¡Kernelã¯2.6.32(Red Ha
ä½ãã®ã¹ã¯ãªããã§ä½æããå®æãããã®ãã°ã logrotate ã§ãã¼ãã¼ãããããã«ããå ´åãããããåå4æã«èµ·åãã¦10åéå®è¡ãããã¨å®è¡ä¸ã«ãã°ãã¼ãã¼ãããããã¨ã«ãªãã¾ãã ãããã¹ã¯ãªããã§ãã°ãã¡ã¤ã«ãéãã£ã±ãªãã«ãã¦ããå ´åããã¼ãã¼ãã§ãã°ãã¡ã¤ã«åããhoge.log â hoge.log.1ãã®ããã«å¤æ´ãããã¨ãã¦ãinodeçªå·ãå¤ãããªãã®ã§ãã¼ãã¼ãå¾ã®ãhoge.log.1ãã«æ¸ãè¾¼ã¿ãç¶ç¶ãã¾ãã ã§ãã logrotate 㧠compress ãæå®ãã¦ããã¨ããã¼ãã¼ãæã«ãã°ãå§ç¸®ããã¦å ã®ãã°ãã¡ã¤ã«ã¯åé¤ãããããããããã¹ã¯ãªããã§ãã°ãéãã£ã±ãªãã«ãã¦ããã¨ãã¼ãã¼ãã®ã¿ã¤ãã³ã°ã§ãã°ã®æ¸ãè¾¼ã¿å ãè¦å¤±ã£ã¦ããã¼ãã¼ãã®æé以éã«çºçãããã°ãè¨é²ãããªããªãã¾ãã ããã解決ããããï¼ã«ããããã§ã¯ç¡ãã¨æãã¾ããï¼ãlogro
Disclaimer ç§ã¯ãããã¯ã¼ã¯ã®åå¼·ãã¡ããã¨ãããã¨ãªãããLinux ã®ã½ã¼ã¹èªãã®ãã¯ããã¦ãªç´ 人ã§ãã ä½ãããããªã¨ãããªã©ããã°ãé æ ®ãªãã³ã¡ã³ãæ¬ã§ã¾ãããããé¡ããããã¾ãã ã½ã¼ã¹ã³ã¼ãã®å¼ç¨ã«é¢ã㦠æ¬æä¸ã§ Linux ã®ã³ã¼ãï¼ããã¥ã¡ã³ããå¼ç¨ãã¦ããç®æãããã¾ããããã¹ã¦ã¿ã° v4.11 ã®ãã®ã§ããã¾ããæ¥æ¬èªã®ã³ã¡ã³ãã»ç¿»è¨³æã¯çè ãå ¥ãããã®ã§ãã TL; DR Linux ã®ã«ã¼ãã«ãã©ã¡ã¼ã¿ net.ipv4.tcp_tw_recycle ã¯ããã¼ã¸ã§ã³4.12ããå»æ¢ããã¾ããã ä»å¾ã¯ãã®è¨å®ã¯è¡ããªãããã«ãã¾ãããï¼ã¨ãããã§ãã¾ããï¼ã ä¸æ¹ãnet.ipv4.tcp_tw_reuse ã¯å®å ¨ã§ãããå¼ãç¶ãå©ç¨ã§ãã¾ãã â¦ã¨ããã ãã®è©±ãªã®ã§ãããèªåç¨ã«ã¡ã¢ãã¦ãçµç·¯ã»èæ¯ãªã©ãè¨é²ãã¦ããã¾ãã ãªãã§æ°ãã¤ããã ãã®ãã©
Clone via HTTPS Clone with Git or checkout with SVN using the repositoryâs web address. # å ±æã¡ã¢ãªã®æ大ãµã¤ãºããµã¼ãã¼ã®æè¼ã¡ã¢ãª(1GB)ã«åããã¦å¤æ´ kernel.shmmax = 1073741824 # ã·ã¹ãã å ¨ä½ã®å ±æã¡ã¢ãªã»ãã¼ã¸ã®æå¤§æ° kernel.shmall = 262144 # ã·ã¹ãã å ¨ä½ã®ããã»ã¹æ°ã®ä¸é kernel.threads-max = 1060863 # ã·ã¹ãã å ¨ä½ã®ãã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ã®ä¸é fs.file-max = 5242880 # RFC1323ã®TCPã¦ã£ã³ã㦠ã¹ã±ã¼ãªã³ã°ãæå¹ã«ããã # 64K以ä¸ã®TCP windowã使ããããã«ãªãã # 巨大ãªãã¡ã¤ã«ã転éããæã«åé¡ã«ãªã£ãå ´åã¯ç¡å¹ã«ããã¨è§£æ±ºããããã¨ãããã net.
ãã®è¨äºã§ã¯ãæ¨æºåºåãæ¨æºã¨ã©ã¼åºåã好ãåæã«åºåããã ãã¡ã¤ã«ã«åºåãç»é¢ã«åºåã両æ¹åºåãªã©ãªã©ãã¿ã¼ã³åãã¦ã¿ãã åºåç¨ã¹ã¯ãªããä½æ ãªãã®ã³ãã³ãã使ããæ©ãåã«ã両æ¹ãã¡ããã¨åºåããã¹ã¯ãªããä½æããéå§ãããã ä»å¾ã®å 容ã§ã¯ããã使ã£ã¦ããã
ã dd ãã³ãã³ãââãããã¯åä½ã§ãã¡ã¤ã«ãã³ãã¼ãå¤æããï¼Linuxåºæ¬ã³ãã³ãTipsï¼163ï¼ æ¬é£è¼ã¯ãLinuxã®ã³ãã³ãã«ã¤ãã¦ãåºæ¬æ¸å¼ãããªãã·ã§ã³ãå ·ä½çãªå®è¡ä¾ã¾ã§ãç´¹ä»ãã¦ããã¾ããä»åã¯ããããã¯åä½ã§ãã¡ã¤ã«ãã³ãã¼ãå¤æãããddãã³ãã³ãã§ãã
389-directory-service (1) Ansible (5) ansible-playbook (2) Apache (5) Arch (4) awk (1) AWS (77) CLI (1) CloudFormation (8) CloudFront (1) Cloudwatch (5) CodeCommit (1) CodePipeline (1) Cognito (2) CostExpolorer (1) EC2 (2) ECR (1) EKS (1) IAM (2) Kinesiss (1) Lambda (2) OpensearchServerless (1) RDS (2) Route 53 (1) SQS (1) SSM (1) ãªã¶ã¼ããã¤ã³ã¹ã¿ã³ã¹ (1) awscli (3) Bash (1) CakePHP (1) centos8 (1) cloud-i
NAME systemctl - Control the systemd system and service manager SYNOPSIS systemctl [OPTIONS...] COMMAND [NAME...] DESCRIPTION systemctl may be used to introspect and control the state of the "systemd" system and service manager. Please refer to systemd(1) for an introduction into the basic concepts and functionality this tool manages.
mkdirã³ãã³ãã®ä¾¿å©ãªãªãã·ã§ã³ãã¡ ã³ãã³ãã®ä¸è¦§ å¾ãã詳細ããç´¹ä»ããããã¾ãã¯ä¸è¦§ã§è¦ã¦ã¿ããã ãªãã·ã§ã³-mï¼--modeãªãã·ã§ã³ï¼ ãã¼ããã·ã§ã³ãæå®ããã£ã¬ã¯ããªãä½æãã -pãªãã·ã§ã³ï¼--parentsãªãã·ã§ã³ï¼ ã¨ã©ã¼ã表示ããè¨è¿°ãããã£ã¬ã¯ããªãåå¨ããªããã°ä½æãã -vãªãã·ã§ã³ï¼--verboseãªãã·ã§ã³ï¼ ãã£ã¬ã¯ããªãä½æããçµæã®ã¡ãã»ã¼ã¸ã表示ãã ããã§ã¯ãã²ã¨ã¤ãã¤è¦ã¦ãããã -mãªãã·ã§ã³ï¼ãã¼ããã·ã§ã³ãæå®ããã£ã¬ã¯ããªãä½æãã ãã¼ããã·ã§ã³ãæå®ãã¦ãã£ã¬ã¯ããªãä½æãããªãã·ã§ã³ã ã mkdirã¯æå®ããªããã°ãç¶æ³ã«ãã£ã¦ã·ã¹ãã ã§è¦å®ããããã¼ããã·ã§ã³ãæå®ããããããã®ãªãã·ã§ã³ã使ããã¨ã§ä»»æã®ãã¼ããã·ã§ã³ãæå®ã§ããã $ mkdir -m ãã¼ããã·ã§ã³æå® ãã£ã¬ã¯ããªå ãã¼ããã·ã§ã³ã¯ã000ã
ã¦ã¼ã¶ã¼ãå¥ã®ã¦ã¼ã¶ã¼ã®æ¨©éãå©ç¨ãã¦ããã°ã©ã ãå®è¡ã§ããã³ãã³ããsudoãã«ããã¹ã¯ã¼ããªãã§ç¹æ¨©ã®ç²å¾ã許ãèå¼±æ§ãè¦ã¤ããã¾ããããã®èå¼±æ§ã¯2011å¹´7æããåå¨ãã¦ãããåLinuxãã£ã¹ããªãã¥ã¼ã·ã§ã³ã¯ä¿®æ£å¯¾å¿ãçºè¡¨ãã¦ãã¾ãã CVE-2021-3156: Heap-Based Buffer Overflow in Sudo (Baron Samedit) | Qualys Security Blog https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit Buffer overflow in command line unescaping https://www.sudo.ws/a
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}