Sabtu, 29 Agustus 2015

The Zimbra Collaboration Server is a mail server, collaborative web application and a web based mail server admin console in a single application. It provides LDAP, antivirus, antispam, collaboration features and a ajax webmail client. Zimbra is easy to use for administrators as well as end users due to its fast Ajax based web interface.

> Prerequisites

    Ubuntu Server 14.04 - 64bit
    root privileges
    Free space 25 GB
    RAM 4 GB

My zimbra Server profile used in this tutorial:

Domain : networking-router.local
IP     : 192.168.1.101
Mail   : mail.networking-router.local

What we will do in this tutorial:


  -  Install the prerequisite packages
  -  Configure hostname and DNS Server
  -  Download and Install Zimbra
  -  Test the installation

> Installation of prerequisites

Step 1 - connect to your server, get root privileges and install this package.

# apt-get install libgmp10 libperl5.18 unzip pax sysstat sqlite3 dnsmasq wget

> Configure hostname and DNS Server

In this tutorial will use the 'dnsmasq' resolving nameserver to speedup DNS lookups in Zimbra. Dnsmask has been installed as prerequisite in the first chapter, so we just have to configure it now:

Step 1 - Edit hostname and hosts

vim /etc/hostname

change your hostname with this 'mail.networking-router.local'.



vim /etc/hosts

add this line:
 
192.168.1.101   mail.networking-router.local  mail

Step 2 - Edit dnsmasq configuration

vim /etc/dnsmasq.conf
server=192.168.1.101
domain=networking-router.local
mx-host=networking-router.local, mail.networking-router.local, 5
mx-host=mail.networking-router.local, mail.networking-router.local, 5
listen-address=127.0.0.1

Step 3 - Reboot


sudo reboot

Installing Zimbra

Step 1 - Download Zimbra and extract it

wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.UBUNTU14_64.20141215151116.tgz
tar -xvf zcs-8.6.0_GA_1153.UBUNTU14_64.20141215151116.tgz
cd zcs*

Step 2 - Run the Installer

./install.sh

At this step, zimbra will check the required packages and will ask you to agree to their installation.



Agreement Zimbra

and then choose the zimbra package :
Choose Zimbra Installation

here doesn`t need zimbra-dnscache, because in this tutorial use dnsmasq.
You need to wait, because this installation takes some time.
next step is configure "zimbra-store" for getting admin password. See the picture:

Configure Admin Pasword

Choose number "4" and enter. and then type your password:
Changing Password

Apply all Configuration:
Apply all configuration

and wait for Zimbra configuration finished.

Testing Zimbra

To test your zimbra server is running, you can type a command :

su - zimbra
zmcontrol status
try to access zimbra from web browser.  https://192.168.1.101/

Access Zimbra

or try admin page " https://192.168.1.101:7071/ ".

Jumat, 28 Agustus 2015

animated-wallpaper-galaxy

There’s a simple tool to replace your boring default wallpaper with a completely animated OpenGL wallpaper. It’s Android style live wallpaper on Ubuntu Desktop.

It only contains a few wallpapers so far. While it’s under developing, it continues adding new wallpapers.
animated-wallpaper-setting

To install this tool on Ubuntu:
There’s a ppa repository that contains stable packages for Ubuntu 13.04 Raring, 12.10 Quantal, 12.04 Precise and Linux Mint 15, 14, 13.

To add the ppa, press Ctrl+Alt+T, copy and paste below command into terminal and hit run:

sudo add-apt-repository ppa:fyrmir/livewallpaper-stable

Then update via command:
 
sudo apt-get update

Finally install the tool:
 
sudo apt-get install livewallpaper livewallpaper-config livewallpaper-indicator
 
Once installed, open Livewallpaper Config from Unity Dash.

^_^
how to enable Compiz effects Desktop Cute, Rotate Cube, 3D windows on Ubuntu 12.04 Precise Pangolin.

Here we go :
  • 1. Open terminal from the dash home or press Ctrl+Alt+T, execute this command to check if your machine support compiz effects or not:
     
    /usr/lib/nux/unity_support_test -p

    You’ll get this similar output:


  •  
  • 2. Install video card driver by launch Additional Drivers :
  • 3. Install Compiz Config Settings Manager:
    sudo apt-get install compizconfig-settings-manager
  • 4. Launch Compiz Config Stetings Manager (sscm)
  •  
  • 5. Tick on Desktop Cube, Rotate Cube. Press and hold CtrL+Alt then drag your mouse and you get:
  •  
  • 6. Tick on Cube Reflection and Deformation and 3D windows, then hold Ctrl+Alt and drag the mouse.
  •  
  • 7. Top and bottom pictures in cube can be configured under the configuration page of Cube Reflection and Deformation
Enjoy!

Kamis, 27 Agustus 2015

Introduction

Most of our operating systems including Linux can support different user interfaces (UI). The Graphical User Interface (GUI) is a user-friendly desktop interface that enables users to click icons to run an application. The other type of interface is the Command Line Interface (CLI) which is purely textual and accepts commands from the user. A shell, the command interpreter reads the command through the CLI and invokes the program. Most of the operating systems nowadays, provide both interfaces including Linux distributions.


Why create shell scripts?

The shell script is a very useful tool in automating tasks in Linux OSes. It can also be used to combine utilities and create new commands. You can combine long and repetitive sequences of commands into one simple command. All scripts can be run without the need of compiling it, so the user will have a way of prototyping commands seamlessly.

I am new to Linux environment, can I still learn how to create shell scripts?

Of course! Creating shell scripts does not require complex knowledge of Linux. A basic knowledge of the common commands in the Linux CLI and a text editor will do. If you are an absolute beginner and have no background knowledge in Linux Command Line, you might find this tutorial helpful.



Creating my first shell script

The bash (Bourne-Again Shell) is the default shell in most of the Linux distributions and OS X. It is an open-source GNU project that was intended to replace the sh (Bourne Shell), the original Unix shell. It was developed by Brian Fox and was released in 1989.
You must always remember that each Linux script using bash will start with the following line:

#!/bin/bash

Every Linux script starts with a shebang (#!) line. The bang line specifies the full path /bin/bash of the command interpreter that will be used to run the script.

Hello World!

Every programming language begins with the Hello World! display. We will not end this tradition and create our own version of this dummy output in Linux scripting.

To start creating our script, follow the steps below:

Step 1: Open a text editor. I will use gedit for this example. To open gedit using the terminal, press CTRL + ALT + T on your keyboard and type gedit. Now, we can start writing our script.

Step 2: Type the following command at the text editor:
#!/bin/bash
echo "Hello World"

Step 3: Now, save the document with a file name hello.sh. Note that each script will have a .sh file extension.

Step 4: As for security reasons enforced by Linux distributions, files and scripts are not executable by default. However we can change that for our script using the chmod command in Linux CLI. Close the gedit application and open a terminal. Now type the following command:
chmod +x hello.sh

The line above sets the executable permission to the hello.sh file. This procedure has to be done only once before running the script for the first time.

Step 5: To run the script, type the following command at the terminal:
./hello.sh

Let's have another example. This time, we will incorporate displaying some system information by using the whoami and date commands to our hello script.

Open the hello.sh in our text editor and we will edit our script by typing:
#!/bin/bash
echo "Hello $(whoami) !"
echo "The date today is $(date)"

Save the changes we made in the script and run the script (Step 5 in the previous example) by typing:


./hello.sh

The output of the script will be:



In the previous example, the commands whoami and date were used inside the echo command. This only signifies that all utilities and commands available in the command line can also be used in shell scripts.

Generating output using printf

So far, we have used echo to print strings and data from commands in our previous example. Echo is used to display a line of text. Another commmand that can be used to display data is the printf command. The printf controls and prints data like the printf function in C.

Below is the summary of the common prinf controls:
Control Usage
\" Double quote
\\ Backslash
\b Backspace
\c Produce no further output
\e Escape
\n New Line
\r Carriage Return
\t Horizontal tab
\v Vertical Tab

Example3: We will open the previous hello.sh and change all echo to printf and run the script again. Notice what changes occur in our output.

#!/bin/bash
printf "Hello $(whoami) !"
printf "The date today is $(date)"



All lines are attached to each other because we didn't use any controls in the printf command. Therefore the printf command in Linux has the same properties as the C function printf.

To format the output of our script, we will use two of the controls in the table summary above. In order to work, the controls have to be indicated by a \ inside the quotes of the printf command. For instance, we will edit the previous content of the hello.sh into:

#!/bin/bash
printf "Hello \t $(whoami) !\n"
printf "The date today is $(date)\n"
The script outputs the following:

Rabu, 26 Agustus 2015

Raspbian 

First we need to download raspbian, you can grab the latest version at https://www.raspberrypi.org/downloads/
Direct url: http://downloads.raspberrypi.org/raspbian_latest
Now we need unzip the file: 2015-05-05-raspbian-wheezy.zip:
unzip 2015-05-05-raspbian-wheezy.zip
You will get a file named 2015-05-05-raspbian-wheezy.img, this file must be written to your micro-sd card.

When the image is written, insert the micro-sd card into your Raspberry Pi, and turn it on.
When the Raspberry Pi is booted, you should see a screen like this, on first startup.

Now I select following options:

1 Expand Filesystem
3 Enable Boot To Desktop/Scratch -> Select Console Text Console, requiring login (default)
8 Advanced Options -> A4 SSH -> Enable
8 Advanced Options -> A0 Update
Finish -> Reboot

Now you can login with following username: pi and password: raspberry.
First we setup the network configuration for our server by editing
sudo nano /etc/network/interfaces

My /etc/network/interfaces file looks like this (change the setup of your needs):
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet static
        address 10.255.50.30
        netmask 255.255.255.0
        gateway 10.255.50.1
        dns-nameservers 8.8.8.8 8.8.4.4

Now we restart the network service on the Pi:
sudo /etc/init.d/networking restart

Then we disable DHCP on startup with this command:
sudo update-rc.d -f dhcpcd remove
If you somehow would like to enable it again later, just run following command:
sudo update-rc.d dhcpcd defaults

Now we can use an SSH client such as PuTTY to connect from our PC to the Raspberry Pi.

Now we update raspbian with following command:
sudo apt-get update &&  apt-get upgrade -y && apt-get dist-upgrade -y

PlaySMS

Download and install playsms 1.1:
sudo -s
apt-get install apache2 libapache2-mod-php5 mysql-server php5 php5-cli php5-mysql php5-mcrypt php5-gd php5-imap php5-curl
php5enmod mcrypt
service apache2 restart

When asked for the new password for the MySQL "root" user, use a strong password, in this example I have used MyP@$$w0rd

Now we can go to http://your-ip, in my case http://10.255.50.30 ,and we will see a page showing: "It Works!".
cd /tmp/
wget http://downloads.sourceforge.net/project/playsms/playsms/Version%201.1/playsms-1.1.tar.gz
tar -zxf playsms-1.1.tar.gz -C /usr/local/src
ls -l /usr/local/src/
cd /usr/local/src/playsms-1.1/
cp install.conf.dist install.conf
nano install.conf
Copy install.conf.dist to install.conf and edit install.conf

Read install.conf and make changes to suit your system configuration.
I've edited the file, so it looks like this:
 
# INSTALL DATA
# ============


# Please change INSTALL DATA below to suit your system configurations

# Please do not change variable name, you may change only the value

# MySQL database username
DBUSER="root"

# MySQL database password
DBPASS="MyP@$$w0rd"

# MySQL database name
DBNAME="playsms"

# MySQL database host
DBHOST="localhost"

# MySQL database port
DBPORT="3306"

# Web server's user, for example apache2 user by default is www-data
# note: please make sure your web server user
WEBSERVERUSER="www-data"

# Web server's group, for example apache2 group by default is www-data
# note: please make sure your web server group
WEBSERVERGROUP="www-data"

# Path to playSMS extracted source files
PATHSRC="$(pwd)"

# Path to playSMS web files
# note: please make sure your web root path, in this example its /var/www/html
PATHWEB="/var/www/html/playsms"

# Path to playSMS additional files
PATHLIB="/var/lib/playsms"

# Path to playSMS daemon and other binary files
PATHBIN="/usr/local/bin"

# Path to playSMS log files
PATHLOG="/var/log/playsms"


# END OF INSTALL DATA
# ===================
Now Run:
./install-playsms.sh

Press Y if everything looks OK.

Now we want to make sure playsms starts on boot by adding a line into rc.local file.

nano /etc/init.d/rc.local
Add following to the file: /usr/local/bin/playsmsd start
on the bottom of the file (before exit if there's an exit command).
This way playsmsd will start automatically on boot.
..
/usr/local/bin/playsmsd start

Edit the apache vhost file:

nano /etc/apache2/sites-available/default

My vhost file looks like this:
 
 ServerAdmin webmaster@localhost

        DocumentRoot /var/www/html/playsms
        
                Options FollowSymLinks
                AllowOverride None
        
        
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <directory "="" usr="" lib="" cgi-bin"="">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

Now reload the Aapache2 configuration to apply the changes.
service apache2 reload

Then you should be able to access the playsms website at following url:

Go to http://your-ip etc. http://10.255.50.30
You can login with:

username: admin
password: admin

Gateway - SMS Server Tools 3

First we install build tools to build the latest version. Run:

apt-get install build-essential libusb-1.0 libusb-1.0-0-dev


Now I have plugged in the Huawei E3131 modem, and I can see it listed with

lsusb:
lsusb
lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 12d1:14fe Huawei Technologies Co., Ltd.
We would like it to be with ID: 12d1:1506, but it's detected with 12d1:14fe right now.

To change this, we install usb_modeswitch to the system, you can grab the latest version from here:

http://www.draisberghof.de/usb_modeswitch/#download
cd /tmp
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-2.2.5.tar.bz2
tar jxvf usb-modeswitch-2.2.5.tar.bz2
cd usb-modeswitch-2.2.5
make install
cd /tmp
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20150627.tar.bz2
tar xjvf usb-modeswitch-data-20150627.tar.bz2
cd usb-modeswitch-data-20150627
make install

Now unplug the modem, and plug it in again, then run:

lsusb
 lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 006: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard

Now we got the desired mode: 12d1:1506.
Next we proceed with SMS Server Tools 3.
First we download it, then unpack it and install it.

cd /usr/local/src
wget http://smstools3.kekekasvi.com/packages/smstools3-3.1.15.tar.gz
tar -zxvf smstools3-3.1.15.tar.gz
cd smstools3
make

If you see an error like in my case, when you run make:
 
make
cd src && make -
make[1]: Entering directory '/usr/local/src/smstools3/src'
Makefile:51: *** recipe commences before first target.  Stop.
make[1]: Leaving directory '/usr/local/src/smstools3/src'
Makefile:10: recipe for target 'compile' failed
make: *** [compile] Error 2

Then do following:

nano src/Makefile

The problem is a missing tab, now look for:
 
ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS)))
override LFLAGS += -lsocket -lnsl
endif

And move the line override LFLAGS += -lsocket -lnsl with a TAB
ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS)))
        override LFLAGS += -lsocket -lnsl
endif

And try to run make again:
make
make install
Now we create some required folders:
mkdir -p /var/log/sms/stats
mkdir -p /var/spool/sms/{checked,failed,incoming,outgoing,sent}
mkdir /var/spool/sms/modem1
chown www-data:www-data -R /var/spool/sms
chmod 777 -R /var/spool/sms

And then move the original configuration file and download a sample from PlaySMS:
mv /etc/smsd.conf /etc/smsd.conf.dist
cd /tmp
wget -c https://raw.githubusercontent.com/antonraharja/playSMS/master/contrib/smstools/smsd.conf
cp smsd.conf /etc/

To make sure I always will use the correct device, I will use a dynamic device file.

Read more about dynamic device files at following URL: http://antonraharja.com/2015/05/14/persistent-paths-for-dynamic-device-file/
nano /etc/udev/rules.d/80-ttyusb-map.rules
ACTION=="add", KERNEL=="ttyUSB[0-9]*", PROGRAM="/etc/udev/rules.d/ttyusb-map.sh %p", SYMLINK+="gsm%c"
touch /etc/udev/rules.d/ttyusb-map.sh
chmod 755 /etc/udev/rules.d/ttyusb-map.sh
nano /etc/udev/rules.d/ttyusb-map.sh
#!/usr/bin/perl -w

@items = split("/", $ARGV[0]);
for ($i = 0; $i < @items; $i++) {
    if ($items[$i] =~ m/^usb[0-9]+$/) {
        print $items[$i + 1] . "\n";
        last;
    }
}

Now unplug, and replug your modem, and it should be located at /dev/gsm*:
ls -l /dev/gsm*
lrwxrwxrwx 1 root root 7 Jul 24 01:39 /dev/gsm1-1 -> ttyUSB0
lrwxrwxrwx 1 root root 7 Jul 24 01:39 /dev/gsmmodem -> ttyUSB0

I made some changes to the file, so here is my config, my modem is located at /dev/gsm1-1 replace that with your location.
# Global configuration

#devices = modem1, modem2
devices = modem1

loglevel = 5

# logfiles
stats = /var/log/sms/stats
logfile = /var/log/sms/smsd.log

# Default queue directory = /var/spool/sms
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
sent = /var/spool/sms/sent

# do not set report folder, let status report files saved in incoming
#report = /var/spool/sms/report

delaytime = 2
errorsleeptime = 10
blocktime = 180
autosplit = 3
#receive_before_send = yes
incoming_utf8 = yes

# Queue configurations

[queues]
modem1 = /var/spool/sms/modem1
#modem2 = /var/spool/sms/modem2

# Modem configurations

# Modem name: modem1
# Modem type: Wavecom USB
[modem1]
#init = AT+CNMI=2,2,0,1,0;+CMEE=1
#init = AT+CPMS="ME","ME","ME"
device = /dev/gsm1-1
baudrate = 19200
incoming = yes
pin = 3391
report = yes
queues = modem1
decode_unicode_text = yes
cs_convert = yes

# Modem name: modem2
# Modem type: Wavecom USB
#[modem2]
#init = AT+CNMI=2,2,0,1,0;+CMEE=1
#device = /dev/ttyUSB1
#baudrate = 115200
#incoming = yes
#report = yes
#queues = modem2

Restart the SMS Server Tools 3:
/etc/init.d/sms3 restart
Verify if SMS Server Tools 3 is running:
ps ax | grep -v grep | grep smsd
Monitor SMS Server Tools 3 log file:
tail -f /var/log/smsd.log


Login and configure smstools in playsms webpanel

Login to your playsms installation my address is http://10.255.50.30/
Username is admin
Password is admin

Now go to Settings => Manage gateway and SMSC.
You should see a screen like this:

Now click to edit the smstools gateway.
And ensure it's setup like this:


Click Save, and when it's saved click back.
Now you have to setup the SMSC, so please select the + sign at SMSTools.
You should fill in the SMSC Details like this, in receiver number write your modem phone number.


When you are done click save.
Now go to Settings => Main configuration
And fill following fields:
Default sender ID
Default prefix or country code

And set Default SMSC to smstools, like shown on the image below.

Click save, we are ready to send first SMS.

Send an SMS

Now go to My account => Compose message
Write your cell phone number in Send To, and a message etc. Hello World! in message field, and click send.
If the message get's queued, you can follow transaction here:
Go to Reports => All sent messages
Incoming messages that are unhandled is kept in sandbox, you will this in Reports => Sandbox
And log if something doesn't is located in Reports => View log

If you have any trouble with your setup, a good place seek some help is playsms forum.

Sabtu, 11 Juli 2015

The package management system on Ubuntu makes it extremely simple to install and remove packages, but sometimes it’s important to figure out what version of a particular package that you actually have installed.
The apt-get utilities are simply a front-end to the debian dpkg utility, which actually does the real work. You can use this utility to figure out what version is installed.
dpkg -s <packagename>
Here’s an example, where I was trying to figure out what version of Ruby I had installed on my system:
geek@ubuntuServ:~$ dpkg -s ruby1.8
Package: ruby1.8
Status: install ok installed
Priority: optional
Section: interpreters
Installed-Size: 272
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Architecture: i386
Version: 1.8.4-5ubuntu1.2
Depends: libc6 (>= 2.4-1), libruby1.8 (>= 1.8.4)
Suggests: ruby1.8-examples, rdoc1.8, ri1.8
Description: Interpreter of object-oriented scripting language Ruby 1.8
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in perl). It is simple,
straight-forward, and extensible.
.
This package provides version 1.8 series of Ruby.
.
On Debian, Ruby 1.8 is provided as separate packages. You can get
full Ruby 1.8 distribution by installing following packages.
.
ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp
ruby1.8-examples libdbm-ruby1.8 libgdbm-ruby1.8 libtcltk-ruby1.8
libopenssl-ruby1.8 libreadline-ruby1.8
Original-Maintainer: akira yamada <akira@debian.org>
You can see that I’ve got version 1.8.4 installed.
apt-get
You can run a simulation to see what would happen if you upgrade/install a package:
apt-get -s install <package>
To see all possible upgrades, run a upgrade in verbose mode and (to be safe) with simulation, press n to cancel:
apt-get -V -s upgrade
apt-cache
The option policy can show the installed and the remote version (install candidate) of a package.
apt-cache policy <package>
apt-show-versions
If installed, shows version information about one or more packages:
apt-show-versions <package>
Passing the -u switch with or without a package name will only show upgradeable packages.
aptitude
The console GUI of aptitude can display upgradeable packages with new versions. Open the menu 'Upgradable Packages'. Pressing v on a package will show more detailed version information.
Or on the command-line:
aptitude versions <package>
Passing -V will show detailed information about versions, again to be safe with the simulation switch:
aptitude -V -s install <package>
Substituting install <package> with upgrade will show the versions from all upgradeable packages.

Jumat, 10 Juli 2015

Become a better programmer

Programmers nowadays should all know these 3 very important rules:
  1. Don’t use floating points for money
  2. Store date/time in “UTC” timezone
  3. Always use the “UTF8″ character set
Tom Scott brilliantly explains the above 3 topics in videos that roughly last 10 minutes each. He explains them clearly, with depth and in a passionate way. They are listed below. Start the video’s by clicking on them.

1. Don’t use floating points for money

…never ever…
utf8_video

2. Store date/time in “UTC” timezone

…yes, always…
timezone_video

3. Always use the “UTF8″ character set

…no exceptions…
floating_points_video
IMHO every programmer should watch these videos, because they are very educational. And “Yes”, it will takes you 30 valuable minutes of your precious time. But “No”, you will not regret it, because they teach you some valuable and elementary lessons. Lessons that apply on any software project, written in any programming language.

real_programmers
To convert your Ubuntu 14.04 into a powerhouse for software development for PHP, you need to install some developer tools from the rich set of available software packages. I have made a top 10 of my favorite developer tools.

1) Install Eclipse 3.8 as a complete IDE

Altough everybody I know prefers the JetBrains IDE’s, I am still a sucker for free (as in speech) software. I think Eclipse and the various distributions of Eclipse you can download are just as good, when properly configured.
1
sudo apt-get install eclipse

2) Install Geany 1.23 as a lightweight IDE

I also often find myself using a lightweight IDE. After using way too much “gedit” I have recently (re)discovered “Geany” and I feel it is perfect. With the following commands you install it with a good set of plugins.
1
sudo apt-get install geany geany-plugins
You can find some Geany color schemes on Github that are worth installing as well.
1
2
3
4
5
wget https://github.com/downloads/codebrainz/geany-themes/geany-themes-1.22.2.tar.bz2
tar -xvf geany-themes-1.22.2.tar.bz2
mkdir -p ~/.config/geany/colorschemes/
cp geany-themes-1.22.2/colorschemes/* ~/.config/geany/colorschemes/
rm -Rf geany-themes-1.22.2 geany-themes-1.22.2.tar.bz2

3) Install MariaDB 5.5

MariaDB is the replacement for MySQL now that Oracle has acquired it. This is comparable to the replacement of OpenOffice with LibreOffice after Oracle got their hands on it.
1
sudo apt-get install mariadb-server

4) Install PostgreSQL 9.3

PostgreSQL may be the most powerful database around.
With PostgreSQL 9.2, query results can be returned as JSON data types. Combined with the new PL/V8 Javascript and PL/Coffee database programming extensions, and the optional HStore key-value store, users can now utilize PostgreSQL like a “NoSQL” document database, while retaining PostgreSQL’s reliability, flexibility and performance. (source)
I feel you should always consider using it before choosing any “NoSQL” or “documents-based” database.
1
sudo apt-get install postgresql pgadmin3
Do not forget to set the root (postgres) password.
1
2
3
sudo -u postgres psql postgres
ALTER USER postgres WITH PASSWORD '<password>';
\q

5) Install Apache 2.4 + PHP 5.5 + modules

Install Apache and the default method (mod_php) to serve the new PHP 5.5.
1
sudo apt-get install apache2 libapache2-mod-php5
Install PHP 5 support for MariaDB and PostgreSQL.
1
sudo apt-get install php5-mysql php5-pgsql
Some PHP packages for Symfony development.
1
sudo apt-get install php5-intl php5-sqlite
PHP packages for cURL and XDebug.
1
sudo apt-get install php5-curl php5-xdebug
Optional PHP packages for creating images (GD), doing geolocalization on IP address (GeoIP), encryption and Redis/Memcache caches.
1
sudo apt-get install php5-gd php5-geoip php5-mcrypt php5-redis php5-memcache php5-memcached
Now enable mod_rewrite and restart Apache to make sure everything is loaded.
1
2
sudo a2enmod rewrite
sudo service apache2 restart

6) Install Adminer 4

PhpMyAdmin is a very popular web-based database management tool. Adminer is a drop in replacement that beats it on almost all points. You can install the latest version of Adminer using:
1
2
3
4
5
6
sudo mkdir /usr/share/adminer
sudo wget -O /usr/share/adminer/latest.php "http://www.adminer.org/latest.php"
sudo ln -s /usr/share/adminer/latest.php /usr/share/adminer/adminer.php
echo "Alias /adminer.php /usr/share/adminer/adminer.php" | sudo tee /etc/apache2/conf-available/adminer.conf
sudo a2enconf adminer
sudo service apache2 reload
Now go here to run it: http://localhost/adminer.php
In the future you can easily update Adminer using:
1
sudo wget -O /usr/share/adminer/latest.php "http://www.adminer.org/latest.php"

7) Install Git

Install the Git source code versioning system:
1
sudo apt-get install git
Check out this great Git cheat sheet.

8) Install some compilers and build tools

With the following commands you get most common compilers and build tools.
1
sudo apt-get install gcc build-essential libc6-dev autoconf automake

9) Install the Microsoft fonts

There are always people that rely on the standard Microsoft fonts (like Arial). Although this is bad practice and HTML5 allows you to embed fonts, still it may solve some problems to just install these:
1
sudo apt-get install ttf-mscorefonts-installer

10) Upgrade your Office experience

A developer also needs to read or write some documentation or specifications. Libreoffice Writer is IMHO better than the real thing (Microsoft Word).
1
2
sudo apt-get purge gnumeric abiword
sudo apt-get install libreoffice

Feedback?