Tuesday, November 20, 2012

How to Backup a MySQL Database

Backup a Single and All the MysQl Databases.

Single database:
mysqldump -u root -pmypasswd vishalvyas > /opt/vishalvyas.sql

Restore:
mysql -uroot -pmypasswd vishalvyas < /opt/vishalvyas.sql


To back up all databases on a particular server, use the mysqldump command:
 
Backup all the databases:
mysqldump -u root -pmypasswd --all-databases > /opt/alldatabase.sql

Restore:
mysql -uroot -pmypasswd < /opt/alldatabases.sql


















Thanks,
Vishal Vyas

Wednesday, November 7, 2012

Ultimate Windows Genuine Advantage (WGA) Remover

Here is the ultimate Windows Genuine Advantage (WGA) remover for those who are getting annoyed by the Windows Genuine Advantage popping up every few second.

You did install the latest updates recommended by Windows, now you get a message saying: this copy of Windows is not genuine, you may be victim of software counterfeiting.
To disable Ultimate Windows Genuine Advantage (WGA) once for all, simply download and install WGA remover.

WGA Remover (1,0 MiB)
Windows XP WGA remover additional setup information are inserted into the packet!

 Windows 7 2011 WGA Remover and is, recommended for Windows 7!

Windows 7 WGA Service Pack 1 (SP1) pro remover 2011!

registry cleaner to fix and speed your PC!
downloadRegistry Easy

Or ..... Try This Best .....
Windows7GenuineCrackByVishalVyas


Thanks,
Vishal Vyas


Friday, November 2, 2012

Redmine on centos6

How To Install Redmine On CentOs 6 
 
 
  
 
 
Install Packages :-  
yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel 
 
Download and Install Ruby :- 
 # FTP to where you will download ruby from.
# When asked to login use user/password of anonymous/anonymous
ftp ftp.ruby-lang.org 
Name (ftp.ruby-lang.org:root): anonymous
Password: anonymous 
 
ftp> cd /pub/ruby
ftp> get ruby-1.8.7-pXXX.tar.gz
ftp> quit

# You have now downloaded ruby and need to untar it
tar zxvf ruby-1.8.7-pXXX.tar.gz

# Compile ruby
cd ruby-1.8.7-pXXX
./configure
make
make install

# Verify ruby installation
ruby -v
which ruby

# Change back into your downloads directory
cd ..

  Download and Install Gems 1.4.2

wget http://production.cf.rubygems.org/rubygems/rubygems-1.4.2.tgz
tar zxvf rubygems-1.4.2.tgz
cd rubygems-1.4.2
ruby setup.rb
gem -v
which gem
cd ..

Passenger Install :- 

gem install passenger
passenger-install-apache2-module
You can install rpm here :-
http://passenger.stealthymonkeys.com/

RHEL/CentOS 5
rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
yum install mod_passenger
RHEL/CentOS 6
rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc
yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm
yum install mod_passenger

Restart Apache Service :-

service httpd restart

Download Redmine

Download page: http://rubyforge.org/frs/?group_id=1850
wget http://rubyforge.org/frs/download.php/75597/redmine-1.3.0.tar.gz 
 
tar zxvf redmine-1.3.0.tar.gz 
 

cp -av redmine-1.3.0/* /var/www/redmine


Install Bundler :-

gem install bundler

Add the Bundler Boot and preinitializer code


Create New Gemfile and register these gems

vi /var/www/redmine/Gemfile
# file: /var/www/redmine/Gemfile
source "http://rubygems.org" 
gem "rake", "0.8.3" 
gem "rack", "1.1.0" 
gem "i18n", "0.4.2" 
gem "rubytree", "0.5.2", :require => "tree" 
gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay
gem "mysql" 
gem "coderay", "~>0.9.7" 
bundle install

Create the Redmine MySQL database

yum install mysql-server
chkconfig mysqld on
service mysqld start

start the mysql client (mysql -u root -p) and enter the following commands
create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine.* to 'redmine'@'localhost'; 

Configure /var/www/redmine/config/database.yml (rename database.yml.example)


Set the production environment (optional)

Uncomment the following line in file redmine/config/environment.rb:
ENV['RAILS_ENV'] ||= 'production'

Generate the session store

RAILS_ENV=production bundle exec rake generate_session_store

Migrate the database models

RAILS_ENV=production bundle exec rake db:migrate

Load default data (optional)

RAILS_ENV=production bundle exec rake redmine:load_default_data
Follow instructions.

Rename  files in /var/www/redmine/public/

mv dispatch.cgi.example dispatch.cgi
mv dispatch.fcgi.example dispatch.fcgi
mv dispatch.rb.example dispatch.rb

Edit .htaccess file for CGI dispatch configuration

mv htaccess.fcgi.example .htaccess
 
 
Edit httpd.conf
 
# vim /etc/httpd/httpd.cong and add this :- 
  
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
   PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.17
   PassengerRuby /usr/local/bin/ruby
   PassengerTempDir /tmp/passenger
 
<VirtualHost *:80>
      ServerName vishalvyas.com
      # !!! Be sure to point DocumentRoot to 'public'!
      DocumentRoot /home/redmine/redmine/public
      <Directory /home/redmine/redmine/public>
         # This relaxes Apache security settings.
         AllowOverride all
         # MultiViews must be turned off.
         Options -MultiViews
      </Directory>
   </VirtualHost>

  

Chown and Chmod files for read/write access for the Apache user

cd ..
chown -R apache:apache redmine-1.x
chmod -R 755 redmine-1.x 
 
Now you can use redmine . 
user:admin
Pass:admin 
 
 
 
 
 
 
 
 
 
 
 Thanks,
Vishal Vyas   

Saturday, August 25, 2012

Build A Full-Featured Mail Server

Linux Open source Mail server for CentOs 6.
By following this tutorial, you will have below major software and services ready for production use:
  • Postfix: SMTP service
  • Dovecot: POP3/POP3S, IMAP/IMAPS, Managesieve service
  • PostgreSQL: Storing mail accounts and application data
  • Apache: Web server
  • Amavisd, SpamAssassin, ClamAV: Anti-spam, anti-virus
  • Roundcube: Webmail
  • Fail2ban: scans log files (e.g. /var/log/maillog) and bans IPs that show the malicious signs -- too many password failures, seeking for exploits, etc.
  • iRedAdmin: A basic, free & open source administration panel to manage the mail accounts. Full featured edition is available for purchase here: http://www.iredmail.org/admin_panel.html.
  • Awstats: Apache and Postfix log analyzer
  • phpPgAdmin: web-based administration tool for PostgreSQL


iRedMail is:
  • A ZERO COST, fully fledged, full-featured mail server solution. All components are free and open source software.
  • An open source project, released under GPLv2, hosted on BitBucket.
With iRedMail, you can set up a full-featured, zero-cost mail server in less than 2 minutes. iRedMail works on 8 major Linux/BSD distributions:

Hostname setting: /etc/sysconfig/network
# Part of file: /etc/sysconfig/network
HOSTNAME=vishalvyas.com 
Verify the FQDN hostname with command 'hostname -f'. If you change the hostname, please reboot the server to make it work.
$ hostname -f
vishalvyas.com  

Download
iRedMail from Here Download
cd /opt
tar -xvf iRedMail-0.8.1.tar.bz2
cd iRedMail-0.8.1
bash iRedMail.sh

1) Welcome and thanks for your use:
yes
2) Specify location to store all mailboxes. Default is /var/vmail/.
3) Choose backend used to store mail accounts. We will choose PostgreSQL for example in this tutorial, please choose the one which you're familiar with. You can manage mail accounts with iRedAdmin, our web-based iRedMail admin panel. 
4) Set password of PostgreSQL/MysQl admin user. PostgreSQL/MysQl is used to store mail accounts and application data. e.g. Roundcube webmail, Amavisd-new. 
5) Add your first mail domain name: 
mail.vishalvyas.com
6) Set password of admin account of your first mail domain.
7) Choose optional components:
After these questions, iRedMail installer will ask you to confirm this installation. It will install and configure required packages automatically. Type y or Y and press Enter to confirm, type n or N and press Enter to cancel this installation.   
Important Things You Should Know After Installation
> Read file /root/iRedMail-x.y.z/iRedMail.tips first, it contains:
> URLs, usernames and passwords of web-based applications
> Location of mail serve related software configuration files
>
Some other important and/or sensitive information
Access Webmail And Other Web Applications
After installation has successfully completed, you can access web-based programs if you choose to install them. Replace your actual server name or IP address.

Webmail: http://vishalvyas.com/mail/ (or /webmail, /roundcube. HTTPS is available also.)
Admin panel: httpS://vishalvyas.com/iredadmin/
phpMyAdmin: httpS://vishalvyas.com/phpmyadmin/
Awstats: httpS://vishalvyas.com/awstats/awstats.pl?config=web (or ?config=smtp) 
 



Thanks,
Vishal Vyas                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

Tuesday, July 24, 2012

How to install NFS on Redhat Or Fedora

A Network File System (NFS) allows remote hosts to mount file systems over a network and interact with those file systems as though they are mounted locally. This enables system administrators to consolidate resources onto centralized servers on the network.


 






Server Ip : 10.10.10.1
Client  Ip : 10.10.10.2

An NFS server on linux requires 3 services to be running in order to share files:
1.portmap
2.nfslock
3.nfs

Server Settings [10.10.10.1]:

Install nfs package using yum :
# yum install nfs-utils nfs-utils-lib portmap system-config-nfs

# chkconfig portmap on
# chkconfig nfslock on
# chkconfig nfs on



Set up your /etc/exports file with details of the directory you want to share, who is allowed to share it, and permissions.
# vim /etc/exports
/home/vishal 10.10.10.2 or 10.10.10.0/255.255.255.0(rw,no_root_squash,sync)

# service nfs restart

Client Settings [10.10.10.2]:-
Install NFS packages:
# yum install nfs-utils nfs-utils-lib portmap system-config-nfs

# mkdir /home/vishal
# chmod 777 /home/vishal

Mount command:
# mount -t nfs 10.10.10.1:/home/vishal /home/vishal

Add an entry to fstab:
Paste an entry at the bottom of the file that looks something like this.

10.10.10.1:/home/vishal         /home/vishal    nfs     noauto,rw,user 0 0

Make sure you can see the running services on the server by typing:

#rpcinfo -p 10.10.10.1 [Server Ip]

Thanks,
Vishal Vyas



Saturday, June 30, 2012

Install hadoop on ubuntu 10.04 LTS

Install hadoop on ubuntu 10.04 LTS server installion.
Install ubuntu l0.04 LTS,
Update,upgrade and install ssh
#apt-get update
#apt-get upgrade
#apt-get install ssh

Install sun-6-java jdk
# See https://launchpad.net/~ferramroberto/

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ferramroberto/java

# Update the source list
$ sudo apt-get update

# Install Sun Java 6 JDK
$ sudo apt-get install sun-java6-jdk

$ sudo update-java-alternatives -s java-6-sun

Create new user hadoop and group
$ sudo addgroup hadoop 
$ sudo adduser --ingroup hadoop hduser

Generate ssh key to auto login to manager
#su - hduser
#ssh-keygen -t rsa -P ""
#cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys 

Disable ipv6 and reboot 
#vim /etc/modprobe.d/blacklist
add new line in it
blacklist ipv6  
Or
#disable ipv6 
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
You have to reboot your machine in order to make the changes take effect.
You can check whether IPv6 is enabled on your machine
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
 0 means IPv6 is enabled, a value of 1 means 
disabled (that’s what we want).

Hadoop Distributed File System (HDFS)
Image copy by javacodegeeks.com
















Download hadoop from mirror site
$ cd /usr/local 
$ sudo tar xzf hadoop-1.0.3.tar.gz 
$ sudo mv hadoop-1.0.3 hadoop 
$ sudo chown -R hduser:hadoop hadoop

Confirm java home folder
#ls -l `whereis javac`

Modify hadoop home folder hadoop-env.sh 
#vim hadoop/conf/hadoop-env.sh
uncomment export JAVA_HOME and modify it
export JAVA_HOME = /usr/lib/jvm/java-6-openjdk/

Config hadoop config file 
#vim hadoop/conf/core-site.xml
add these line into it
<property>
    <name>hadoop.tmp.dir</name>
    <value>/home/hadoop/hadoop/tmp/dir/hadoop-hadoop</value>
</property>
<property>
    <name>fs.default.name</name>
    <value>hdfs://localhost</value>
</property>

Config hadoop file with hdfs-site.xml
#vim hadoop/conf/hdfs-site.xml
add these line into it
<property>
    <name>dfs.replication</name>
    <value>1</value>
</property>

Config hadoop file with mapred-site.xml
#vim hadoop/conf/mapred-site.xml
add these line into it
<property>
    <name>mapred.job.tracker</name>
    <value>localhost:54311</value>
</property>

Formating the namenode
#hadoop/bin/hadoop namenode -format

Start cluster
#hadoop/bin/start-all.sh

Check hadoop process
#hadoop/bin/jps

Use netstat to check all service running status
#netstat -plten | grep java

Stop cluster
#hadoop/bin/stop-all.sh

Start cluster
#hadoop/bin/start-all.sh

Mkdir a folder for gutenberg and touch three files with contents
#mkdir /tmp/gutenberg
#cd /tmp/gutenberg
#vim 1.txt
#vim 2.txt
#vim 3.txt

Use hadoop fs copyFromLocal copy files to hdfs folder
#hadoop/bin/hadoop fs -copyFromLocal /tmp/gutenberg gutenber

Check hdfs folder content
#hadoop/bin/hadoop fs -ls 
#hadoop/bin/hadoop fs -ls gutenberg

Use java wordcount to calculate the words number
#hadoop/bin/hadoop jar hadoop-mapred-examples-0.21.0.jar 
wordcount gutenberg gutenberg-output


Hadoop Web Interfaces

    http://localhost:50070/ – web UI of the NameNode daemon
    http://localhost:50030/ – web UI of the JobTracker daemon
    http://localhost:50060/ – web UI of the TaskTracker daemon



Vishal Vyas

Thursday, June 21, 2012

Apache Hadoop

What Is Apache Hadoop?

The Apache Hadoop project develops open-source software for reliable, scalable, distributed computing.
The Apache Hadoop software library is a framework that allows for the distributed processing of large data sets across clusters of computers using a simple programming model. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-avaiability, the library itself is designed to detect and handle failures at the application layer, so delivering a highly-availabile service on top of a cluster of computers, each of which may be prone to failures.







Hadoop is a framework written in Java for running applications on large clusters of commodity hardware and incorporates features similar to those of the Google File System and of MapReduce. HDFS is a highly fault-tolerant distributed file system and like Hadoop designed to be deployed on low-cost hardware. It provides high throughput access to application data and is suitable for applications that have large data sets.  

 The Hadoop Distributed File System: Architecture and Design:
The Hadoop Distributed File System (HDFS) is a distributed file system designed to run on commodity hardware. It has many similarities with existing distributed file systems. However, the differences from other distributed file systems are significant. HDFS is highly fault-tolerant and is designed to be deployed on low-cost hardware. HDFS provides high throughput access to application data and is suitable for applications that have large data sets. HDFS relaxes a few POSIX requirements to enable streaming access to file system data. HDFS was originally built as infrastructure for the Apache Nutch web search engine project. HDFS is part of the Apache Hadoop project, which is part of the Apache Lucene project. 










Vishal vyas 

Wednesday, June 6, 2012

Today is Internet Expansion Day


Today Internet technology will take one big step forward by moving to a new web protocol, i.e. IPv6 that will not only be a safe approach to interhttp://www.blogger.com/blogger.g?blogID=6417358664313700940#editor/target=post;postID=2457728847953887105net but also help to develop trillions of new IP addresses.
“The Internet we’ve relied on so far has space for 2^32 addresses – about 4.3 billion,” Google says in an IPv6 Day blog post signed by its internet evangelist, Vint Cerf. “The new, larger IPv6 expands the limit to 2^128 addresses – more than 340 trillion, trillion, trillion!”

It has also been said that this development will help to make internet secure by protecting us from internet crime, warfare and terrorism. There is a security code referred to as IPSEC that would do away with anonymity on the web as reported by Prof. Alan Woodward, a professor at the University of Surrey in the UK. This code would help to catch cyber criminals.

“If IPv6 isn’t implemented you’d soon have to share a single address with multiple people or even a whole neighborhood. This tangled, constrained Internet would be unsafe and unsustainable,” added Cerf.
“Complete transition will take time. Some users may need to upgrade their home routers or possibly download updated operating system software to enable IPv6 in parallel with IPv4. If you’re interested in when you’ll get IPv6 connectivity (if you don’t have it already), we encourage you to reach out to your ISP and ask.”

Via:- Google Official Blog 

Thanks,
Vishal Vyas

How to Install docker-compose CentOS7

 Install Docker-compose on CentOs7 Linux. yum install -y epel-release yum install -y python-pip pip install --upgrade pip pip install ...