Configuring NIS under Red Hat Linux

The following describes a procedure to set up NIS network name service under Red Hat Linux. This is geared toward a small installation with only one domain. However, it should be fairly evident how to add more NIS domains. The NIS domain name has nothing to do with any DNS naming convention being used.
In these examples, the following conventions are used:
NIS domain: “internal”
Code or configuration file data: colored
Root prompt on NIS master server: master#
Root prompt on NIS client host: client#

Setting up a NIS master server:

Required packages: yp-tools ypbind ypserv portmap
Set up “time” service to run via inetd/xinetd, or configure xntpd, or otherwise make sure the host’s clock is synchronized.
Edit /etc/yp.conf:

domain internal server ip.of.nis.server

Edit /etc/ypserv.conf:

dns: no
files: 30
xfr_check_port: yes
* : * : shadow.byname : port
* : * : passwd.adjunct.byname : port

Edit /etc/sysconfig/network:

NISDOMAIN="internal"

Set NIS domain name:

master# domainname internal
master# ypdomainname internal

Create file /var/yp/securenets:

host 127.0.0.1
255.255.255.0   10.0.0.0

Make sure the “portmap” service is running:

master# service portmap start
master# chkconfig portmap on

Portmap will need a rule in /etc/hosts.allow to allow access from localhost and any hosts that need to access NIS.
Start ypserv service:

master# service ypserv start

Check that it’s listening:

master# rpcinfo -u localhost ypserv

You should see:

program 100004 version 1 ready and waiting
program 100004 version 2 ready and waiting

Initialize the NIS maps:

master# /usr/lib/yp/ypinit -m

Specify local hostname, Ctrl-D, y, let finish.
Start up ypbind, yppasswdd, ypxfrd:

master# service ypbind start
master# service yppasswdd start
master# service ypxfrd start

Set YP services to run on boot-up:

master# chkconfig ypserv on
master# chkconfig ypbind on
master# chkconfig yppasswdd on
master# chkconfig ypxfrd on

NIS client host setup

Required packages: yp-tools ypbind portmap
Edit /etc/sysconfig/network:

NISDOMAIN=internal

Edit /etc/yp.conf:

domain internal server ip.of.master.server

Edit /etc/hosts:

ip.of.master.server    hostname.domain hostname

Set NIS domain-name:

client# domainname internal
client# ypdomainname internal

Edit /etc/nsswitch.conf:

passwd:     files nis
shadow:     files nis
group:      files nis

Make sure the portmap service is running:

client# service portmap start
client# chkconfig portmap on

The /etc/hosts.allow file will need rules allowing access from localhost and the NIS master server.
Start ypbind service:

client# service ypbind start
client# chkconfig ypbind on

Test it out:

client# rpcinfo -u localhost ypbind
client# ypcat passwd
Reference

Difference between IMAP and POP3

IMAP stands for “Internet Message Access Protocol”. It’s a fancy name for a protocol used by email programs like Outlook, Thunderbird, and others to access your email.
IMAP is an alternative to POP3 (Post Office Protocol 3), works in some fundamentally different ways, and makes a few fundamentally different assumptions.
IMAP and POP are two different protocols. There are many differences between these two. The main difference is that IMAP(Internet Messaged Access Protocol) always syncs with mail server so that any changes you make in your mail client (Microsoft Outlook, Thunderbird) will instantly appear on your webmail inbox.
On the other hand, in POP(Post Office Protocol), your mail client account and mail server are not synced. It means whatever changes you make to your email account in the mail client will not be transferred to the webmail inbox.
In simple terms, if you are using IMAP and mark a mail as read, it gets marked as read in your web based inbox too (because the changes are happening on the server). However, this won’t be the case if you are using POP, because the mails are downloaded to your PC and the changes won’t reflect on the server.

How to increase php memory limit

Here you have 5 different methods for setting php memory limit. If you have any difficulties with php memory limit during the installation of  WordPress, lime survey, drupal, joomla or oSclass you can use these methods for solving the issue.
It will work on the all the hosting service providers like godaddy hostgator..etc
1. Set the php value in the index.php file of installation

ini_set('memory_limit', '256M');

2. Create php.ini file in the home directory and set the below values

memory_limit = 128M
<IfModule mod_php5.c>
 php_value memory_limit 64M
 </IfModule>

3. Create .htaccess file in the home directory or copy the below codes to .htaccess file

upload_max_filesize = 1000M
 post_max_size = 2000M
 memory_limit = 3000M
 file_uploads = On
 max_execution_time = 180

4. setting up the .user.ini in your website root directory.

memory_limit = 128M

5. Setting up the memory limit in the php script.

ini_set('memory_limit', '256M');