Basic Linux Administraiton, User/Group Mgmt

to make a new user>>> useradd change password>> passwd “existing username” to create a group>> groupadd create a new user and put in the existing group>> useradd “groupname” “username” to add an existing user into an existing group >> usermod –G “groupname” “username” To check the list of permission >>> ls –l to change permission … Read more

How to comment all lines in VI editor ?

This can be done with a using a command like ‘search and replace’1.Open the file in ‘vi’ editor.2.Press Escape and type :1,$s/^/##/g3.Press Enter 1,$s/^/##/g can be broken down as1: To start from 1st line $s :To end at the last line/^ : Search for the start of the line/##:Replace with ##/g: Replace all occurrences

Basic VI Editor

Go to Command line Type vi space “file Name” To Insert Text: I Type texts what you want to type. Press Esc To save :R To quite without save :q!

Replication of MySQL Server

For Master to Slave Replication do following steps: 1. vi /etc/my.cnf and add following linesFor ServerA        server-id = 5        replicate-same-server-id = 0        auto-increment-increment = 2        auto-increment-offset = 1        relay-log = /var/lib/mysql/serverA-relay-bin        relay-log-index = /var/lib/mysql/serverA-relay-bin.index        log-error = /var/log/mysql/mysql.err        master-info-file = /var/lib/mysql/mysql-master.info        relay-log-info-file = /var/lib/mysql/serverA-relay-log.info        log-bin = /var/lib/mysql/ServerA-bin For ServerB        server-id = 6        replicate-same-server-id = 0        auto-increment-increment … Read more

Command Differents – Windows/Linux/Centos

Command’s Purpose MS-DOS Linux Basic Linux Example Copies files copy cp cp thisfile.txt /home/thisdirectory Moves files move mv mv thisfile.txt /home/thisdirectory Lists files dir ls ls Clears screen cls clear clear Closes prompt window exit exit exit Displays or sets date date date date Deletes files del rm rm thisfile.txt “Echoes” output on the screen … Read more

How to Remove index.php in Magento

Change few change, you will be able to do. Here are the following steps: 1. Change to ‘Yes’ at "Use Web Server Rewrites". Located in "Admin>System>Configuration>Web>Search Engine Optimization". 2.   Change to ‘Yes’ at "Use Web Server Rewrites". Located in "Admin>System>Configuration>Web>secure/Use Secure URLs in Frontend". 3. vi /yourdir/.htaccess Uncomment the statement: "RewriteBase /magento/" and change it … Read more

Basic Linux Commands

for move file —>  mv noldfile newfile to make new directory > mkdir dirname to put file into a new directory > mv textfile dirname/ to change file name > rm filename to view the text file …>>>>> less filename to add new user >>> useradd to del user >>> userdel username less command to … Read more