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

Tuesday, February 8, 2011

lpr: Too many active jobs.

This morning the strange error happen to my network printer with the messages (lpr: Too many active jobs.).
ok, to solve this run:

#sudo rm -r /var/spool/cups/
#service cups restart

thankq! http://www.linuxquestions.org/questions/linux-server-73/how-to-clear-cups-server-564866/

Thursday, December 16, 2010

How to Install Zimbra on RedHat Enterprise 5

1-Disable your firewall and SELinux
2-stop service sendmail and httpd(if you had installed these services)
#service sendmail stop
#service httpd stop
#chkconfig --level 2345 sendmail off
#chkconfig --level 2345 httpd off
3-configure the hosts file
#vi /etc/hosts (enter text below)

       127.0.0.1 localhost.localdomain localhost
       192.168.74.106 mailServer.not-late.com mailserver

4- configure resolv.conf file
#vi /etc/resolv.conf (enter text below, then save and exit)

nameserver 192.168.74.106

5- configure DNS or named.conf file (see this link: http://not-late.blogspot.com/2010/11/dns-bind-on-red-hat-linux-enterprise-5.html) make sure you can start and stop your named service
6- add record to named.conf file
#vi /etc/named.conf (enter text below at the bottom of your named file, then save and exit)
        zone "not-late.com" IN {
                type master;
                file "not-late.fz.db";
        };
        zone "74.168.192.in-addr.arpa" IN {
               type master;
               file "not-late.rev.db";
       };

7- create database zone file in /var/named/
7.a- create forward zone file
#vi /var/named/not-late.fz.db (enter text below, then save and exit)
$TTL 86400   @ IN SOA mailserver.not-late.com.    root.not-late.com. (
                                              42 ; serial (d. adams)
                                             3H ; refresh
                                          15M ; retry
                                            1W ; expiry
                                           1D ) ; minimum
          IN NS not-late.com.
          IN A 192.168.74.106
          IN MX 10 not-late.com.

7.b create reverse zone file
#vi /var/named/not-late.rev.db (enter text below, then save and exit)

$TTL 86400 @ IN SOA mailserver.not-late.com.     root.localhost. (
                                                         1997022700 ; Serial
                                                         28800 ; Refresh
                                                         14400 ; Retry
                                                         3600000 ; Expire
                                                         86400 ) ; Minimum
           IN NS not-late.com.
    106 IN PTR not-late.com.

8-Restart named service ( the result must be OK)
#service named restart

9- Testing your DNS to make sure it works
#dig not-late.com mx (Answer must be 1)

     ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> not-late.com mx
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18904
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

    ;; QUESTION SECTION:
    ;not-late.com. IN MX

    ;; ANSWER SECTION:
      not-late.com. 86400 IN MX 10 not-late.com.

    ;; AUTHORITY SECTION:
      not-late.com. 86400 IN NS not-late.com.

    ;; ADDITIONAL SECTION:
     not-late.com. 86400 IN A 192.168.74.107

    ;; Query time: 32 msec
    ;; SERVER: 192.168.74.100#53(192.168.74.100)
    ;; WHEN: Tue Dec 14 22:08:03 2010
    ;; MSG SIZE rcvd: 76

10-Testing Reverse DNS
#host 192.168.74.106 (result look similar below)

106.74.168.192.in-addr.arpa domain name pointer not-late.com.

11- Download Zimbra from zimbra web site:

12- unpacking the file you just downloaded to wherever you want
#tar -xzvf zcs-6.0.8_GA_2661.RHEL5_64.20100820052503.tgz -C /tmp
13-From within the /tmp directory there is a file called install.sh. This is the file that will launch the installer for Zimbra.
#./install.sh
14- Follow the installation instruction will go through to the end of setup.

Saturday, November 20, 2010

DNS Bind on Red Hat Linux Enterprise 5

#yum -y install bind-9.x.x.x
#cd /usr/share/doc/bind-9.3.6/sample/etc
#cp -v * /etc/
#cd /usr/share/doc/bind-9.3.6/sample/var/named
#cp -rv * /var/named/
#service named start (result will be FAILED)
#vim /etc/named.conf (Please delete from line "// All BIND 9 zones are in a "view", which allow different zones to be served") And your named.conf will look like below:


//
// Sample named.conf BIND DNS server 'named' configuration file
// for the Red Hat BIND distribution.
//
// See the BIND Administrator's Reference Manual (ARM) for details, in:
//   file:///usr/share/doc/bind-*/arm/Bv9ARM.html
// Also see the BIND Configuration GUI : /usr/bin/system-config-bind and
// its manual.
//
options
{
        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;
        // query-source-v6 port 53;

        // Put files that named is allowed to write in the data/ directory:
        directory "/var/named"; // the default
        dump-file               "data/cache_dump.db";
        statistics-file         "data/named_stats.txt";
        memstatistics-file      "data/named_mem_stats.txt";

};
logging
{
/*      If you want to enable debugging, eg. using the 'rndc trace' command,
 *      named will try to write the 'named.run' file in the $directory (/var/named).
 *      By default, SELinux policy does not allow named to modify the /var/named directory,
 *      so put the default debug log file in data/ :
 */
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
#service named start     ( [ OK ] )

Saturday, November 6, 2010

Configuration Yum on Red Hat Linux Enterprise 5

Installing and running web server (httpd)
Checking web  server service
# ps  ax  |grep   http
If the httpd service is not running please install
#yum -y install httpd*
Starting web  server service
#service  httpd start
Build the repository
# mkdir  /var/www/html/yum
Getting packages to repository
Mounting CD/DVD RHEL
Copying RPM packages from CD/DVD to yum repository
#cp  -v  /media/RHEL/RPMS/*   /var/www/html/yum
installing createrepo
Installing createrepo package
Checking its package
# rpm  -qa  |grep createrepo
If doesn’t have : install # rpm –ivh  createrepo.x.x.x.rpm
Running createrepo tool to repository directory
Createing meta-data to repository directory
# createrepo  /var/www/html/yum
You can see:
-rw-r--r-- 1 root root 2227275 2010-02-18 11:51 filelists.xml.gz
-rw-r--r-- 1 root root 6487453 2010-02-18 11:51 other.xml.gz
-rw-r--r-- 1 root root 747714 2010-02-18 11:51 primary.xml.gz
-rw-r--r-- 1 root root 951 2010-02-18 11:51 repomd.xml

Configure yum client
Editing file: /etc/yum.conf  Or  /etc/yum.repos.d/*
[base-local]
name=RHEL $releasever - $basearch failover
method=priority
baseurl=http://192.168.74.100/yum/
enabled=1
gpgcheck=0

Friday, October 29, 2010

Samba File Server

Setup Samba Sharing Configuration

1- Install all samba package
#rpm -ihv --nodeps samba*
2- Add user
#useradd user1
#useradd user2
3- add samba user
#smbpasswd –a user1
#smbpasswd –a user2
4- Create Shared Folder
#mkdir –p /FileServer/Public
#cd /FileServer
#chmod o-rx Public
#chmod 750 Public
#chown userName:GroupName Public
5- Samba configuration File
#vi /etc/samba/smb.conf
[Public]
comment=for User Group
path=/FileServer/Public
writeable=no
readonly=yes
#valid user=user1,user2,user3,user4,user5
Write list =@GroupName
6- Turn on Samba Services
#chkconfig smb on
7- Start/Restart Samba Service
#service smb start/restart
8- End (and try to access from your os client)