Thursday 29 December 2016

Block Email Zimbra 8.7

To block email from a particular email on Zimbra 8.7 + follow below instructions:-

Login to server as zimbra user and edit file /opt/zimbra/data/spamassassin/localrules/local.cf


enter blacklist_from EMAILTOBEBLOCKED


save the file and exit


restart Amavis Daemon to implement changes


zmamavisdctl restart

Thursday 14 July 2016

How to Install Mysql from source code in Centos 6

Download the latest and stable version of mysql from http://www.mysql.com/ and run the following commands (make sure that you have the super user privileges and should have necessary compilers available in the system)

# yum install g++ gcc-c++ ncurses-devel wget -y
                                        or
# yum group install "Development Tools"

# cd /usr/local/src/                       
#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.51.tar.gz/from/http://mysql.he.net/ 
# tar -zxvf index.html
# cd mysql-5.1.51/
# ./configure --prefix=/usr/local/mysql
# make && make install
# useradd mysql
# chgrp -R mysql /usr/local/mysql/
# cp support-files/my-medium.cnf /etc/my.cnf
# cp support-files/mysql.server /etc/init.d/mysql
# ./scripts/mysql_install_db --user=mysql
# chown mysql.mysql /usr/local/mysql/var/ -R
# chkconfig --add mysql
# chkconfig --list |grep on
# cd support-files/
# cp mysql.server /etc/rc.d/init.d/mysql
# chmod  777 /etc/rc.d/init.d/mysql
# /usr/local/mysql/bin/mysqladmin -u root password
# /etc/rc.d/init.d/mysql start
# /etc/rc.d/init.d/mysql status                            {For check server is running or not}
# ./bin/mysql_secure_installation
# /etc/rc.d/init.d/mysql restart
# /usr/local/mysql/bin/mysql -u root -p






Monday 22 February 2016

How to Install PHP with source code in Centos 6

Download the latest and stable version of php from http://www.php.net and run the following commands (make sure that you have the super user privileges and should have necessary compilers available in the system)

# yum install bzip2-devel curl-devel libjpeg-devel libpng-devel freetype-devel libc-client-devel.i686 libc-client-devel libmcrypt-devel -y
# wget -O php-5.6.6.tar.gz http://pl1.php.net/get/php-5.6.6.tar.gz/from/this/mirror
# tar -zxvf php-5.6.6.tar.gz
# cd php-5.6.6
# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# yum install libxml2-devel libmcrypt libmcrypt-devel -y
# ./configure --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-imap --with-imap-ssl --with-kerberos --enable-mbstring --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-zlib-dir --with-regex --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-soap --enable-sockets --with-xmlrpc --enable-zip --with-zlib --enable-inline-optimization --enable-mbregex --enable-opcache --enable-fpm --prefix=/usr/local/php

# make && make test && make install
# cp php.ini-development /usr/local/lib/php.ini

Write on apache configure file in the end.

<FilesMatch "\.ph(p[2-6]?|tml)$">
    SetHandler application/x-httpd-php
</FilesMatch>

Write this file in document root.
# vi test.php                                                            {Test file for php }

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>

Save and exit.

Restart apache

Once you have successfully completed the above steps create a php test file and try browsing it in browser.

How to install Apache with source code installation in Centos 6

How to install Apache with source code installation in Centos 7


Run the following commands (make sure that you have the super user privileges and should have necessary compilers available in the system)

# yum install wget gcc pcre-devel openssl-devel

# cd /usr/local/src/

Download latest version of Apache from http://www.apache.org/

# wget http://ftp.piotrkosoft.net/pub/mirrors/ftp.apache.org//httpd/httpd-2.4.20.tar.gz
# wget http://ftp.ps.pl/pub/apache//apr/apr-1.5.2.tar.gz
# wget http://ftp.ps.pl/pub/apache//apr/apr-util-1.5.4.tar.gz
# tar -zxvf httpd-2.4.20.tar.gz
# tar -zxvf apr-util-1.5.4.tar.gz
tar -zxvf apr-1.5.2.tar.gz
# cp -r apr-1.5.2 httpd-2.4.20/srclib/apr
# cp -r apr-util-1.5.4 httpd-2.4.20/srclib/apr-util
# cd httpd-2.4.20
# ./configure --enable-ssl --enable-so --with-included-apr --with-mpm=event --with-mysql=/usr/local/mysql/
# make
# make install
# groupadd www
# useradd -G www -r apache
# chown -R apache:www /usr/local/apache2/
# mkdir /var/www
# chown -R apache:www /var/www

# chmod -R 775 /var/www
# cd /usr/local/apache2/conf
# vi httpd.conf

Make sure that ServerRoot is the same as location where You installed apache.
ServerRoot "/usr/local/apache2"

Port by default is set to 80. We will change that later on when we will add reversed proxy
Listen 80

After that set user and group we created previously.
# user apache
# group www

Set ServerName to whatever You want, it will prevent warning when apache will start
ServerName apache

Change

<Directory />
    AllowOverride none
    Require all denied

</Directory>

To

<Directory "/var/www">
    Options -Indexes
    AllowOverride none
    Require all denied
</Directory>

Next is DocumentRoot, set it to /var/www

DocumentRoot "/var/www"

<Directory "/var/www">

In <Driectory “/var/www” block set Options to:

Options -Indexes -FollowSymLinks -Includes
AllowOverride All

Save the file and exit!


Now it’s finally the time to run httpd server. Procedure is easy, but it can be even easier.

# cd /usr/local/apache2/bin
# ./apachectl start
# ps aux | grep apache | grep -v apache
# chmod +x /etc/init.d/httpd

Sunday 23 November 2014

TOPIC 1 ACCESSING THE COMMAND LINE IN RHEL 7

A command line is a text-based interface which can be used to input to a system. Linux command line is provided by a program called the shell.

When you open shell prompt the default prompt ends with a $ character.

[redhat@desktop -]$

redhat - user name, $ is represent that user is not a root. The $ is replaced by #  if the shell is running as the superuser root. that some thing helps to avoid accidents and mistakes in privileged account.

[ root@desktop -]#

============================================
NOTE

Bash is similar in concept to the command line versions of Microsoft Windows cmd.exe

============================================

Virtual consoles 

When we click 

ctrl + alt + f1 

then open GUI with terminal (windows terminal) and,

ctrl + alt + f2

then open virtual terminal. and we are open 6 terminal by using functions key 


Shell basics 

Command entered at the shell prompt have three basic parts:
  • Command to run
  • Options to adjust the behavior of the command
  • Arguments which are typing targets of the command
eg.;-

usermod -L rahul

usermod - command
-L - options
rahul - argument



COMMANDS

# ctrl + alt + l (logout)

#  shutdown   
# halt             (this 3 commands is use for shutdown system) 
# init 0    
# poweroff -f
# shutdown -h <time in minutes>

# date 
# date +%R
# date +%x

# passwd (If change password)

# history 


Red Hat Enterprise Linux 7 Training.....




1st thing 


Q. What is Red Hat Enterprise Linux?


Red Hat Enterprise Linux (RHEL) is a Linux distribution developed by Red Hat. and targeted toward the commercial market. Red Hat Enterprise Linux is released in server versions for x86, x86-64, Itanium, PowerPC and IBM System z, and desktop versions for x86 and x86-64.



2nd Thing, Linux first released on 5 October 1991 by Linus Torvalds



Linux ? 


Some point about a linux 



  • 1st open source :- This is the primary site for the Linux kernel source. The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems. It is one of the most prominent examples of free and open source software.    
  • Secured :-          
  • File based program
  • Case sensitive
  • Hardware flexibility

Installation of  RHEL 7

1. Hardware requirements....

Dual-core Intel 64 or AMD64 CPUQuad-core or multiple dual-core Intel 64 or AMD64 CPU
4GB RAM (available, not including OS)16GB RAM
25GB writable disk space50GB writable disk space
1 network interface card (NIC) with bandwidth of at least 1Gbps
Red Hat® Enterprise Linux® Server 6 x86_64 subscription (not included)


2. System boot with RHEL 7 iso and then select Install Red Hat Enterprise Linux 7.0.






then...















In Installation destination you have to create partitions 


/ = 5 GB 

/boot = 2 GB
/home = 2 GB
swap = 2 x physical memory

its is minimum capacity for RHEL 7 you have to give this for your requirements

and after you check on your installation settings hit on Begin Installation to proceed further with system installation. 

3. Set root password


4. create user and password


and wait for the installation process to finish.


After the installation finishes you should reboot your system.






Friday 9 August 2013

Sketching lesson...

HI friends....


Today I will tell you about sketching


and this video you help to draw a real eye