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 |
Tools for PHP developers in Ubuntu 14.04