Archive for the ‘Miscellaneous’ Category

Linux:Iptables rules for different services

Sunday, March 20th, 2011

Bellow information for nfs server: vi /etc/sysconfig/nfs LOCKD_TCPPORT=32803 LOCKD_UDPPORT=32769 MOUNTD_PORT=892 RQUOTAD_PORT=875 STATD_PORT=662 STATD_OUTGOING_PORT=2020 Now reboot the services # service portmap restart # service nfs restart # service rpcsvcgssd restart Now add rules into iptables -A RH-Firewall-1-INPUT -s 192.168.2.0/24 -p udp -m udp –dport 111 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.2.0/24 -p tcp -m tcp –dport [...]

Selinux commands for services

Saturday, March 5th, 2011

(a)Selinux Requirement for NIS Clients setsebool -P allow_ypbind=1 ypbind_disable_trans=1 yppasswdd_disable_trans=1 Use getsebool command to verify : getsebool allow_ypbind ypbind_disable_trans yppasswdd_disabled _trans allow_ypbind -> on ypbind_disable_trans –>on yppasswdd_disable_trans –> on b) Selinux for vsftpd getsebool -a | grep ftp allow_ftpd_anon_write –> off allow_ftpd_full_access –> off allow_ftpd_use_cifs –> off allow_ftpd_use_nfs –> off ftp_home_dir –> off httpd_enable_ftp_server –> [...]

Linux:Unable to copy long( _ ,#) file name from windows to samba server

Tuesday, October 5th, 2010

Some times , When trying to copy long directories/subdirectories or file name include (_ or # ) from windows to Samba server, it gives error example : “unable to copy” or “Cant move folder file_name_long_name.cfm ,the file name or extension is too long” The solution is : [ share ] path = /share-name /long-directory read [...]

Linux:How to run c program in linux

Friday, June 4th, 2010

1. Open an editor in linux Example vi editor 2. Write a simple program and save it as progra1.c #include <stdio.h> int main (void) { printf ("Programming is fun.\n"); return 0; } 3. compile the program : $ gcc prog1.c 4. Run the program : ./a.out Or 5.you can give it a different name : [...]

Linux :file and directory permission

Thursday, April 8th, 2010

Octal Permission: 0 — 000 All types of access are denied 1 –x 001 Execute access is allowed only 2 -w- 010 Write access is allowed only 3 -wx 011 Write and execute access are allowed 4 r– 100 Read access is allowed only 5 r-x 101 Read and execute access are allowed 6 rw- [...]

Linux-Memory Performance statistics

Wednesday, March 31st, 2010

Ref: Optimizing Linux® Performance: A Hands-On Guide to Linux® Performance Tools Ref:http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/admin-primer/s1-resource-what-to-monitor.html Ref:http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/admin-primer/s1-resource-rhlspec.html Basic explanation of memory related words: Swap (Not Enough Physical Memory) All systems have a fixed amount of physical memory in the form of RAM chips. The Linux kernel allows applications to run even if they require more memory than available with [...]

Linux:If Running Kernel Is 32 Or 64 Bit

Thursday, February 18th, 2010

To find out, if Your kernel is 64 bit or 32 bit, run this commands

uname -a

Sample Out put for 64 bit kernel :

Linux-How to conferm 64bit/32bit capability of CPU

Wednesday, February 17th, 2010

How many CPU in the system : commands : cat /proc/cpuinfo   [root@server ~]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 3 cpu MHz : 3401.008 cache size : 2048 KB physical id : 0 siblings : 2 [...]

Invalid method in request \x80O\x01\x03

Wednesday, November 18th, 2009

Make sure the IP of the server and the Ip in Virutal host (ssl configuraiton ) are same. <VirtualHost xx.xx.xx.xx:443> </VirtualHost>