3. What Is This Development Environment?
• In computer programming and software development, the development
environment is the set of processes and programming tools used to
create the program or software product.
• This is where the software is developed. In some situations this could be
the developer’s desktop, in other situations this would be a server shared
by several developers working together on the same project.
• This environment is rapidly updated and contains the most recent
version of the application.
4. Why do we care about this?
• This environment should resemble the production environment as much as possible to prevent
issues were the software acts differently on production.
• New features can be developed without interfering with a live system.
• We want to avoid any development on live to prevent downtime. Once code is stable we can
push the changes live
• Mistakes happen :) One of the biggest advantages is when using virtual machines. Backups can
be made before major changes and be resorted at any time
• When using virtual machines it can be easily shared with another developer to continue
development on.
5. What Do I need to build my Web
Development Environment?
• An Idea (the hard part for some)
• The OS
- Linux, windows, Mac
• A Web server
- Apache, nginx, IIS, lighttd, nodeJS
• Scripting Language
- PHP, ASP, python, Ruby, Javascript
• Database
- MySql, PostgreSql, MSSQL
6. Setting Up a Dev Environment
(the easy way)
• XAMP, MAPP, LAMP and all the rest
• Ideal for beginners or very very lazy people :P
10. Setting Up a LAMP Dev Environment
• Make use of some virtualisation software
- Virtual box, VMWare
- https://www.virtualbox.org/wiki/Downloads
11. Setting Up a LAMP Dev Environment
• Install the OS
- Should try and match your production setup
- Ubuntu Server (Debian), Centos or Fedora (Red Had)
- http://www.ubuntu.com/download/server
12. Setting Up a LAMP Dev Environment
• Install APACHE (web server)
- Ubuntu: sudo apt-get install apache2
- Centos: sudo yum install apache2
13. Setting Up a LAMP Dev Environment
• Install PHP (scripting language)
- Ubuntu: sudo apt-get install php5
- Centos: sudo yum install php5
14. Setting Up a LAMP Dev Environment
• Install MySQL (database)
- Ubuntu: sudo apt-get install mysql-server
- Centos: sudo yum install mysql-server
15. Some more goodies
• For PHP development you should have the following installed as well :)
• CURL
• Composer
- https://getcomposer.org/download/
• GIT
- sudo apt-get install git
- sudo yum install git
16. Configure and Test
• Viewing the default Apache Hello world page
- open localhost in browser to view default page
• How to find and edit the php.ini file
- on the command line “php -i | grep php.ini”
• Testing the PHP setup with a basic phpinfo()
- delete the existing index.html file and create a index.php file
17. IP vs FQDN
• Connecting via IP address or Localhost
• Web server can have multiple sites on same server (shared hosting)
• Apache config and hosts files
18. Using my code with my Dev Environment
• Learn how to use the CLI (command line]
• Stay away from FTP!
• Ssh / SCP is your friend
• Your IDE
- Use phpStorm
19. Some useful links
• http://www.tecmint.com/ubuntu-14-04-server-installation-guide-and-lamp-
setup/