Thursday, November 1, 2012

How To: Disable Firewall on RHEL / CentOS / RedHat Linux

How To: Disable Firewall on RHEL / CentOS / RedHat Linux

by nixCraft on October 10, 2007 · 23 comments· last updated at June 28, 2012
I don't want firewall because I only run one http (port 80) public service. How do I turn off or disable firewall permanently under RHEL / Fedora Linux / Red Hat Enterprise Linux and CentOS Linux?

iptables is administration tool / command for IPv4 packet filtering and NAT. You need to use the following tools:
[a] service is a command to run a System V init script. It is use to save / stop / start firewall service.
[b] chkconfig command is used to update and queries runlevel information for system service. It is a system tool for maintaining the /etc/rc*.d hierarchy. Use this tool to disable firewall service at boot time.

How Do I Disable Firewall?

First login as the root user.
Next enter the following three commands to disable firewall.
# service iptables save
# service iptables stop
# chkconfig iptables off

If you are using IPv6 firewall, enter:
# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off













Refer:



http://www.cyberciti.biz/faq/fedora-redhat-centos-5-6-disable-firewall/




How to Set Up SVN SSH on CentOS

How to Set Up SVN SSH on CentOS

By William Garmany, eHow Contributor

SVN (Subversion) is a version control system designed to replace Concurrent Version System (CVS). Not only does it match the capabilities of CVS, Subversion has exceeded what CVS is capable of. Setting up SVN with SSH in CentOS can be accomplished easily with commands entered into a terminal. CentOS is a RedHat based distribution using yum and RPM binaries. Subversion has been tied into Apache, so now you can track changes for your Web servers too.



Instructions

    • 1
      Click "Applications," "Accessories," "Terminal" to open a terminal in CentOS. Enter superuser mode by typing "su" and pressing "Enter." Type your admin password and press "Enter" again.
    • 2
      Type "yum install subversion" to automatically download and install subversion and any required dependencies. This can take some time depending on which dependencies you already have installed on your system. When complete, yum will tell you what applications have been installed and that it is done.


How do I install ssh under RHEL / SL (Scientific Linux) / CentOS / Fedora Linux?

Type the following yum command to install ssh client and server:
# yum -y install openssh-server openssh-clients
Start and enable sshd server:
# chkconfig sshd on
# service sshd start





    • 3
      Type "mkdir /var/svn/repos" to create the repository in. Type the command "svnadmin create /var/subversion/repos/mycodes" and change to the directory with "cd /var/subversion/repos/mycodes/conf."
    • 4
      Edit the file svnserve.conf by typing "vi svnserve.conf" into terminal. Add "anon-access = none" and "auth-access = write" to the file. Save and close.

    • 5
      Create an SVN group by typing "groupadd svn" into terminal. Make the group owners of the repo directory with "chown -R :svn /var/subversion/repos/" and set the permissions with "chmod -R 775 /var/subversion/repos/." Add users to the group with "usermod -a -G svn (user id)."

    • 6
      Give access to the folder to everyone in the group by typing "vi" and entering the following information into text editor:
      #!/bin/sh
      # set the umask so files are group-wriable
      umask 002
      # call the 'real' svnserve, also passing in the default repo location
      exec /usr/bin/svnserve-daemon "$@" -r /var/svn/repos
      Save the file as "/usr/local/bin/svnwrapper.sh."

    • 7
      Type "cd usr/bin" and "chmod 755 /usr/local/bin/svnwrapper.sh" to allow access to the file. Change the name of snvserve to work with your system by typing "mv svnserve svnserve-daemon" into terminal. Create a symbolic link to the original snvserve with "ln -s /usr/local/bin/svnwrapper.sh svnserve" typed into terminal.

    • 8
      Create the needed directories and import the code by typing "mkdir code," "mkdir code/trunk," "mkdir code/tags," "mkdir code/branches" and run the code with "svn import code svn+ssh://USERNAME@SERVER/my_code -m 'inital import'" and delete the no longer needed folders with "rm -rf code." Your system is now set up.