Hi all,
I am very much pleased to announce Christmas/New year gift for you people. We just started our new Linux/Unix forums to resolve our issues which we are facing on day to day basis at work as well as home. Please join hands with us to help others who are in need.
The forums can be accessed at http://forums.linuxnix.com
The forums are free to all
The forums does not require to register but we suggest you to register and post questions.
As a www.linuxnix.com admin I am very much awaited to see all you there discussing on various issues faced by you in Linux/Unix which will benefit us all.
Thanks,
Admin
http://www.linuxnix.com
http://forums.linuxnix.com is activate for Public
0 comments 12/30/2010 10:58:00 AM Posted by Surendra Kumar AnneLabels: General
Facing Issue With Blogger. Posts On Apache Will Be Delayed
0 comments 12/30/2010 10:48:00 AM Posted by Surendra Kumar AnneLabels: General
Hi all,
We are facing issues with posting apache posts on linuxnix.com. This is because the apache code is messing up with html rendring of blogger. So we are not able to post Virtulhost codes in the site. We will come up with a solution to resolve this issue. Mean time we are continuing with other posts. We will let you people know when we will start the apache posting once again.
Thanks,
Admin
http://www.linuxnix.com
How To Access Web Server Through IP Address?
0 comments 12/25/2010 10:12:00 AM Posted by Surendra Kumar AnneLabels: Advanced Servers, DNS Servers, How-To's
How To Install Apache Server Source Package On Linux Server?
0 comments 12/24/2010 10:12:00 AM Posted by Surendra Kumar AnneLabels: Advanced Servers, DNS Servers
How To Install Apache Server On Ubuntu Machine?
0 comments 12/22/2010 09:30:00 PM Posted by Surendra Kumar AnneLabels: Advanced Servers, DNS Servers, Ubuntu
How to install an Apache Server on ubuntu machine(A debian system)?
Step1 : Check if the package is installed or not
#dpkg -l | grep apache
Step2 : Install the package if you did not get any output
#apt-get install apache*
Step3 : Now start the apache service
#service apache2 restart
#chkconfig apache2 on
Step5 : Check if the web server is running or not by accessing local host
#elinks localhost
Or
Here is the screen shot showing the test web page when apache is installed
Apache Server Installation On Redhat Linux
0 comments 12/19/2010 06:51:00 PM Posted by Surendra Kumar AnneLabels: Advanced Servers, Apache Server, DNS Servers
How we can install Apache web server on Redhat linux?
Ans : The simplest way to install Apache on redhat machine is to use yum command.
Follow below steps :
To install and check if the web server is running with default test page.
Step1: Check if the package is installed or not
#rpm -qa | grep httpd
Step2 : Install the package if you did not get any output
#yum install httpd
Step3 : Now start the apache service
#service httpd restart
Step4 : On the service at booting time
#chkconfig httpd on
Step5 : Check if the web server is running or not by accessing local host
#elinks localhost
or
Access localhost from browser
When you access the server through browser red-hat Linux will present you with a test page as shown below
Many How to's Related To Apache Web Server Is Going To Come On linuxnix.com
1 comments 12/14/2010 04:27:00 PM Posted by Surendra Kumar AnneLabels: Advanced Servers, Apache, Basic-Servers, Servers, Web Servers
Hi all,
From today on words we are planing to provide in depth knowledge base on many Howto's related to Apache web server. Some of the howto's which we are going to present are as follows.
2. Apache installation[Redhat/Debian]
3. Apache installation through source
4. Apache ip based web access
5. Apache host based web access
5a.Hosting multiple SSL websites on single host
7. Apache SSL based web access
8. Apache integration with AD(Active Directory) authentication
12.Apache fine tuning
How To Configure And Install Sendmail In Linux?
0 comments 12/13/2010 11:55:00 PM Posted by Surendra Kumar AnneLabels: How-To's, Mail Servers
Send mail is one of the old and widely used mail delivery agent/Mail system.
How To Upgrade An Installed Source Package?
0 comments 12/12/2010 10:18:00 PM Posted by Surendra Kumar AnneLabels: How-To's, Package-Mgmt
I have installed a package from source, now I want to upgrade the older version to new version which is available.
How can I upgrade already installed source package on my system?
Ans : This question arises to all the admins who do installation from source package. To upgrade a source package follow the same steps to you have did at the time of first installation through source. Package as shown below..
Step1: unpack the new source code in tmp directory.
#cd /tmp
#tar xvfz packagname.tar.gz
#cd packagename
#./configure –prefix=/path/to/old/installation
#make
#make check
#make install
Step2 : Now check what is the version if its updated to new version for example
If you install squid then execute below command
#squid -v
Troubleshooting Steps Of Tomcat Server
0 comments 12/10/2010 09:25:00 PM Posted by Meghana M BhombhoreLabels: Tomcat, Troubleshooting
Troubleshooting Steps to check whether the Tomcat server is runing or not?
Step1 : Check ps command output
#ps -ef | grep tomcat
Step2 : Check with nmap whether port 8080 is opened or not?
#nmap localhost
Step3 : Check with telnet command as shown in below by executing GET / HTTP/1.0 Host: localhost command once logged in to server at 8080 port.
#telnet localhost 8080 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. GET / HTTP/1.0 Host: localhost
This command should output hte test tomcat page.
Enjoy the troubleshooting:)
How To Install Apache Tomcat on Linux(Redhat/Ubuntu)?
1 comments 12/10/2010 09:08:00 PM Posted by Meghana M BhombhoreLabels: Advanced Servers, How-To's
How to install Apache tomcat on Linux(Redhat/Ubuntu)?
What is Apache tomcat?
Ans : ApacheTomcat is an open source web application server which supports J2ee Servlets, JavaServer, Pages(JSP) and API's. Tomcat should not be confused with Apache web server which an HTTP web server.
---Wikipedia.
Some terminology about Apache tomcat.
Apache Tomcat can be configured by editing server.xml file. Those who knows apache web server. This server.xml can be taken as synonimas to httpd.conf file.
Servlet is defined as a way add dynamic content to a Web server using the Java platform. And a servlet container is a compiled, executable program. The servlet container name is tomcat is catalina.
Pre requists for Apache tomcat are
1. java
2. JDK
Step by step for installing Apache tomcat
Note : Avoide installing tomcat from reposatories, always prefer to install it from source downloaded from apache site.
Step1 : Install all the prequistes
Redhat :
#yum install java
Ubuntu :
#apt-get install java
Step2 : Download tomcat source package and uncompress it.
Redhat/Ubuntu
#cd /opt
#wget http://www.trieuvan.com/apache/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz
#tar xvfz apache-tomcat-6.0.29.tar.gz
Step3 : Setup the paths for Catalina and others.
Setting catalina paths
Redhat/ubuntu
CATALINA_HOME=/opt/apache-tomcat-6.0.29
CATALINA_BASE=/opt/apache-tomcat-6.0.29
Setting java paths
Check what java versions are installed in your system
#update-alternatives --config java
This command will display which is default java version used by your machine.
Example output :
# update-alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
1
/usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2
/usr/lib/jvm/jre-1.6.0-openjdk/bin/java
Enter to keep the current selection[+], or type selection number:
If you see above the default java version is 1.6 so set the path to /usr/lib/jvm/jre-1.6.0-openjdk
JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk
JDK_HOMe=$JAVA_HOME
Step4 : Now start tomcat server
#/opt/apache-tomcat-6.0.29/bin/sartup.sh
Sample output.
Using CATALINA_BASE: /opt/apache-tomcat-5.5.26
Using CATALINA_HOME: /opt/apache-tomcat-5.5.26
Using CATALINA_TMPDIR: /opt/apache-tomcat-5.5.26/temp
Using JRE_HOME:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/
Step5 : By default Apache Tomcat will be hosted onlocalhost : 8080 port by default. So try to access the site with web browser
http://localhost:8080
or
http://localhost:8080
or
http://systemname:8080
Stay tuned to other posts about troubleshooting tomcat installation.
How To Set Java Path In Linux?
0 comments 12/10/2010 08:58:00 PM Posted by Meghana M BhombhoreLabels: How-To's
How to set java path in Linux?
Ans : Check where java is installed by using below command
#update-alternatives --config java
This command will show installed java packages in your machine.
Example output :
# update-alternatives --config java
There are 2 programs which provide 'java'.
Selection ----------------------------------------------- 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java *+ 2
From above you can see java version in use it. 1.6.
Setting java path(In Temporary way)
#JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk #export $JAVA_HOME
Setting java path (In Permanent way)
Edit ~/.bashrc and place below two lines in that file and save the file.
Vi ~/.bashrc
JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk export $JAVA_HOME
Now save the file and exit, then logout and login to make those changes to reflect.
Command
/usr/lib/jvm/jre-1.6.0-openjdk/bin/java
How to Set Priority for a service at booting of Linux
0 comments 12/10/2010 07:25:00 AM Posted by Surendra Kumar AnneLabels: Booting, Hacks
This is possible with renaming of the scripts located in running configuration(rc) folders. As you people know that
all the startup scripts are stored in rc1.d, rc2.d etc... each of these folders corresponding to scripts to be started in that run-level
for example.. if you want to start some script in runlevel 1 they are kept in /etc/rc1.d folder so that when Linux is booting up these scripts are executed at runlevel 1.
So how can i set priority to my scripts/services?
Just go in to one of the rc folders, you can see all the scripts which are started in that runlevel..
if you observe those scripts, these scripts will start with different numbers. here are some for your reference.
K09apache2
K15pulseaudio
K20acpi-support
K20kerneloops
K20saned
K20speech-dispatcher
K20virtualbox-ose
K20virtualbox-ose-guest-utils
K74bluetooth
README
S30killprocs
S70dns-clean
S70pppd-dns
S90single
so the script(services) start sequence will be like K09apache2 then K15pulseaudio so on.. so if you want to give priority to your service just name with less number.. as shown below..
K09apache2
K01pulseaudio
K20acpi-support
K20kerneloops
K20saned
K20speech-dispatcher
K20virtualbox-ose
K20virtualbox-ose-guest-utils
K74bluetooth
README
S30killprocs
S70dns-clean
S70pppd-dns
S90single
So now the first script/service which start in this list is K01pulseaudio
Please comment your thoughts on this..
How To Change The Java Version In Linux?
0 comments 12/10/2010 01:16:00 AM Posted by Surendra Kumar AnneLabels: How-To's
This post is regarding how to change java version if multiple java versions are installed?
Check what are the java versions are installed on your system
#java -version
Example output
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode)
So now I want to change the one version to another version.
If more than one java is installed. Execute below command to see how many java versions are installed? And what is the default version (Default version will be indicated by *)
#update-alternatives --config java
This command will display which is default java version used by your machine..
Example output.
# update-alternatives --config java
There are 2 programs which provided 'java'.
Selection Command
-----------------------------------------------
1. /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
Enter to keep the current selection[+], or type selection number:
So if you want to change the java version from 1.6 (now 2 is default version as shown) to 1.4 just press “1” with out quotes.
Please let us know if you know other way of changing java version.
How To Enable Verbose Mode For SSH Logins?
0 comments 12/09/2010 06:43:00 AM Posted by Surendra Kumar AnneLabels: How-To's, SSH, Troubleshooting
How we can login to remote server through ssh?
#ssh user@servername
or
#ssh -l user servername
or
#ssh ip-add
So when you will execute the above command you will get the password prompt. But if you want to see what will happen when you execute ssh command you have to enable verbose or debugging mode. To do this we have to apply -v option at the time of login as shown in below example.
#ssh -v surendra@ftp2.linuxnix.com
root@krishna:/home/surendra# ssh -v surendra_a@ftp2.linuxnix.com
OpenSSH_5.5p1 Debian-4ubuntu4, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to ftp2.linuxnix.com [92.32.56.78] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.0
debug1: match: OpenSSH_4.0 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-4ubuntu4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'ftp2.linuxnix.com' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
surendra_a@ftp2.linuxnix.com's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_IN
Last login: Thu Dec 9 20:02:47 2010 from 1.23.6.79
After logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to ftp2.linuxnix.com closed.
Transferred: sent 2072, received 2072 bytes, in 27.7 seconds
Bytes per second: sent 74.8, received 74.8
debug1: Exit status 0
So if you want more verboseness you can use up to 3rd level(-vvv) as shown below
#ssh -vvv surendra_a@ftp2.linuxnix.com