Subscribe:

Ads 468x60px

Pages

Showing posts with label Installation. Show all posts
Showing posts with label Installation. Show all posts

Saturday, August 20, 2011

Windows Shared HP printer in Ubuntu / Debian Linux (using samba)


Most of the Computer Labs in Industry and Education Institutions are equipped with Windows. So Printers are also connected to Windows machines. Here a Simple howto for sharing windows shared printers for Linux users. I have test with a HP1015 printer installed in an Windows XP machine and shared. My linux box is ubuntu 9.04 ( I also tested with ubuntu 8.04, 8.10 , debian 4.0 and 5.0).

First install samba

apt-get install samba

apt-get install smbfs

apt-get install cupsys

after this installations

open a browser and type

http://localhost:631/

you will get a cups administration page

select add printer

then type Name : anything
Location : anything
description : anything

now you will get a dropdown menu

select windows printer via samba

now there is text box Device URI

type smb://shibuscomputer/1015 ( see I have a shared hp 1015 printer at computer name called shibuscomupter and share name of printer is 1015 with permision to all)

after selecting uri u will get a page for selecting make

select your printer make in my case it is HP

next page select model HP Laserjet series PCL 4/5 CUPS v 1.2 (en)
now printer installation is over

you can make a test print now
Read more...

Friday, August 19, 2011

Install spamassassin with sendmail

1. Install spamassassin on the server
# yum install spamassassin -y

2. Install required perl CPAN modules
# perl -MCPAN -e shell
cpan> install Digest::SHA1
cpan> install HTML::Parser
cpan> Install option perl modules...

3. Edit spamassassin configuration in /etc/mail/spamassassin/local.cf .
# vim /etc/mail/spamassassin/local.cf
# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)
report_safe 0

# Enable the Bayes system
use_bayes 1

# Enable Bayes auto-learning
bayes_auto_learn 1

# Enable or disable network checks
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1

# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_languages all

# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales all

4. Tell procmail to run spamc on everyone's mail. Add these to /etc/procmailrc :

DROPPRIVS=yes

:0fw
| /usr/bin/spamc

5. Restart spamassassin
# service spamassassin restart 
Read more...

Analyzing Web sites with Webalizer

The Webalizer is a fast, free web server log file analysis program. It produces highly detailed, easily configurable usage reports in HTML format, for viewing with a standard web browser.

The Webalizer is a freeware software package which interprets a web site's log file data and displays this data in HTML format. Its is a highly configurable application which can be deployed on both Windows and Unix platforms. The Webalizer can be installed on a web server to provide statistics online, or can be installed on a local hard disc to provide statistics offline. The Webalizer web log analysis software was created by Bradford L. Barrett

The Webalizer. It is intended to explain what statistics are displayed and how the data can be used to provide an insight into the activity of the web site, for the purpose of marketing analysis and future web development. This manual does not provide information on how to install or configure the Webalizer. Information regarding installation and configuration of The Webalizer  is available from the developer's web site. Download The Webalizer software here.


The Usage Statistics Overview page details:
  1. The web site to which the statistics are applicable (displayed in the title)
  2. The summary period for the statistics (for example, "last 12 months")
  3. The last time the statistics were generated (date and time stamp)
Webalizer depends upon the gd graphics library so you will need to installgd first .

Install gd package
# yum install gd

Install webalizer package
# yum install webalizer

Check whether the webalizer installed or not
# rpm -qa | webalizer

your browser to http://localhost/webalizer/ to see what you have. If you do, the only thing you’ll see is:

Not Found
The requested URL /webalizer/ was not found on this server.

# rpm  -ql  webalizer

/etc/cron.daily/00webalizer
/etc/webalizer.conf /var/www/usage


Note: The directive “outputDir    /var/www/usage ” must be changed to “outputDir  /var/www/html/webalizer”
# mkdir  /var/www/html/webalizer
# cp  /var/www/usage/*   /var/www/html/webalizer

Wait the cronjob to execute webalizer (probably the next day ) , or run it manually for now  –> webalizer .

Access with your browser locally or remotely .
# firefox http://localhost/webalizer/ &
# firefox http://192.168.1.xx/webalizer &


Read more...

Thursday, August 11, 2011

Yum local Repository , using Redhat DVD


Steps by step as followed:


Make a directory rhel5 inside the /var/ftp/pub
# cd /var/ftp/pub
# mkdir rhel5

Mount the RHEL DVD and Moved all files to this Directory /var/ftp/pub/rhel5
# mkdir /mnt/cdrom
# mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom
# cp -rvfp /mnt/cdrom/Server/ rhel5

4. Installed createrepo RPM
# rpm -ivh createrepo

5. Executed this command
# cd /rhel5/Server/
# createrepo -v .

6. Create a myown.repo file at the /etc/yum.repos.d/
# vi /etc/yum.repos.d/myown.repo
[localinfo]
name=MyOwnRepo
baseurl=file:///pub/rhel5/Server/
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
:wq

Clean the cache and list all the rpms from the yum server
# yum clean all
# yum list

Read more...

Tuesday, August 9, 2011

Generate an SSH key on Windows


How to generate an SSH key on Windows using PuTTY ?

Accessing your server using a key adds to your efforts of server security. With an SSH key, you are not required to SSH into your server, hence it offers an enhanced security for your servers. With this you can even change the default port to any of your choice and still access it normally.
Using the PuTTY SSH client, users can easily generate an SSH key on Windows machines.
You can generate an SSH key on Windows using the PuTTY SSH client. You can download PuTTY for free from any external site.
Inorder to generate a key using PuTTY, users must follow the below steps :
Step I – You must first download and start the puttygen.exe generator.
Step II – You must now select SSH2 DSA and hit the Generate option. You can find the SSH2 DSA option in the section named Parameters.
Step III - You can opt for moving the mouse pointer in random within the small screen and generate the key pairs.
Step IV – For identifying the key, you would be prompted to enter a key comment. This is usually helpful when you have multiple SSH keys active on a server.
Step V - You are required to enter the passphrase and confirm it. This passphrase would hereafter take care of protecting your key. Whenever you get connected via. SSH, you will require this unique key.
Step VI – Hit the “Save private key” for saving your private key.
Step VII – Then, hit the “Save public key“. This would save your public key.
Read more...

Monday, August 8, 2011

Reinstalling the GRUB Boot Loader


Steps to reinstall a corrupted or mistakenly deleted grub (for RedHat and CentOS systems only) using the rescue mode ::

1.        Boot the system from any boot installation medium like a RedHad #1 CD-ROM or a Flash Drive, etc.

2.      Use the linux rescue command as shown below at the installation prompt to enter the rescue environment:
 linux rescue

3.       Type the command below to mount the root partition:
# chroot /mnt/sysimage

4.      Type the command below to reinstall the GRUB boot loader, where /dev/hda is the boot partition.
# /sbin/grub-install /dev/had
Note: /dev/hda is the boot partition

5.      Go through the /boot/grub/grub.conf file once again, as additional entries may be needed for GRUB so as to make any custom changes there (like controlling another installed operating system).

6.      Finally, reboot the system
Read more...

Installing Linux Kernal-Based Virtual Machine (KVM) on CentOS 5.4 Server

Read more...

Thursday, June 23, 2011

Install and Configure Apache - IP Based - Part1

Follow below steps :
To install and check if the web server is running with default test page. 
The following requirement is:
The ip address of the system is 192.168.0.110 
Site name is www.ip.com and 
Admin mail id is root@example.com and 
The apache home directory is /var/www/html.

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: Check if the package is installed or not
#rpm -qa | grep httpd



Step4: Check configuration files
#rpm -ql httpd
or
#rpm -qc httpd


Step5 : Edit the configuration file
#vim /etc/sysconfig/httpd/conf/httpd.conf
##Modify the following things ###
ServerName <IP address>:80
DocumentRoot /var/www/html

##Define the Virtual Host##
##Copy last 7 line and paste it and Modfy as shown below##
<VirtualHost <SystemIPaddress>:80>
          ServerName www.ip.com
          ServerAdmin root@example.com
          DocumentRoot /var/www/html
          DirectoryIndex index.html
          <Directory /var/www/html>
               Order allow,deny
                Allow from all
          </Directory>
          ErrorLog logs/example.com-error_log
          AccessLog logs/example.com-access_log common
</VirtualHost>


#Save and exit
:wq



Step6 : Create the index file
# cat > /var/www/html/index.html
This is my first ip based web access site.
<ctrl+c>

Step7 : Check the syntax error of configuration file
#httpd -t

Step8 : Check the syntax error of configuration file
#vim /etc/hosts
<SystemipAddress>  www.ip.com

Step9 : On the service at booting time
#chkconfig httpd on

Step10 : Check if the web server is running or not by accessing local host
#elinks www.ip.com
or
#firefox www.ip.com
Read more...