Saturday, 12 January 2013

How to hide your IP address in rhel 6.X / Centos 6.X


How to hide your IP address in rhel 6.X / Centos 6.X



Tor doesn't work as root user so login as a user and extract the tar file and keep it in any directory say /home/ranjith/Downloads

[ranjith@vellore Downloads]$ cd tor-browser_en-US/
[ranjith@vellore tor-browser_en-US]$ ls
App Data Docs Lib start-tor-browser tmp

[ranjith@vellore tor-browser_en-US]$ ./start-tor-browser

Launching Tor Browser Bundle for Linux in /home/ranjith/Downloads/tor-browser_en-US
Qt: Session management error: None of the authentication protocols specified are supported

If your network uses proxy and password click settings > Network and enter your proxy details stop tor and start tor. Now you can connect to internet safely by masking your IP address. Enjoy browsing.

Wednesday, 2 January 2013

How to configure MySQL Master-Slave Replication in RHEL 6.X/Centos 6.X

How to configure MySQL Master-Slave Replication in RHEL 6.X/Centos 6.X
  1. Working Linux OS like CentOS 6.3, RedHat 6.3 or Fedora 17
  2. Master and Slave are CentOS 6.3 Linux Servers.
  3. Master IP Address is: 10.65.62.30
  4. Slave IP Address is: 10.66.191.232
  5. Master and Slave are on the same LAN network.
  6. Master and Slave has MySQL version installed.
  7. Master allow remote MySQL connections on port 3306.
Master side (10.65.62.30):

[root@station1 Desktop]# yum install -y mysql*
[root@station1 Desktop]# service mysqld start
[root@station1 Desktop]# mysqladmin -u root password password ------> setting password for the root user
[root@station1 Desktop]# mysql -u root -ppassword ------> login
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> DELETE FROM mysql.user WHERE user = ''; ----> to delete anonymous users.
mysql> flush privileges;
mysql> create database Ranjith;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| Ranjith |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> use Ranjith;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> create table contacts ( `first_name` char(20), `last_name` char(20), `mob_no` char(20), `email_id` char(30), PRIMARY KEY (`email_id`));
mysql> show tables;
+-------------------+
| Tables_in_Ranjith |
+-------------------+
| contacts |
+-------------------+
1 row in set (0.00 sec)
mysql> describe contacts;
+------------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+----------+------+-----+---------+-------+
| first_name | char(20) | YES | | NULL | |
| last_name | char(20) | YES | | NULL | |
| mob_no | char(20) | YES | | NULL | |
| email_id | char(30) | NO | PRI | | |
+------------+----------+------+-----+---------+-------+
4 rows in set (0.00 sec)
mysql> INSERT INTO contacts (first_name,last_name,mob_no,email_id) VALUES ('Ranjith','Pandurangan','+918056316316','upload.vellore@licindia.com');
mysql> select * from contacts;
+------------+-------------+---------------+----------------------+
| first_name | last_name | mob_no | email_id |
+------------+-------------+---------------+----------------------+
| Ranjith | Pandurangan | +918056316316 | upload.vellore@licindia.com |
+------------+-------------+---------------+----------------------+
2 rows in set (0.00 sec)

mysql>quit;