Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, January 30, 2014

Apache install and initial configure in CentOS 6.5

Follow below steps to install Apache and bring web server up in CentOS 6.5

# yum install httpd

Edit below file,

# vi /etc/httpd/conf/httpd.conf

and change below values,

ServerTokens Prod
ServerSignature Off

:wq (save and exit)

If you are not able to load default page, check whether index.html is available in document root or create one.

If you have index.html in document root then allow in iptables setting (find steps here)

That should do the trick!!!

Apache server shows Connection time out in browser after installation in CentOS

After installing httpd in CentOS, webpage will not load by default

This is because of the iptables

run below command to solve the issue

# /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

# service iptables restart
 
That should do the trick!!!

Thursday, June 6, 2013

Upgrade SVN in Ubuntu 12.04

Follow below steps to Upgrade svn from 1.6 to 1.7

# echo "deb http://opensource.wandisco.com/ubuntu lucid svn17" | sudo tee /etc/apt/sources.list.d/svn.list
# sudo wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
# sudo apt-get update
# sudo apt-get install subversion

That should do the trick!!

Thursday, January 3, 2013

Append shell commands to history immediately

 When working with multiple terminals you can always face ssh timeout which will result in loss of command history of the particular session.

To prevent this, Add below line in "/etc/bash.bashrc" file

export PROMPT_COMMAND='history -a'

After logoff login, every time a shell command runs it will be immediately stored in history file.

That should do the trick!!!

Enable Timestamp in bash history for all users

Time Stamp in Linux history can save you from many tight corners.

To enable this, please add below line to "/etc/bash.bashrc" file

HISTTIMEFORMAT="%d-%h-%Y %T "

Logoff login will enable time stamp in history like below example

57  03-Jan-2013 07:15:22 history

That should do the trick!!!

Tuesday, July 3, 2012

FTP Users with /bin/false shell not able to login to ftp site

It is common to have user shell under "/bin/false" to restrict ftp users from logging through SSH

It also prevents the user from logging in to ftp also. This can be solved by following below steps.

# vi /etc/pam.d/vsftpd

auth   required        pam_shells.so (Comment this line by adding a "#" in the front)

That should do the trick!!!

Wednesday, March 14, 2012

How to disable Ctrl+Alt+Del restarting in Ubuntu

In Ubuntu, the action taken when Ctrl+Alt+Del pressed is based on the configuration file located in "/etc/event.d/control-alt-delete"
Just disable the line which specifies the restart action.


sudo vi /etc/event.d/control-alt-delete

comment the line

#exec /sbin/shutdown -r now “Control-Alt-Delete pressed”

:wq (save and exit)

that should do the trick!!!

How to disable Ctrl+Alt+Del restarting in CentOS

In CentOS, the action taken when Ctrl+Alt+Del pressed is based on the configuration file located in "/etc/init/control-alt-delete.conf"
Just disable the line which specifies the restart action.
 

vi /etc/init/control-alt-delete.conf

comment the line

#exec /sbin/shutdown -r now “Control-Alt-Delete pressed”

:wq (save and exit)

that should do the trick!!!

Tuesday, October 25, 2011

disable mails from CRON

This will help you disable email which are sent from cron whenever it runs.

Edit/Open your cron jobs
 
$ crontab -e

At the top of the file, enter:
 
MAILTO=""

Save with :wq and restart cron

$ /etc/init.d/crond restart


that should do the trick!!!

Saturday, October 8, 2011

Install Webmin in CentOS 6, RHEL 6

Follow below steps to install webmin (Web based Administration Console) in Redhat based Linux systems

Install the Webmin Repository
# vi /etc/yum.repos.d/webmin.repo
input following lines,

[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1

quit by saving ":wq"

# rpm --import http://www.webmin.com/jcameron-key.asc

# yum install webmin

That should do the trick!!!