리눅스 사용 메모
참고하시는것은 관계 없으나 개인적으로 팁을 정리하는 중이므로 다소 개인적일 수 있음..
틀려도 책임은 못집니다. 단, 댓글로 질문을 다시면 아는 한도내에서 느린(?)답변 드립니다.
환경 : Ubuntu 12.04
1) mount -a -> mount all dir from /etc/fstab
2) FTP file mount in ubuntu
software center, search File sharing <---
install gadmin-samba
curlftpfs -o user=[ID]:[PW] -o allow_other ftp://[host] [mount point]
or
install Gigolo -> add book mark
3) Google talk
use empathy
4) ssh auto authorization.
참고 : http://kldp.org/node/84757
adduser [usr_name] -d [path_of_home] -c [comment]
passwd [usr_name]
copy 3files (passwd/group/shadow ) to nodes
ssh-keygen -t rsa
cd ~/.ssh/
cat id_rsa.pub >> authorized_keys
chmod 600 authorized_keys
5) prohibit or allow specific ip or port
[check ]
iptables -L
[write]
iptables -A INPUT -p tcp --dport [port numb] -j ACCEPT
iptables -A INPUT -p tcp --dport [port numb] -j DROP
iptables -I INPUT 1 -s [ipaddr] -p tcp --dport 80 -j REJECT
port ex ) 8080 , 45:60
[erase ]
iptables -D INPUT -s xxx.xxx.xxx.xxx -p tcp --dport 80 -j REJECTiptables -D INPUT [line numb]
출처 http://blog.daum.net/012_012/8
___________________________________________
열려있는 모든 포트
# netstat -nap
LISTEN 되는 모든 포트
# netstat -l (netstat -nap | grep LISTEN)
모든 서비스 동시 접속자 수
# netstat -nap | grep ESTABLISHED | wc -l
웹 동시 접속자 수
# netstat -nap | grep :80 | grep ESTABLISHED | wc -l
___________________________________________
lsof -i tcp (???)
6) rkchunter -c
7) mount Shared dir on Linux guest.
8) 가끔 gfs 서비스가 이상하면 service cman start
9)Unfinished transactions remaining - yum-complete-transaction
While trying to run a yum update I received the below warning message:
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
To resolve this yum-complete-transaction is required to complete the unfinished transactions.
yum-complete-transaction is a program which finds incomplete or aborted yum transactions on a system and attempts to complete them. It looks at the transaction-all* and transaction-done* files which can normally be found in /var/lib/yum if a yum transaction aborted in the middle of execution.
If it finds more than one unfinished transaction it will attempt to complete the most recent one first. You can run it more than once to clean up all unfinished transactions.
Run the following to install yum-utils (which provides yum-complete-transaction), cleanup and finish the transactions.
yum install yum-utils
yum clean all
/usr/sbin/yum-complete-transaction --cleanup-only
Now yum commands can be run without the unfinished transactions warning.
yum update
출처 http://www.vmadmin.co.uk/linux/44-redhat/209-linuxyumcomptrans
8) # fuser -u 디렉토리 : 해당 디렉토리를 사용하고 있는 사용자와 프로세스 확인