Skip to main content

Posts

Showing posts with the label Linux

How to configure a static ip in Linux using Console?

Configuring your Linux machine to run on a static IP is easy. You can do that both from Console and GUI. This tutorial is to  configure a static ip in Linux using Console. Follow following steps :    a)  Go to      # cd /etc/sysconfig/network-scripts/     Every network interface will have it’s own interface script files.          For Ex - eth0,eth1,eth2 etc.   b) Edit ifcfg-eth1 interface script file for interface eth1.       Replace the contents of the ifcfg-eth1 file with the parameters below.     # vi ifcfg-eth1      DEVICE=eth1     IPADDR=xxx.xxx.xxx.xxx     NETMASK=255.255.255.0     NETWORK=xxx.xxx.xxx.0     # If you're having problems with gated making xxx.xxx.xxx.0/8      #  a martian, you can change this to something else  ...

Automatic Startup of Apache on Linux Server?

To start Apache automatically, follow these steps: Copy Apache startup file to the startup directory: cp /usr/local/apache/bin/apachectl /etc/init.d/             In my case ‘apachectl’  was at location /usr/sbin/apachectl so I have used             cp /usr/sbin/apachectl /etc/init.d/  Edit /etc/init.d/apachectl by inserting these 2 lines in bold :            #!/bin/sh # # chkconfig: - 345 85 15 # description: Apache is a Web server used to serve HTML files and CGI. # # Copyright 2000-2005 The Apache Software Foundation or its licensors, as # applicable. . . . # Apache control script designed to allow an easy command line interface # to controlling Apache.  Written by Marc Slemko, 1997/08/23 . . . Enable httpd to startu...