Custom Search
Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, 7 October 2011

Install LAMP in UBUNTU

 This is to help people setup and install a LAMP (Linux-Apache-MySQL-PHP) server in Ubuntu, including Apache 2, PHP 5 (optionally PHP 4 in Ubuntu 6.10 and lower), and MySQL 4.1 or 5.0.

When installing from the Ubuntu 6.06 (Dapper Drake) "Server cd", you have the option of choosing to install a LAMP setup at the inital Ubuntu installation screen. That will install apache2, php5 and mysql 5.0.

Check Requirements

{i} As of Ubuntu 7.04 (Feisty), all PHP4 packages have been dropped from the repositories, as the PHP4 branch is not being further developed/supported by the PHP Group. Everything in this article pertaining to PHP4 can therefore only be executed in Ubuntu 6.10 and lower. If you absolutely depend on PHP4 and would like to use the current Ubuntu release, you have to compile it from source.

Some applications require php4 while others will work with php5. Be sure to install the version of php and the corresponding apache2 module for it. You cannot have both php4 and php5 modules running on the same instance of apache2 at the same time. Installing one may remove the other.

If you have both php4 and php5 installed, be aware of which version of the apache2 php module you have. If libapache2-mod-php5 is already installed, the php4 package will install libapache-mod-php4 and not libapache2-mod-php4 package.

If libapache2-mod-php5 is not installed, installing php4 will install the apache2 php module (libapache2-mod-php4). See this example.

Most web applications will use Apache2, php5 and mysql5.0. If no specific versions are mentioned in your web application's documentation, use those.

To install the default LAMP stack in Ubuntu 6.06 LTS (Dapper Drake)

If you did not use the LAMP installer option from the server cd but want to install those same packages without having to reinstall your operating system, use any method to install the following packages

apache2 php5-mysql libapache2-mod-php5 mysql-server

All of those packages are in the Ubuntu 6.06 LTS (Dapper Drake) main repository. Once LAMP is installed, you need to set a mysql root password and then, depending on your web application, create a database, user and password. That's it!

To install the default LAMP stack in Ubuntu 7.04 (Feisty Fawn) Ubuntu 7.10 (Gutsy Gibbon) Ubuntu 8.04 LTS (Hardy Heron), 8.10 (Intrepid Ibex), 9.04 (Jaunty Jackalope), 9.10 (Karmic Koala), 10.04 (Lucid Lynx) and 11.04 (Natty Narwhal)

As of the 7.04 release, the Ubuntu base system includes Tasksel.

{i} Ubuntu 11.04 base system does not include tasksel. You will need to install it.

sudo apt-get install tasksel

You can either install LAMP using tasksel or install the LAMP packages as detailed above.

sudo tasksel install lamp-server

See Tasksel - be warned, only use tasksel to install tasks, not to remove them - see https://launchpad.net/bugs/574287

Starting over, How to remove the LAMP stack

To remove the LAMP stack remove the following packages:

    * Note: This assumes you have no other programs that require any of these packages. You might wish to simulate this removal first, and only remove the packages that don't cause removal of something desired.

apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 php5-common php5-mysql

To also remove the debconf data, use the purge option when removing. To get rid of any configurations you may have made to apache, manually remove the /etc/apache2 directory once the packages have been removed.

Ubuntu 11.04 Natty Narwhal shorcut Keyboard

Ubuntu 11.04 ‘Natty Narwhal’ will be released in another 8 days or so. We have followed the development of Ubuntu 11.04 very closely. In fact, we have reviewed all the previous developmental releases of Ubuntu 11.04 Natty Narwhal so far including Alpha 1, Alpha 2,Alpha 3 and Beta 1 releases. In my opinion, the overall Ubuntu 11.04 experience is so much better and involving if you know some essential Ubuntu Unity keyboard and Mouse shortcuts. So here are a bunch of very basic yet useful Ubuntu 11.04(Unity) keyboard shortcuts.

Ubuntu Unity Shortcuts
 
  • Super Key(Windows Key) - Opens dash.
  • Hold Super Key - Invokes Launcher.
  • Hold Super Key and hit 1, 2, 3 etc – Open an Application from Launcher. When you hold the Super Key, specific numbers will be displayed in order above each application.
  • Alt + F1 - Put keyboard focus on the Launcher, use arrow keys to navigate, Enterlaunches the application, Right arrow exposes the quicklists if an application has them.
  • Alt + F2 - Opens dash in special mode to run any commands.
  • Super + A - Opens up application window from launcher.
  • Super + F - Opens up files and folders window from launcher. Both these shortcuts can be viewed by simply holding the Super Key as well.
  • Super + W - Spread mode, zoom out on all windows in all workspaces.
  • Super + D - Minimize all windows(acts as Show Desktop). Hitting it again restores them.
  • Super + T - Opens trash can.
  • Super + S - Expo mode (for everything), zooms out on all the workspaces and let’s you manage windows.
  • Ctrl + Alt + T - Launch Terminal.
  • Ctrl + Alt + L - Lock Screen.
  • Ctrl + Alt + Left/Right/Up/Down - Move to new workspace.
  • Ctrl + Alt + Shift + Left/Right/Up/Down - Place window to a new workspace.
  • F10 - Open the first menu on top panel, use arrows keys to browse across the menus.
Mouse Shortcuts/Tricks for Ubuntu Unity
  • Clicking and holding an icon and then dragging it around will allow you to reorder it on the launcher. You can also drag it off to the right of the launcher to move it around. Note that you need to make an explicit movement to the right to move the icon off the launcher before you can move it around.
  • Dragging and Dropping an icon into the trash can will remove it from the Launcher.
  • Moving and holding the cursor on the left side for a few seconds will launch Unity dock.
  • Moving the cursor to top-left corner(near Ubuntu icon) will launch Unity dock as well.
  • Scrolling the mouse wheel while over the Launcher scrolls the icons if you have too many and need to move around quickly.
  • By Scrolling the mouse wheel while over the Sound icon on top panel helps you increase or decrease system volume.
  • Middle click on an application’s launcher icon – Open a new instance of the application in a new window. Very useful at times. In laptops with touchpads, hitting left/right click buttons together is akin to middle click.
  • Maximizing - Dragging a window to the top panel will maximize it.
  • Restore/Unmaximize - Dragging the top panel down OR double clicking on the top panel will do.
  • Tiling - Dragging a Window to the left/right border will auto tile it to that side of the screen. One of the highlights of new Unity experience.
And Some Useful Window Management Shortcuts(Generic)
  • Alt + F10 - Toggle between Maximize/Unmaximize current window.
  • Alt + F9 - Minimize current window.
  • Alt + Tab - Toggle between currently open windows.
  • Alt + F4 - Closes current window.
  • Alt + F7 - Moves the current window(both keyboard and mouse can be used).
Hope you find the listing of important keyboard/mouse shortcuts for upcoming Ubuntu 11.04 Natty Narwhal(Unity) useful. Thanks to askubuntu for the list.