Domain Redirected to localhost in Ubuntu

I was facing the issue with my currently hosted website, when I was opening my website “www.enfieldwarriors.com” then it was redirecting to localhost. So solving this issue I did this steps:
Step 1:
First Ping your site : ping www.enfieldwarriors.com
It will result the ip 127.0.0.1

Step 2:
Now check the nslookup : nslookup www.enfieldwarriors.com
it will again show the result of 127.0.0.1

Step 3:
Now open : sudo gedit /etc/resolvconf/resolv.conf.d/head
Add the entry
nameserver 8.8.8.8

Step 4:
sudo resolvconf -u

Step 5:
reboot the system

It will solve your problem

Install VLC Media Player in Backtrack 5

Steps to Install the VLC Media Player in Backtrack 5:
  • apt-get install vlc
  • hexedit /usr/bin/vlc
  • Then press tab to switch to the mode string.
  • Then press ctrl+s and type geteuid.
  • Replace geteuid to be getppid then press ctrl+x to exit!
  • Press ‘Y’ to save the changes
  • Enjoy your VLC Palyer!!!

Install Google Chrome in Backtrack 5

Steps to Install the Google Chrome Browser in Backtrack 5:

  • apt-get install chromium-browser
  • cd /usr/lib/chromium-browser
  • hexedit chromium-browser
  • Then press tab to switch to the mode string.
  • Then press ctrl+s and type geteuid.
  • Replace geteuid to be getppid then press ctrl+x to exit!
  • Press ‘Y’ to save the changes
  • Enjoy your google chrome!!!

Ubuntu Disk Clean UP Command

Ubuntu Disc cleanup Commands:
———————————–
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get install gtkorphan

System—>Administraion—>Remove orphaned packages.

To get the Size of MySQL Database

  • Open the terminal
  • Type the command cd /var/lib/mysql
  • Now run the command : du -sh *

SVN Client Commands

1). svn --help	: List Subversion commands
2). svn h : Same as Help
3). svn ? : Same as Help
4). svn help : Same as Help
5). svn add filename/directory : Add a file or directory to Subversion "Change Management" CM control.
6). svn blame filename : Show file contents with revisions annotated with author information.
7). svn praise filename : Show file contents with revisions annotated with author information.
8). svn annotate filename : Show file contents with revisions annotated with author information.
9). svn ann filename : Show file contents with revisions annotated with author information.
7). svn blame -r RevisionNumber filename
8). svn cat filename : List contents of file under Subversion control.
9). svn checkout http://node-name/repos/svn/trunk/parentPath/path : Checkout a repository.
10). svn co -r 497 http://node-name/repos/svn/trunk/path file-name : Checkout a revision
11). svn co https://..., svn://..., and svn+ssh:// : For different type of protocols
12). svn cleanup : Cleanup subversion files resulting from escaped processes and crashed.
13). svn commit filename : Commit a single file on the server.
14). svn commit --message "Message goes here." filename : Commit a single file on the server with message
15). svn commit -m "Message goes here." filename
16). svn ci filename1 filename2 filename3
17). svn ci .
18). svn copy source destination_clone : Copy file or directory tree. One can copy from one local working copy to another or to repository server URL's. The sources and destinations can be working copies or URLs.
19). svn cp source destination_clone : Same as svn copy
20). svn copy http://host/repos/project/trunk http://host/repos/project/tags/TagName-1.4.5 -m "Tag Release 1.4.5" : Tag a release. Takes a snapshot of the repository and assigns a name. This can be performed at any directory branch.
20). svn copy . http://host/repos/project/tags/TagName-1.4.5 -m "Tag Release 1.4.5" : Tag a release. Takes a snapshot of your local working copy and assigns a name. This can be performed at any directory branch.
21). svn delete filename/directory : Deletet the filename or directory from the SVN
22). svn del filename/directory : Deletet the filename or directory from the SVN
23). svn remove filename/directory : Deletet the filename or directory from the SVN
24). svn rm filename/directory : Deletet the filename or directory from the SVN
25). svn diff filename : Show file diffs between SVN repository and your file changes using GNU file diff format. Use GUI diff tools as shown below.
26). svn di filename : Show file diffs between SVN repository and your file changes using GNU file diff format. Use GUI diff tools as shown below.
27). svn diff -r rev1:rev2 filename : Show file diffs between specified versions.
28). svn diff filename > patch-file : Generate a file for difference
29). svn export directory : Export directory tree to your file system but it will not be a "working directory" under SVN control.
30). svn export -r Rev-Number http://node-name/path : Export directory tree of specified version and create local directory tree and files not under SVN control.
31). svn import local-directory http://node/repos/svn/trunk/directory : Add directory (and files in it recursively) to path in repository specified.
32). svn info filename: Display information about file or directory. (Date modified, author, revision, path in repository.)
33). svn list directory/Filename : List file or directory of files in repository. Used to browse repository before checkout. If current directory is given (svn list ./), then Subversion will list the repository URL of the current directory.
34). svn list -r RevisionNumber directory : List directory of files in repository in specified revision.
35). svn lock filename -m "comment as to why its locked or by whom" : Lock file to grant exclusive access to one and forbid all others. A commit will unlock the file (unless the "--no-unlock" option is used). A lock can be removed with the commands: svn unlock filename, svnlook and the svnadmin comands (i.e. List: svnadmin lslocks and remove: svnadmin rmlocks filename).
36). svn log : You can see the log messages for all the paths that changed in your working copy by running svn log from the top.
37). svn log foo.c : Examine all log messages for a particular file in your working copy:
38). svn log http://svn.red-bean.com/repos/test/foo.c : If you don't have a working copy handy, you can log a URL
39). svn log -v http://svn.red-bean.com/repos/test/ foo.c bar.c : The --verbose (-v) option causes svn log to include information about the paths that were changed in each displayed revision. These paths appear, one path per line of output, with action codes that indicate what type of change was made to the path.
40). svn log > log.txt : It will write all the logs to the particular file.
41). svn merge http://url/path/branch1 http://url/path/branch2 working-local-dir : Merge directory changes into your current working directory or merge a file in Subversion into the file in your working directory. If target is not specified, the identical basename or current directory is assumed. Used to incorporate changes checked in which are not accounted for in your file or to merge branches.
42). svn merge file1@revJ file2@revK
43). svn merge -r 414:411 http://url/path working-dir
44). svn merge -r 413:HEAD file-name
45). svn merge -r 414:413 http://url/path : Undo changes committed in revision 414.
46). svn merge -r 414:413 .
47). svn mkdir directory : Create a new directory under version control.
48). svn move directory1 directory2 : Rename or move a file or directory. Moves/renames file/directory in repository and in local work area.Must perform svn ci file-new-name after the move for changes to to take place in repository.
49). svn mv directory1 directory2 : Same as Move
50). svn mv file-old-name file-new-name : Same as move
51). svn revert filename : Undo changes in local work files. Throw away local changes.
52). svn status : Show status of file changes in current directory and recursively in directories below.
53). svn status -u : -u: Determines status by comparing your local repository with the server repository. Without this option, the status shown will only be the changes you have made in your local repository.
54). svn status --show-updates : Same as -u
55). svn switch http://server/new-branch : Switch your local working copy to mirror a new repository branch instead of main trunk or previous branch. Also allows you to point your repository to a new path on the server if the server path changes since you performed a check-out.
56). svn switch --relocate http://server/old-path http://server/new-path : Same as svn switch
57). svn update : Migrate all updates from Subversion repository to your local copy (recusively for all files in the current directory and all below it). If there have been updates to the svn repository since you downloaded the files, subversion will give you the opportunity to merge. Status of files will use the coding as stated above for "status". Files marked with a "C" (conflict) should be merged of reverted. If merged then one can perform a "resolve" and then a "check-in".If a file name is specified, only that file is updated.
Can also syncronize to a specified revision given by -r.
Use --ignore-externals to avoid the slow processing of externals to a potentially slow distant internet server.
58). svn update filename : Same as update
59). svn update -r458 filename : Same as update
60). svn resolved filename : Run this command after resolving merge conflicts. Next "commit" your changes.

Options:
----------
A: File to be added
C: Conflicting changes
D: File to be deleted
G: File to be merged with updates from server
M: File has been modified
R: File to be replaced
G: File to be merged
X: Resource is external to repository (svn:externals)
?: File/directory not under version control
!: File/directory missing
~: Versioned item obstructed by some item of a different kind.

Remote Server MySQL Connection

1). Open the my.cnf configuration file of MySQL of your Remote Server:
2). Comment the line :
	#bind-address		= 127.0.0.1
3). Now create a User :
	Command:
	CREATE USER 'username'@'ipaddress' IDENTIFIED BY 'password';

4). Now grant the permission to user:
	Command:
	GRANT ON *.* to 'username'@'ipaddress';

5). Now connect to your remote server mysql using the following command:
	Command:
	mysql -h ipaddress -u username -ppassword

Virtual Host Creation

<VirtualHost *:80>
    ServerName kaushalkishore.com
    DocumentRoot /var/www/kaushal_kishore
<Directory "/var/www/kaushal_kishore">
	Options Indexes FollowSymLinks MultiViews
	AllowOverride All
	Order allow,deny
	allow from all
    </Directory>
</VirtualHost>

Creating Virtual Host in Ubutnu

Steps to Create Virtual Host in Ubuntu:
—————————————-
1). Open the hosts file:
Command:
——-
sudo gedit /etc/hosts

2). Now create an entry for your virtual host:
Code:
—–
127.0.1.1    yourhost.com

3). Now open the your 000-default file:
Code:
—–
sudo gedit /etc/apache2/sites-enabled/000-default

4). And add the following line at the end of your file:
Code:
—–
<VirtualHost *:80>
ServerName yourhost.com
DocumentRoot /var/www/your_directory
<Directory /var/www/your_directory>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
</VirtualHost>

5). Restart your apache server:
Command:
——–
sudo service apache2 restart

Note: If your sites dont work then make an entry on your browser prefrences.
Steps: edit–> Prefrences –> Network –> Setting –> No Proxy For –> Make and entry for you host “yourhost.com”

SVN Importanct Commands

1). The examples used in this appendix assume that you have svn, the Subversion command-line client, and svnadmin, the administrative tool, ready to go on a Unix-like operating system.

2). Subversion stores all versioned data in a central repository. To begin, create a new repository:
Code:
———-
$ cd /var/svn
$ svnadmin create repos
$ ls repos
conf/ dav/ db/ format hooks/ locks/ README.txt

3). Your project’s tree structure should contain three top-level directories named branches, tags, and trunk. The trunk directory should contain all of your data, and the branches and tags directories should be empty:
Code:
———-
/tmp/
myproject/
branches/
tags/
trunk/
foo.c
bar.c
Makefile

4). Instead of talking of “filepath” for these virtual directories, svn uses the terminology URL. The URL must be prefixed to indicate how the repository should be accessed. That’s why we have the file:// prefix. We will see other examples later. For the moment let’s play with the virtual directory structure.

5). Creating and removing directory in SVN folder:
Code:
——-
$ svn mkdir file:///home/user/svn/foo -m “Created dumb directory”
Committed revision 1.
$ svn ls file:///home/user/svn
foo
$ svn rm file:///home/user/svn/foo -m “Removed dumb directory”
Committed revision 2.
$ svn ls file:///home/user/svn

6). Show the log of the SVN : svn log file:///home/user/svn

7). Importing the local project : $ svn import /path/to/project/ file:///home/user/svn/project/trunk -m ‘Initial import’
Note : A couple remarks. The -m flag is used to give a log message for the action.

8). Checking Out the project :
Code : $ svn checkout file:///home/user/svn/project

9). To get the info of the SVN : $ svn info

10). To get the status of the project : $ svn status or $svn st

11). To add the file : $ svn add filename/foldername

12). To commit the file : $ svn commit filename/foldername -m “Message” “OR” $ svn ci filename/foldername -m “Message”

13). Checking Out the project : svn checkout -r 4 file:///home/user/svn project “OR” svn co -r 4 file:///home/user/svn project

14). To get the copy of previous version : svn checkout -r version_numer file:///home/user/svn project
Note: The version_number is replaces by the version number which we want to import.

15). To delete the file : svn rm foldername/filename

16). To rename the file : svn rename foldername/filename new_folder_name/new_file_name

17). To get the help of SVN : svn help

19). svn revert undoes all changes under the current directory

20). svn update fetches all changes that were committed from another working directory;

21). svn diff displays the differences between the files under the current directory and the last version of these files that were committed.

22).

Powered by WordPress | Designed by: My Touch 4G
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.