Skip to content

Instantly share code, notes, and snippets.

@dbpolito
Created April 12, 2012 01:51
Show Gist options
  • Save dbpolito/2364163 to your computer and use it in GitHub Desktop.
Save dbpolito/2364163 to your computer and use it in GitHub Desktop.
Configurating an eXtheme LAMP localhost on Ubuntu

Configurating Localhost

Install Apache, MySQL and PHPMyAdmin

sudo apt-get install apache2 mysql-server-5.5 php5 php5-mysql php5-curl php-pear phpmyadmin
sudo cp -Rf /usr/share/phpmyadmin/ /var/www
sudo chown -R www-data. /var/www

Install PHPUnit

sudo apt-get install curl php5-xdebug phpunit

sudo pear channel-update pear.php.net
sudo pear upgrade-all
sudo pear config-set auto_discover 1
sudo pear install pear.phpunit.de/PHPUnit

Enabling Mod Rewrite - Edit AllowOverride to All

sudo cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
sudo gedit /etc/apache2/sites-available/default

Enabling PHP Errors

display_errors = On

sudo gedit /etc/php5/apache2/php.ini

Restarting Apache

sudo /etc/init.d/apache2 restart

Install Git

sudo apt-get install git-core gitk git-gui

Install Sublime Text 2

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text-2-dev
cd ~/.config/sublime-text-2/Packages/
git clone git://github.com/buymeasoda/soda-theme/ "Theme - Soda"
git clone git://github.com/markdotto/sublime-snippets.git
git clone git://github.com/stevemo/Fuel-Sublime-Text-2-Bundle.git fuel-snippets

Add Line on Sublime Text 2 -> Preferences -> Settings - User

"theme": "Soda Dark.sublime-theme"

View > Show Console

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

Opening files with Sublime Text 2

Add these lines at the begining of the file sudo gedit ~/.local/share/applications/mimeapps.list

# SublimeText2 Files
application/x-javascript=sublime-text-2.desktop
application/x-php=sublime-text-2.desktop
text/plain=sublime-text-2.desktop
text/xml=subli-metext-2.desktop
text/css=subli-metext-2.desktop
text/x-sql=sublime-text-2.desktop

Allow Icons on Notifier

gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Wine', 'Update-notifier', 'Skype', 'Shutter']"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment