You are hereHow to's / Linux-Unix

Linux-Unix


Linux and Unix

Installing LAMP server in Ubuntu 10.04 (Linux, Apache, MySQL, and PHP)

Issue:
I want to make my computer able to run a Web Server (Apache, PHP), and MySQL database software on my Linux computer.

Solution
Ubuntu 10.04 has a list of packages ready for all of these that is very easy to install.

  1. Open the Terminal if it's not open. (Applications-Accessories-Terminal)
  2. sudo apt-get install tasksel
  3. sudo tasksel install lamp-server
  4. With these commands Apache, MySQL, and PHP will be installed.

Passwordless SSH connections using a RSA key

In the command line. Build your user ID or called keygen
ssh-keygen -t rsa
Then after you make a RSA key then trasfer it to the server or "host" you want to access.
The hostname will be the domain or IP address of the computer you want to copy the key to. "The computer your trying to access without a SSH password.

The username is the user you are using to log in to the computer your trying to connect to.

ssh-copy-id -i ~/.ssh/id_rsa.pub username@hostname

After pressing enter at this command you will be asked once for the password for the remote computer. This allows the key to be copied to the remote computer.

After the key has been copied try to connect to the remote computer.

ssh username@hostname

If everything worked right you will be logged in to your remote server without a password.

How to Install KDE On Ubuntu

Problem

"I want to learn about linux operating system and install Ubuntu 10.04 on the machine.The Ubuntu 10.04 default desktop uses the Gnome window manager.It is a little difficult for windows users to transfer.I heard that the KDE desktop is more familiar to windows users,so I want to install KDE window manager,but I don't want to completely reinstall with Kubuntu.How should I do?". If you are bothered by this problem, please follow these steps.

Solution

1. Open the terminal.
2. Input the command:"sudo apt-get install kubuntu-desktop". It will take a while to download.
3. After downloading,you will be asked which you will select: kdm or gdm. There is no particular impact. You can select the default option.
4. Reboot the computer,at the login window we select the KDE option and then it is the KDE environment.

Google Chrome Profile Could Not Be Opened Correctly Error.

Symptoms:
When you open Google Chrome, you receive a pop-up error message that says “Your profile could not be opened correctly. Some features may be unavailable. Please check that the profile exists and you have permission to read and write its contents.

Solutions:
Mac OSX
Quit Google Chrome.
Open Terminal.
Change directory (cd) to /Users/{user}/Library/Application Support/Google/Chrome/Default
Delete Web Data and History files: rm -rf History*; rm -rf Web\ Data;
Start Google Chrome and the error should be gone.

Windows 7
Quit Google Chrome.
Open Computer.
Navigate to C:\Users\{username}\AppData\Local\Google\Chrome\User Data\Default\
Delete the file named “Web Data”
Start Google Chrome and the error should be gone.

Windows XP
Quit Google Chrome.
Open Computer.
Turn on Show Hidden Files and Foldesr in Folder Options in Windows Explorer.
Navigate to: C:\Documents and Settings\{username}\Local Settings\Application Data\Google\Chrome\User Data\
Delete the file named “Web Data”
Start Google Chrome and the error should be gone.

Linux
Quit Google Chrome.
Open a shell.
Change directory (cd) to ~/.config/google-chrome/Default
Delete the file named “Web Data”: rm -rf Web\ Data;
Start Google Chrome and the error should be gone.
NOTE: If the problem repeats itself after every reboot, then there is most likely corruption is your user profile, so you will have to delete the profile and start a new one. In order to do that, follow the above steps, and replace step 5 and 6 with the following. Make sure that you backup your bookmarks before doing this, as they are a part of your profile and will disappear after doing this:

Locate the folder called "Default" in the directory window that opens and rename it as "Backup default."

Try opening Google Chrome again. A new "Default" folder is automatically created as you start using the browser.

More info can be found at.
http://www.fourleaftechnology.com/index.php/General/google-chrome-profil...

How to untar and tar files

tar was and is a program that creates Archive files. tar is a abbreviation for "Tape ARchive".
When tar is used to create a archive file, that file is called a tarball or a .tar file. Tarball file is just like a ZIP file, but does not compress the files inside of it. Tarball files are used primarily in a UNIX and LINUX environments.
tape drive

One of the first uses for a tar file was to backup files to a tape media. Tape media is a long strip of plastic film that has a magnetizable coating that can be edited with a use of a tape drive.

Tape is still used, but the main point for tar files is a way to put many files into one, so they can all be downloaded. These files end with a .tar file.

Below is the syntax use to the tar command.
1. Extract files
To extract files from a tar file, or to get the files out of the tarball file:
x is for extract (This switch will extract files from the tar file)
v is for verbose (This switch lists the files processed by the tar command)
f is for file (This switch tells tar what file or device to use)
tar xvf something.tar

This command is used to extract files inside of a compressed tarball file that is using the gzip compression algorithm.
x is for extract (This switch will extract files from the tar file)
v is for verbose (This switch lists the files processed by the tar command)
f is for file (This switch tells tar what file or device to use)
z is for compress (This filters the file through the compression algorithm)
tar xvfz something.tar.gz

This command is used to extract only some directories inside of a compressed tarball file that is using the gzip compression algorithm.
x is for extract (This switch will extract files from the tar file)
v is for verbose (This switch lists the files processed by the tar command)
f is for file (This switch tells tar what file or device to use)
z is for filter to gzip (This filters the file through the gzip compression algorithm)
tar xvzf something.tar.gz */dir.you.want/*

2. Create Files
This command is used to extract files inside of a compressed tarball file that is using the bzip2 compression algorithm.
x is for extract (This switch will extract files from the tar file)
v is for verbose (This switch lists the files processed by the tar command)
f is for file (This switch tells tar what file or device to use)
j is for filter to bzip2 (This filters the file through the bzip2 compression algorithm.)
tar xvjf something.tar.bz2

This command creates a .tar.gz file. (A tarball file using the gzip compression algorithm.)
c is for create (This creates a new file)
f is for file (This switch tells tar what file or device to use)
z is for filter to gzip (This filters the file through the gzip compression algorithm)
tar cfz somthing.tar.gz /directory

This command creates a .tar.gz file. (A tarball file using the bzip2 compression algorithm)
c is for create (This creates a new file)
f is for file (This switch tells tar what file or device to use)
j is for filter to bzip2 (This filters the file through the bzip2 compression algorithm)
tar cfj somthing.tar.gz

3. Listing out the content.
This command lists the files inside a .tar.gz file (A tarball file using the gzip compression algorithm.)
t is for list (This switch tells tar to just list the files)
f is for file (This switch tells tar what file or device to use)

tar -tf somthing.tar

This command lists the files inside a .tar.gz file (A tarball file using the gzip compression algorithm.)
t is for list (This switch tells tar to just list the files)
f is for file (This switch tells tar what file or device to use)
z is for filter to gzip (This filters the file through the gzip compression algorithm)
tar -tfz somthing.tar.gz

This command lists the files inside a .tar.bz2 file (A tarball file using the bzip2 compression algorithm.)
t is for list (This switch tells tar to just list the files)
f is for file (This switch tells tar what file or device to use)
j is for filter to gzip (This filters the file through the bzip2 compression algorithm)
tar -tfj somthing.tar.bz2

Some advanced uses of tar
This command creates a .tar.bz2 file and names it using today's date for doing daily snapshots of the home folders.
tar cjf homedirs-$(date +%Y%m%d).tar.bz2 /home

Just a interesting thing regarding TAR it does not create fully POSIX-compliant archives this means that it does not reliably reconstructing file access rights. A program that does that is called pax.

More into on the tar file can be found at:

  • http://linuxcommand.org/man_pages/tar1.html
  • More info on tapes and tape drives can be found at.

  • http://sio.co/blog/audio-format-guide/
  • Disclaimer


    Our company does not support, endorse, or recommend; replacement, resetting, installing, removing or repairing of hardware or software without hiring our company. Damages resulting from replacement of hardware is not covered under warranty and is NOT RECOMMENDED. Proceed at your own risk.


    We recommend that you hire us and we will provide a quality professional repair for you.