Book Image

Zend Framework 2.0 by Example: Beginner's Guide

By : Krishna Shasankar V
Book Image

Zend Framework 2.0 by Example: Beginner's Guide

By: Krishna Shasankar V

Overview of this book

<p>ZF2 is the latest update to the well-known Zend Framework. This version has considerably eased the process of building complex web applications with minimal development effort using plug and play components. ZF2 also provides a highly robust and scalable framework for developing web applications.</p> <p>"Zend Framework 2.0 by Example: Beginner’s Guide" will guide you through the process of developing powerful web applications using ZF2. It covers all aspects of Zend Framework application development right from installation and configuration; the tasks are designed in a way that readers can easily understand and use them to build their own applications with ease.</p> <p>"Zend Framework 2.0 by Example: Beginner’s Guide" begins with the basic installation and configuration of the Zend Framework. As you progress through the exercises, you will become thoroughly acquainted with ZF2. With this book, you will learn about the basic concepts of building solid MVC web applications using Zend Framework 2.0. The detailed step-by-step instructions will enable you to build functionality such as a group chat, a file &amp; media sharing service, search, and a simple store to name a few. You will also use a wide range of external modules to implement features that are not natively available. By the end of the book, you will be well versed in building complex, functionality-rich web applications using Zend Framework 2.0.</p> <p>"Zend Framework 2.0 by Example: Beginner’s Guide" provides everything that you need for building functionality-rich web applications with simple real world examples and tasks.</p>
Table of Contents (18 chapters)
Zend Framework 2.0 by Example Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – installing MySQL


MySQL Server and Client need to be installed using the following steps; we will be using MySQL as our primary database in this book:

  1. In a standard Ubuntu installation, MySQL can be installed by executing the following command in the shell prompt:

    $ sudo apt-get install mysql-server mysql-client
    
  2. After the installation is complete, MySQL Server will start automatically. To check if MySQL Server is running, run the following command:

    $ sudo netstat -tap | grep mysql
    
  3. The command should give an output that is similar to the following; this means that the MySQL daemon is running:

    tcp     0      0 localhost:mysql     *:*     LISTEN      923/mysqld
    
  4. If, for some reason, MySQL Server is not running, you can start the server by running the restart command:

    $ sudo service mysql restart
    

What just happened?

We have just installed MySQL; we have the LAMP stack ready too. Our next step will be to create a database in MySQL Server.

Note

Since we are using Zend Server, we don't need to install the php5-mysql package. If you are using a stack that doesn't have MySQL support enabled by default, you will have to install the necessary packages manually.

Have a go hero

Having gone through this section, feel free to attempt the task in the following section.

phpMyAdmin

phpMyAdmin is a free, open source web-based database administration tool written in PHP. phpMyAdmin provides a web-based UI to manage MySQL Database Server; add / remove / manage databases, users, privileges; and so on. In this book, we will be using phpMyAdmin as the database Administration Interface for managing our database(s).

Now that we have Apache, PHP, and MySQL installed, our next step will be to create a blank database in MySQL Server.

For doing this, we need to install and configure phpMyAdmin in the Zend Server.

Tip

phpMyAdmin can either be downloaded from http://www.phpmyadmin.net/ or installed from your operating system's repositories.

Installation instructions for phpMyAdmin can be found at the following link:

http://docs.phpmyadmin.net/en/latest/setup.html

In our next task we will be creating a MySQL database, creating users in the MySQL server and also grant them access permissions to connect to the database and perform database operations.