November 17, 2010

Installing Apache, PHP5 and MySQL in Ubuntu


I have been using Java for years. Now, there is an open source PHP project (using CodeIgniter) I need to study and modify. Although I have studied and tried the basics of PHP and CodeIgniter before graduating in college, I already forgot most of it by now. This means I need to study and review the basics and learn some advanced topics, especially those I would need. To start with this, I need to install Apache and PHP. Here are the steps I did to install Apache, PHP and MySQL. I also enumerated the steps I did to map folders outside the /var/www directory.

Installing Apache, PHP and MySQL in Ubuntu

  • Install Apache
  • Open the terminal and execute the command sudo apt-get install apache2. After that, apache will now be installed automatically.

  • Install PHP
  • Open the terminal and execute the command sudo apt-get install php5 libapache2-mod-php5(This installs PHP5).

  • Restart Apache
  • Execute the command sudo /etc/init.d/apache2 restart

  • Test the installation of PHP and Apache
  • Go to the /var/www directory (This is the directory where you should put your PHP files). Create a file, like test.php and add in it. Then open the URL http://localhost/test.php in your web browser. You should see the text "Hello World!". If not, maybe something was wrong in the installation.

  • Installing MySQL
  • Execute the command sudo apt-get install mysql-server

  • Installing php5-mysql
  • Execute the command sudo apt-get install php5-mysql

  • Restart Apache
  • After installing mysql-server and/or php5-mysql, restart the apache server again. Apache, PHP and MySQL are now installed.

Mapping folders outside of the /var/www directory

Instead of using the /var/www for your PHP files and projects, you can use other folders other by mapping the directory in an alias in the configuration file. Open /etc/apache2/conf.d/aliasin your text editor (e.g. sudo gedit /etc/apache2/conf.d/alias). Add the aliases using the syntax "Alias /URL-path /location_of_folder/" where "/location_of_folder/" is the directory of the PHP file/project and "/URL-path/" will be its localhost alias. This example would map /location_of_folder/ to http://localhost/URL-path. Restart Apache after inputting the aliases.


November 5, 2010

The Week in a Post (10/30-11/06)


Another week has passed and it has been another busy one I had not posted anything in this blog. I wanted to update it at least once a week but since I was not able to do so, I am making another "week-in-a-post." This would be the second time I'm doing this, after my blog post for September 30 to October 06. I also noticed that during the last week of the month I have been busy making me unable to update this blog (Or was it just a coincidence?).

I have started with a personal project, CvSEA (CvSU Student Election App). It is an open source app for student elections in CvSU (Cavite State University). It is based from Halalan, the open source voting system being developed and maintained by the UP Linux Users' Group (UnPLUG). I just started the project even if the talks for it with CvSU Naic Campus is still to be formalized. It only has the initial commit for now but development will be continued in the coming days. The project is also hosted in Google Code.

Last November 3, I attended the meetup of the Association of Filipino Java Developers (PinoyJUG) at the G2ix TechBar. The topics discussed were "Common Pitfalls Experienced in Java" by Julz Cutaran and "Dive Into Agile: What Your Scrum Master Didn't Tell You" by Mykol Mallete. This, I think, would be the last meetup of the group this year. I am looking forward to attend more of PinoyJUG's events and meetups next year.

Speaking of user groups, I also had some time updating the list of events and meetups of Google Technology User Group (GTUG) Philippines in its Google Sites page, and in the GTUGs.org chapter page.

Aside from all of these, most of the things that kept me busy is work-related. That's it for now. I need to rest and relax.

October 28, 2010

PinoyJUG November 3 Meetup


The Association of Filipino Java Developers (PinoyJUG) is now back on track again. PinoyJUG had "performance series" meetups before. It started with the February 27 meetup at Orange & Bronze Software Labs ("Introduction to JMeter" by Brian Tan Seng and "RMI Plugin for JMeter" by JM Ibanez). The second and the last was the April 27 meetup at the G2ix TechBar ("Profiling and Heap Analysis" by Franz See and "Client-Side Performance" by Alvin De Leon).

There will be another meetup on November 3 at 7 o'clock in the evening. The topics will be "Common Pitfalls Experienced in Java" by Julz Cutaran and "Dive Into Agile: What Your Scrum Master Didn't Tell You" by Mykol Mallete. It will be held at the G2ix TechBar (5th Floor Orient Square Bldg. F. Ortigas Jr. Road, Ortigas Center, Pasig City).

To register for the meetup, sign-up at http://signappnow.com/sheet/HyAHWMZz.