Showing posts with label Terminal. Show all posts
Showing posts with label Terminal. Show all posts

Installing Joomla in Localhost ?

First, I hope you've heard something about CMS ( Content Management Systems). If not , I prefer you better learn about the importance of having CMS & what are the choices that somebody can make when pursuing a proper one or else, you're in the right place to know easy steps to install Joomla in localhost, one of the most popular CMS available.


Well, installing anything in Linux based Operating System (Ubuntu in my case) is somewhat tricky & often frustrating, yet challenging. So, Joomla is no exception. For those, who're having Windows, Most of the descriptions here won't make sense to you.

Anyway for others, Let's Begin. 

1. First, Download & install XAMPP in Linux Operating System, which is explained here alongside other related articles.

2. When you're done with XAMPP. Go to Joomla Download Page & get a zip of necessary Version of Joomla.

3. Press Ctr l+alt+T & start your terminal. Type Following Commands.

$ sudo cp /Download Location/Joomla_X.X.XX-Stable-Full_Package.zip /opt/lampp/htdocs/


Move zip to 'htdocs' directory. 'htdocs' is where you must place your files, in order to run them with local server.

Then, create a Directory to keep your Joomla Files & type 'nautilus'.

$ mkdir myJoomla

$ sudo nautilus

6. Go to 'htdocs' & Extract, previously copied Joomla Joomla_x.x.xx-Stable-Full_Package.zip file in to the created Directory. Use Archive Manager.


7. Launch a Separate terminal & Type following commands.

$ sudo find /opt/lampp/htdocs/myJoomla/ -type d -exec chmod 755 {} \;

$ sudo find /opt/lampp/htdocs/myJoomla/ -type f -exec chmod 644 {} \;
$ sudo chown -R root:root /opt/lampp/htdocs/myJoomla/
 

Set, Files Permission to 644 & directory permissions to 755 inside your Joomla installation directory.

8. Then, type http://localhost/myJoomla/ in the Browser address bar & press Enter.

9. Now, you've come to the crucial point where, you've to install Joomla like any other software, using your browser, & launch with your test site.

      9.1 First, Pick a language.



   
      9.2 Then, click next and move to the next step. In the next Page, you'll be seeing a list of settings under 'Pre - Installation Check' & look for configuration.php writable. If it's No, then you've to create configuration.php manually.



                  To do that, press Ctrl+alt+T & take a terminal window, move into the Joomla directory where the action is & type the following command.

$ sudo gedit configuration.php

                  save & close the file & type following in the terminal. Press 'Check Again' & Move to the next step.

$ sudo chmod 777 configuration.php 


       9.3  Accept the license agreement & move to the 'Database Configuration' Step. You've to admit that, in order to proceed from this, you've to create User name, Password, Database to serve Joomla Purposes using http://localhost/phpmyadmin. If you're done with it, provide those details into the form & click 'next'.


     9.4 It's recommended to leave the next which is 'FTP Configuration' blank. So, that you can enter your user name & password whenever you transfer any content. Click Next.

      9.5 'Main Configuration' is crucial as you've to enter Administrator Details like User name, Password & Email. If you're new to Joomla You can 'Install Sample Data'. So, you'll be seeing an example site at the beginning of your first Joomla experience.

      9.6 So, that's it. When you hit next after step 9.5 you'll be seeing a message to delete installation directory for security reasons. You can either delete it by clicking the button provided (Which more often won't work) or  go to the Joomla directory & find installation directory & manually delete.

10 . Now, Enter http://localhost/myJoomla/administrator/ into the address bar & proceed.

Thank You have fun with Joomla.

Faster Android Emulator?

If you ever found out that your Android Emulator is slower then, this might be the solution for you.



1. First, you've to install virtual box in your Computer. (Linux: Ubuntu in my case). You can use Ubuntu Software Center to do that.


2. After installation, you've to install Eclipse IDE with Android SDK. (Find adt-bundle & install)

3. Then, Download Android Operating System ISO, Here.

4. Now, Run Virtual Box Software & Create a new Virtual Machine. (Ctrl+N)



5. In the next Screen, Give your Virtual Machine a Base Memory Minimum of 512 MB. (RAM) The rest of the steps don't make any significant impact except Virtual Hard Disk setting where You should set it as Start-up Disk. Others, proceed as you please.




6. After completing VM Creation. Change the Settings of  the Virtual Machine by Machine->Settings. You've to set the IDE Controller. Give the Exact location of your downloaded Android generic ISO.



7. In order to enable network connection to the Virtual Machine, Set Network: Attached to: Bridged Adapter. So that, Virtual Machine will share network connection with Host.



8. Then, Start Virtual Machine. Select 'Run Android without Installation' option in the Android Live Installation Menu.


After few minutes, you'll be in your own Android Environment. Try to Practice Mouse Capture (Integration) with your Virtual Android Environment.



9. Then, Press Alt+F1 inside the Virtual Machine. You'll be seeing a screen similar to Terminal or Command Prompt. Then, Type netcfg command in order to get the Emulator's IP address. (Alt+F7 to Set it to Previous State)


Copy down the IP address. Take your terminal out & Type the following command.

$ adb connect "Your IP Address"

if it returns connected, then you're correct up to now.

10. Create a dummy Project to test this whole thing & go to Run-> Run Configurations. Then, Click Android Application-> New Configuration.

11. Inside the, Target tab. Under Target Tab set Deployment Target Selection Mode: Always Prompt to Pick Device.


12. Now, You can Click Apply & Run. You'll be prompted to choose emulators Select the Virtual Box.


Finally, you're done. Thanks for coming.

Different Ways to Know Your Linux Version ?

Have you ever been wondering, What Linux distribution / Version do you actually use ?

 So, in this post, I wanted to note down few of the ways to know 'Linux Distribution/ Version' of yours Computer Using Terminal.


First, Create a shell using Terminal. If you're unfamiliar with 'Terminal', Terminal to Linux is equivalent to Command Prompt for Windows. But, terminal is much more useful than Windows cmd. Simply, Terminal is a command Line Interface which provides user interaction with (Kernal). Go to Dash & Just type Terminal & run it.

Try following Methods.

$ cat /etc/*-release

It returns following output for me. But, it depends on the version/ Distribution of your Linux.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"
NAME="Ubuntu"
VERSION="12.04.1 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.1 LTS)"
VERSION_ID="12.04"


Or try using cat like follows. Cat Command is used to file contents in the standard output.

$ cat /proc/version

This will  return an output like this;

Linux version 3.2.0-36-generic-pae (buildd@lamiak) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #57-Ubuntu SMP Tue Jan 8 22:01:06 UTC 2013

As usual it depends, some times you'd get different version name. But, it should have a similar format to this.


Or try using lsb_release command. lsb_release is used to show distribution specific information.

$ lsb_release -a

It returns an output similar to the one given below.

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

Even though It has been described before in an older post The use of uname command will return a series of information about your Linux Kernal Version, Name & CPU Version of your computer.

$ uname -a

Adding Repositories to Ubuntu ?

                                 The truth as we know it is that, we use Ubuntu 'Update Manager', whenever we need to update software that we've already installed in our Ubuntu OS.

Because, that's Easy (Equivalent to Windows Update) we just have to click a single button.

If you're new to Ubuntu. Please know this, go to Dash & find 'Update Manager'.


                             Even if you aren't familiar with 'Update Manager', automatic prompt will always let you to download Free updates whenever it's available.

Repositories mean, the download sources that Ubuntu OS of yours lets you to download updates from. They're links basically, that directs your software to a download server.

Whenever, we install custom software to Ubuntu, we need to set repositories to download updates for them.

To do that, 

Step 01 :  

Get to know the download source URL. E.g - http://download.virtualbox.org/virtualbox/debian

Step 02 :

It's important to know that there're few types of Repository components available.

  • Main - Official Ubuntu Software.
  • Restricted - Supported software but still not distributed under complete Free License.
  • Universe - Community maintained software, i.e. not officially supported software.
  • Multi-verse - Software that is not free.

Step 03 :

Go to Terminal. (Dash -> Type 'Terminal' -> Click)




Then, type following command in the terminal.

$ cd /etc/apt

You've to edit Sources.list  file in order to set your repositories. Use your vi-editor and open Sources.list  with vi.

$ vi sudo sources.list


Enter your administrator password & in the vi, Go to the bottom of the sources file.



Step 04 :

Add your download source URL in vi --INSERT-- Mode.

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu oneiric main

You've to include your URL in the 'deb' format. 

But, you've to be careful in editing sources.list & make sure you write your third party software URL entry under the Third Party  software section. Save the file & exit.

Step 05 :

Now, go to Dash & type 'Update Manager'. Then click 'Check' button to check for updates.



Then, click 'install Updates' button to update. Make sure you've already ticked all the updates.



 Okay. It's over Enjoy ! Your Ubuntu Experience.

Add Custom icons to Dash Menu ?


Hey, Hmm to be honest in terms of design Ubuntu newest versions getting more attention due to it's elegant Dash Menu.

Dash Menu ? Oh, if you wonder what it is ? Here's My Dash.



The new Dash Menu is something even windows OS team couldn't figure out earlier to Ubuntu.

Alright, this post isn't about elegance of Dash, but the way to add icons to Dash Menu.

 1. First, prepare Your icon. It's better to save it with the extensions like .png or .ico. In this example I used my iReport-3.7.1 icon.



 Make sure you save it in installation directory. That'll be fair & when you uninstall software the icon will automatically be removed.

2. Then, take your terminal and type following terminal command.




3. Now, Decide a name for your icon file & type vi .desktop. It'll open vi-editor & ultimately start a text file.




4. Edit & add the following code. Make changes according to your senario.

[Desktop Entry]
Name=Ireport 3.7.1
Comment=Report Application
Exec=Ireport
Icon=/opt/ireport 3.7.1/bin/ireport.png
Terminal=false
Type=Application
StartupNotify=true
Keywords=report;ireport;i;



5. Important : Make Sure you add the correct image path & save the file. (Key Sequence Esc -> :wq ->Enter)



6. Check whether it works by typing keywords you add inside the code in the search box of Ubuntu Dash.8




Enjoy !

How to Use VIM Editor with Speed & Knowing ?

Hi!

These stuff were pretty elementary & actually got to know these in early season at campus. But, it's important & I use to use these almost everyday in programming in linux environment & that's why I thought to note down something about this.

Alright, among many of the text editors that can be used in linux environment vim-editor is one of the most commonly used applications.

That's mainly due to it's simplicity. It's usable with Terminal itself & consists of very limited amount of commands (comparing to emacs), which makes it easier to use even to a newbie.

Then, let's get to know VIM-Editor.

1. Check whether you've got VIM-Editor installed.



You'll see your terminal showing something like follows.


if you won't, then, you've got to install VIM-Editor in order to proceed. If you're a complete newbie here's a tip to get vim.

Go to Ubuntu Software Center & Search : GVim. Download & install it.

 You've got it for sure by now. Alright then, let's proceed.


2. Take out the terminal & go to Desktop. (Type: Cd Desktop) Then, type: vi [Your File Name].







3. Good, now you're in VIM Mode & you can't type anything write away. So, in order to go to typing mode : press 'i' in your keyboard. Then, you'll be seeing something like '-- INSERT--' at the bottom edge of your VIM editor which means that now you can type.




 4. Type anything & after you finish type keep in mind to press Esc to exit Typing Mode & come to Command Mode.

5.  Then, try following tips to fix/edit what you've already typed.

  • 'o' - (Letter O) Get an empty line. Bring your cursor to the end of a line & type 'o'. A new line will be opened.


  • 'dd'- (Letter d twice) Delete a line. Bring cursor to the beginning of a line & type 'dd'.


  • 'p' - Right after delete. Bring cursor to a new location & type 'p'. deleted line will be appearing at the new location.


  • 'cw' - Pick a word and a letter closer to the beginning of the word & bring cursor on it & type 'cw'. The rest of the word beginning from the letter you picked will be deleted. Now, you can replace it with something else.


  • Ex: 'Element' - pick lettter 'l' . It'll be 'E' after command 'cw'


  • 'r' - Take your cursor on a letter and type 'r' and then type a letter that you need to replace the previous with.


Enjoy VIM-Editor !