Posts

Showing posts from January, 2011

Basic Linux Commands III - Gzip , Tar, Bzip2

### Gzip , Tar, Bzip2 ### gzip a. gzip -c 12thousnd.txt > 12thousnd.txt.gz b. gunzip 12thousnd.txt.gz -dumps to file and delete the compressed version c. gzip -c 12thousnd.txt.gz d. zcat 12thousnd.txt.gz dumps to STDOUT zcat 12thousnd.txt.gz > test12th.txt bzip2 a. bzip2 -c 12thousnd.txt >12thousnd.txt.bz2 can have more compression b. bunzip 12thousnd.txt.bz2 c. bzcat 12thoousnd.txt.bz2 zip & unzip a. zip filename.zip path_to_source_file/ ex: zip 12thousnd.txt.zip 12thousnd.txt (differ from gzip ,bzip2) b. unzip 12thousnd.txt.zip tar and gzip/bzip2 a. tar -cvf filename.tar path_for_source/ need extra overhead(memory) b. tar -czvf filename.tar.gz path_for source/ (creates filename.tar.gz) c. tar -cjvf filename.tar.bz2 path_for source/ (creates filename.tar.bz2...

How to add wheel user in linux

How to add wheel user in linux Make sure is there any entry in /etc/group like as wheel:x:10:root /etc/pam.d directory, and edit the file su . Find these lines in that file like as follow # Uncomment the following line to require a user to be in the “wheel” group. #auth required pam_wheel.so use_uid Edit the sudorer configuration file with visudo Uncomment the following (colored) entry # Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL This will allow anyone in the wheel group to execute commands using sudo

Configure Apache in Linux

Download Apache Click on the link for "httpd-2.2.xx.tar.gz" and download the installer. Copy files into the directory you want to install the Apache Ex: /usr/local/installedapp copy the httpd-2.2.xx.tar.gz to the directory and extract it using followed command #tar -xzvf httpd-2.2.xx.tar.gz move into newly created directory #cd /usr/local/installedapp/"httpd-2.2.xx configure the apache #./configure --prefix=/usr/local/installedapp/"httpd-2.2.xx --enable-mods-shared=all compile apache #make install the apache build #make install now you have to start/stop/restart the apache as follow #/usr/local/installedapp/"httpd-2.2.xx/apachectl {start|stop|restart} ex: #/usr/local/installedapp/"httpd-2.2.xx/apachectl start (starting apache) Open the web browser and go to http://localhost:80 It shows apache works!!