Archive for the ‘OpenSource’ Category

If you develop web applications and scripts, it will be nice testing them locally in your own computer before launching them online. This will require the installation of a webserver on your computer.LAMP (Linux, Apache, MySQL, PHP) is one of the easiest and perfect environment where you can test all your PHP codes. In this tutorial, we will help you install the LAMP webserver in the following Ubuntu/Linux Mint distributions:

  • Ubuntu 13.04/12.1012.04/11.10 or older
  • Linux Mint 14/13/12 or older

LAMP Installation

The LAMP webserver can be installed easily with this command (the caret (^) is required, don’t exclude it):

sudo apt-get install lamp-server^

During the installation, you will be asked to enter a new root password for the MySQL database, submit it and press Enter:
MySQL-Password

You will be prompted to enter the password again for confirmation. Wait now until the installation is complete. You have now installed the LAMP webserver on Ubuntu 11.04/11.10. Let’s now go to the next step.

Testing Apache

Launch your web browser (Firefox, Google Chrome, etc.) and open one of these addresses (or provide your server IP address if needed):

http://localhost/

or

http://127.0.0.1/

If you get this page, then Apache is started:
Apache-it-works

Otherwise try to restart Apache with this command:

sudo /etc/init.d/apache2 restart

Then give it another try.

Testing PHP

Let’s now test PHP. You need to create an empty PHP file in /var/www  and insert this snippet of code into it:

<?php phpinfo(); ?>

You can easily do it with these two commands via the terminal:

echo “<?php phpinfo(); ?>” | sudo tee /var/www/test.php


sudo /etc/init.d/apache2 restart



Then open this address:

http://localhost/test.php

You should see a page like this:
test-php

Configuring MySQL

Since you are using the LAMP webserver locally, your MySQL database must uses the same IP address of your localhost which is: 127.0.0.1. Via the Terminal, run this command to verify it:

cat /etc/hosts | grep localhost

Here is the correct output you must get:

~$ cat /etc/hosts | grep localhost
127.0.0.1 localhost
::1     ip6-localhost ip6-loopback


Also verify that the bind address is set correctly by running this command:

cat /etc/mysql/my.cnf | grep bind-address

You should get this output:

~$ cat /etc/mysql/my.cnf | grep bind-address
bind-address = 127.0.0.1

If you get a different IP address, then edit the my.cnf file with this command:

sudo gedit /etc/mysql/my.cnf

Search for the line containing “bind-address” and correct its address by replacing it with 127.0.0.1.

phpMyAdmin Installation

If you want an easy GUI for managing your MySQL databases, you can install phpMyAdmin with this command:

sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

During the installation you will be asked to select a web server that will be configured automatically to run phpMyAdmin. Select apache2 using your spacebar and press Enter:
select-apache2-lamp

You will be asked next to configure a database for phpmyadmin with dbconfig-common, select Yes and press Enter:

phpmyadmin-dbconfig-commonIn the next screen, enter the MySQL password you have submitted before and press Enter:

[
OR,

Select  NO and press ENTER
And, Type below command in terminal

sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d

restart your apache server using

sudo /etc/init.d/apache2 restart

]

Congratulation! phpMyAdmin is now installed in your system. To test it, open simply this address via your web browser:

http://localhost/phpmyadmin/

Login to phpMyAdmin using root as username and the password you created earlier:

phpmyadmin (1)

phpmyadmin (2)

You have now successfully installed LAMP on your system. All your projects and files must be placed in /var/www so that you can run them.

Removing LAMP & phpMyAdmin

To uninstall the LAMP web server and phpMyAdmin, open the terminal and run this command:

for pkg in `dpkg -l *apache* *mysql* phpmyadmin | grep ^ii | awk ‘{ print $2 }’`; do sudo apt-get -y purge –auto-remove $pkg; done;

That’s it!
Enjoy!

WordPress-3.5WordPress has been updated to version 3.5 having this codename ‘Elvin‘ in honor of Elvin Jones (drummer). This new version comes with a new media manager and Retina support. Users of WordPress will have a new experience when uploading images and creating galleries thanks to the new image uploader.

WordPress 3.5 comes also with various tweaks and a new default theme (Twenty Twelve). You can find full features here. In this tutorial, we will see how to install this blogging and CMS platform under the following Ubuntu/Linux Mint distributions:

  • Ubuntu 12.10/12.04/11.10 or older
  • Linux Mint 14/13/12 or older
  • Any other Ubuntu-based System

  1. Requirements

To be able to install WordPress 3.5 in Ubuntu/Linux Mint, we need to install a web server (Apache, PHP, MySQL, etc.). If you are following my previous tutorials, you will notice that I prefer to use the LAMP server, you can find here detailed instructions for installing it.

   2. Creating A MySQL Database For WordPress

For GUI mode, I recommend that you use phpMyAdmin to create a MySQL database and user for WordPress. For CLI mode, you can run this sequence of commands (change text in red to reflect your own database configuration):

## Connect to MySQL Server & Enter Password (if any or leave blank)## 
mysql -u root -p
Enter password:

## Creating New User for WordPress Database ##
CREATE USER wordpress@localhost IDENTIFIED BY "12345";

## Create New Database ##
create database wordpress;

## Grant Privileges to Database ##
GRANT ALL ON wordpress.* TO wordpress@localhost;

## FLUSH privileges ##
FLUSH PRIVILEGES;

## Exit ##
exit

The commands above will create these details:

  1. Hostname: localhost
  2. Database: wordpress
  3. Database User: wordpress
  4. Database User Password: 12345

3. WordPress 3.5 Installation

Via the terminal, download and move the WordPress folder to /var/www/ with these commands:

cd /tmp

wget -c http://wordpress.org/latest.zip

sudo unzip -q latest.zip -d /var/www/

sudo chmod 777 -R /var/www/wordpress

sudo /etc/init.d/apache2 restart

Open now this link to start the web-based installation:

      http://localhost/wordpress

NOTE: You can replace localhost with your server IP address.

In the first page, click Create a Configuration File:

wordpress-setup-1
Then follow setup instructions:

wordpress-setup-2 wordpress-setup-3 wordpress-setup-4 wordpress-setup-5 wordpress-setup-6 wordpress-setup-7 wordpress-setup-8
That’s it!
Enjoy!

Installing and Configuring Samba Ubuntu 12.04

One of the most common ways to network Ubuntu and Windows computers is to configure Samba as a File Server.
Samba allows file and print sharing between computers running Windows and computers running Unix.  Samba sets up network shares for chosen Unix directories (including all contained sub-directories). These appear to Microsoft Windows users as normal Windows folders accessible via the network.
In this tutorial, we will configure Samba on Ubuntu 12.04 Desktop edition.
First thing to do is to make sure that your Ubuntu system is up-to-date with all the latest packages and updates.
To ensure this, run the following command:
# sudo apt-get update
Once the update completes, we can now setup the Samba server on Ubuntu.
First, we install the necessary Samba packages
# sudo apt-get install samba samba-common

The next thing to do is install Python-Glade.
# sudo pat-get install python-glade2

 

Before we move ahead further with the installation, it is recommended that you create a user for your Samba Server. This user will be a dedicated user account used with Samba.
To create a new user:
# adduser <username>
NOTE: You need to have root (sudo) privileges to run this command.

 

The last step is to install the Samba UI. This option is available ONLY in the Desktop editions of Ubuntu. In case you have a Ubuntu Server, then you need not run this command.
# sudo apt-get install system-config-samba

 

Once installed, we can view the Samba configuration utility by opening the dash and using the search bar to find Samba like so:

 

To share a folder with Samba, click the green ‘+’ (plus) icon to open a dialogue box called ‘Create Samba Share’ like so:

 

 

Complete the ‘basic’ tab with the required information.
  • Directory: Click ‘Browse’ to locate the relevant folder you wish to share.
  • Share Name: Use this field to specify a ‘human friendly’ name for your share folder.
  • Description: Type a description of the ‘share folder’ in this field.
  • Writable: Shared folders are ‘read-only’ by default, so place a tick in this box if you would like to enable ‘write’ access.
  • Visible. Place a tick in this box if you want your share folder to be ‘visible’ on the network.

 

Following this, we now need to set the permissions for your new share folder.
To do this, simply click the ‘Access’ tab in the same dialogue box like so:
You can select the users you want to have access to Samba Server from here.
NOTE: You can alternatively select “Allow Access to Everyone”, but this setting is not recommended in production environments.

 

 

Once your settings are completed, you are now ready to test out your Samba Server

 

 

On your Windows system, go to “Network“. If your Ubuntu system is not visible, just refresh the Network.

 

 

You will see your shared folder

 

 

Depending on your security setting, you may be prompted to enter credentials for the Shared Folder.

 

If all goes well, you now have a shared folder between your Ubuntu and Windows Server.
Darktable is an application used for image managing and image editing.

Darktable is an open source photography workflow application and RAW developer. A virtual lighttable  and darkroom for photographers. It manages your digital negatives in a database, lets you view them through a zoomable lighttable and enables you to develop raw images and enhance them.we can import images from your computer as single file or a grop of images which is termed as film roll.The software also scans for external devices. Thumbnailing of this app is a bit slow. The app gives us options like lighttable darkroom and tethering.
lighttable
The left panel is for importing images, displaying Exif information, and filtering. Rating and categorizing buttons are at the top, while the right-side panel features various modules such as a metadata editor and a tag editor. A module used to export images is located at the bottom-right.
darkroom
This mode can be accessed by double-clicking on an image. The layout displays the image at center, with four panels around it; most tools appear on the right side. The left panel displays a pannable preview of the current image, an undo history stack, a color picker, and Exif information. A filmstrip with other images is displayed at the bottom, and can be sorted and filtered using lists from the upper panel. The latter also gives access to the preferences configuration. darktable’s configuration allows custom keyboard shortcuts and personalized defaults.
tethering
A third mode allows tethering through gPhoto to cameras which support it like Canon (5D, EOS 30D, EOS 40D, EOS 400D, and EOS 550D), Nikon (D60, D70s, D90, D5000, and Nikon Coolpix P100), and the Panasonic Lumix DMC-FZ50.
Darktable support raw files from almost every camera,Import a variety of standard, raw and high dynamic range image formats like jpg, cr2, hdr, pfm etc.The powerful export system supports Picasa webalbum, flickr upload, disk storage, 1:1 copy, email attachments and can generate a simple html-based web gallery.darktable uses both XMP sidecar files as well as its fast database for saving metadata and processing settings.
Apart from usual image ,colour and effects options it comes with many features like watermarking ,framing,split toning ,vignetting,monochrome , highpass  , lowpass ,shadows and highlights which helps in image post processing.It also have many correction modules like spot removal,lens correctio,equaliser,sharpen,denoise etc.
On the whole darktable is a very good  photography workflow application and undoubtedly the best in open source
Darktable runs on GNU/Linux / GNOME, Mac OS X / macports and Solaris 11 / GNOME.