# yum install samba [root@owl43 public]# vi /etc/samba/smb.conf ================================== [global] workgroup = WORKGROUP server string = OWL45 log file = /var/log/samba/%m.log security = user passdb backend = tdbsam #encrypt passwords = yes #smb passwd file = /etc/samba/smbpasswd hosts allow = 127. 192.168.0. #socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 [homes] comment = Home Directories browseable […]
Network monitoring on Linux : iftop, nload, iptraf
CentOS : iptraf [root@owl43 ~]# yum install iptraf [root@owl43 ~]# iptraf
Midnight Commander toggle Mark files shortcut => Ctrl + t
Midnight Commander mark for select files Ctrl + T
Linux disk speed check - hdparm -tT
# hdparm -tT /dev/sdc
Resin 4 session timeout
vi /etc/resin/app-default.xml <web-app-default> <!-- configures the default class loader --> <class-loader> <compiling-loader path="WEB-INF/classes"/> <library-loader path="WEB-INF/lib"/> </class-loader> <session-config cookie-domain="mydomain.com"> <session-timeout>30</session-timeout> <session-max>4096</session-max> </session-config> OR vi /etc/resin/cluster-default.xml <resin xmlns="http://caucho.com/ns/resin" xmlns:resin="urn:java:com.caucho.resin"> <cluster-default> <host-default> .... <session-config> <use-persistent-store>${session_store}</use-persistent-store> <session-timeout>480</session-timeout> <session-max>4096</session-max> <enable-url-rewriting>false</enable-url-rewriting> </session-config> </web-app-default> </host-default> </cluster-default> </resin>
Cent OS MySQL too slow
vi /etc/my.cnf [mysqld] skip-name-resolve
sftp parent directory lock chroot
[root@localhost owl]# vi /etc/ssh/sshd_config Subsystem sftp internal-sftp Match Group owl ChrootDirectory /home/owl/ #ChrootDirectory /home/owl/%u #ChrootDirectory %h ForceCommand internal-sftp [root@localhost owl]# chown root.root /home/owl [root@localhost owl]# chmod 755 /home/owl [root@localhost owl]# /etc/rc.d/init.d/sshd restart ChrootDirectory 에서 지정하는 폴더는 root 계정만 쓸 수 있다. 따라서, ChrootDirectory %h 와 같이 설정한다면, 사용자의 홈폴더는 읽기 […]
리눅스 로그인할 때 홈폴더 자동생성 데몬 oddjobd
[root@localhost owl]# authconfig --enablemkhomedir --update oddjobd (을)를 시작 중: [ OK ]
Creating home directories on Linux when login - nssswitch
# yum install oddjob-mkhomedir oddjob nscd # /etc/rc.d/init.d/nscd restart # /etc/rc.d/init.d/oddjobd restart # grep SELINUX=disabled /etc/selinux/config SELINUX=disabled # authconfig --enablemkhomedir --update # grep mkhomedir /etc/pam.d/system-auth-ac # chmod 777 /home
리눅스 home 용량 추가할 때, 유용한 마운트 바인드
# mount -B /data1 /home 또는 # mount --bind /data1 /home # vi /etc/fstab /data1 /home none bind 0 0 # mount | grep /home