Tuesday, February 19, 2013

how to mount share windows on fedora



how to mount   share windows on fedora

mount -t cifs //IP_or_Hostname/windows_share/folder /home/user_mount/destination  -o uid=user_mount gid=group_user_mount username=windows_user,password=windows_password,domain=AD_domain, rw


Example:
#su - khonkaensoft
#mkdir /public_html/mnt

if done mkdir exit command to root user
with root user

#mount -t cifs //192.168.100.100/gallery/2013 /home/khonkaensoft/public_html/mnt  -o uid=khonkaensoft gid=khonkaensoft username=myuser,password=1234,domain=workgroup, rw


So configure auto mount in  etc/fstab:

#vi /etc/fstab

add buttom line

//192.168.100.100/gallery/2013 /home/khonkaensoft/public_html/mnt  -o uid=khonkaensoft gid=khonkaensoft username=myuser,password=1234,domain=workgroup,iocharset=utf8,mode=0777,dir_mode=07‌​77 0 0


reboot test auto mount

Monday, February 11, 2013

lsof command


lsof -i tcp:80

COMMAND   PID USER   FD   TYPE  DEVICE SIZE NODE NAME
httpd   21943 root    4u  IPv4 1696756       TCP mysite.com:http (LISTEN)

lsof ตาม Process ID

/usr/sbin/lsof -p 21943 | more

VirtualHost HTTP redirect to HTTPS

<VirtualHost *:80>     ServerName www.example.com     Redirect / https://www.example.com/ </VirtualHost> <VirtualHos...