Nginx1.5.2 + PHP5.5.1 + MySQL5.6.10 + Phalcon + Thrift + _ MySQL-mysql tutorial

Source: Internet
Author: User
Nginx1.5.2 + PHP5.5.1 + MySQL5.6.10 + Phalcon + Thrift + Composer compile and install in CentOS... Nginx

sudo yum install git gcc make pcre-devel php-devel
========================== The following official installation methods, php installation is not feasible
git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/buildsudo ./install
========================== The above official installation method, php installation is not feasible
If the installation is defined, the php-config directory should be provided; otherwise, phalcon will not be found. it took a lot of time to install it. I went all the way to find information and finally solved the problem. Ah, it's not easy!
git clone git://github.com/phalcon/cphalcon.gitcd /mnt/soft/cphalcon/build/64bits/
/Data/apps/php/bin/phpize ./install./configure --with-php-config=/Data/apps/php/bin/php-config && make && make install
After installing and modifying php. ini, add the following line:
extension=phalcon.so
Restart the php-fpm process.
Finally, install Thrift. I installed 0.9.0.
This is simple
wget http://archive.apache.org/dist/thrift/0.9.0/thrift-0.9.0.tar.gz
tar zxvf thrift-0.9.0.tar.gz
cd thrift-0.9.0
Install Thrift service together if necessary
Install Thrift extensions supported by php
cd /usr/local/src/thrift-0.9.0/lib/php/src/ext/thrift_protocol/
phpize/Data/apps/php/bin/phpize ./configure --with-php-config=/Data/apps/php/bin/phpize && make && make install
Add extension = thrift_protocol.so
Restart the php-fpm process and restart nginx OK ....
Finally, install Composer.
Introduction

Composer is a dependency management tool in PHP. it allows you to declare the libraries that your project depends on, and then it will install these libraries for you in the project.

Dependency Management

Composer is not the package manager. Yes, it actually deals with "packages" or libraries, but it manages them in projects and installs them to a directory in your project (for examplevendor). By default, it does not install anything globally. Therefore, it is a dependency manager.

This idea is not new. Composer is inspired by node npm and ruby bundler. However, PHP does not yet have such a tool.

Composer solves the following problems:

A) you have a project that depends on N multiple databases.

B) some of these libraries depend on other libraries.

C) you declare the library on which you are dependent.

D) Composer find out which packages will be installed and then install them (that is, download them to your project ).

Install

Composer contains two major logical parts: one is used to store packages, and the other is a command line application to help you discover, download, update, and share code.

  1. $ Cd/path/to/my/project
  2. $ Curl-s http://getcomposer.org/installer | php

In the project list, a composer. phar file contains all the logical code line tools. You can run the following code to determine whether the installation is successful.

  1. $ Php composer. phar

After this command is executed, all available commands are displayed.

I personally suggest you use this command:

  1. $ Sudo mv composer. phar/usr/bin/composer

Move this file to the bin directory, which allows you to simplify the command.

  1. $ Composer about

If you are running on Windows, you can download this file and install it through the PHP parser, wherever you are.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.