Php development environment setup-laravel framework, apache server, git version control, laravelgit_PHP tutorial

Source: Internet
Author: User
Tags php development environment php editor
Build a php development environment-laravel framework, apache server, git version control, and laravelgit. Php development environment setup-laravel framework, apache server, git version control, laravelgit this article mainly describes how to install the backend php in the development environment before the project, the front end uses grunt to build a self-php development environment-laravel framework, apache server, git version control, laravelgit

This article describes how to install the development environment before the project-the backend is php, and the front end is automatically built using grunt. This section describes how to use apache to run php and install git on windows. It is a bit rough, but the process is complete. please forgive me for any shortcomings.

1. install the Git tool

1) https://github.com registered github account

2. install phpgit-1.9.5-preview20150319.exe

3) set Git user name and email:

$ git config --global user.name "xuhaiyan"$ git config --global user.email "haiyan.xu.vip@gmail.com"

4) SSH key generation process:

1. check whether an ssh key is available (use Git Bash instead of cmd): cd ~ /. Ssh
If no key exists, this folder is not available. If yes, the backup is deleted.

2. generate a key:

$ ssh-keygen -t rsa -C “haiyan.xu.vip@gmail.com”

Press 3 and press Enter. the password is blank.

Your identification has been saved in/home/tekkub/. ssh/id_rsa.
Your public key has been saved in/home/tekkub/. ssh/id_rsa.pub.
The key fingerprint is:
..................

Finally, two files are obtained: id_rsa (private key) and id_rsa.pub (public key)

3. add the key (public key) to ssh: ssh-add file name

Log on to the github account, go to the company project, and click Settings/SSH Keys/Add SSH Key.

5) clone the project code to the local machine (assume that the clone code is to E: \ bd-shop). enter the project code address.

Git clone git@github.com: xxx. git

II. install the php tool

1) install the php Editor: Sublime Text Build 3083x64 Setup.exe

You can also install phpstorm with more powerful functions.

3. install WampServer integration package: wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe (32-bit)

(W: windows system; a: Apache server; m: mysql database; p: php language)

Possible errors: the following dialog box is displayed:

Solution: http://www.microsoft.com/zh-CN/download/details.aspx? Download and install VSU4 \ vcredist_x86.exe at id = 30679 (note that the wamp server is 32-bit, so install x84 instead of x64)

If vcredist_x86.exe cannot be installed, use nginx to start php.

4. change apache configuration and set the Apache server homepage as a company project:

1) C: \ wamp \ bin \ apache \ apache2.4.9 \ conf \ httpd. conf, remove the annotator '#' before LoadModule rewrite_module modules/mod_rewrite.so '#'

2) set the DocumentRoot path to E: \ bd-shop \ public (based on the 5th point in the first section above)

3) change Change

Note: if the installation is correct, but apache cannot be started (Orange is displayed), port 80 is occupied by default. you need to change the port number to a port after port 1024, such as port 8888,8080, the method is as follows:

C: \ wamp \ bin \ apache \ apache2.4.9 \ conf \ httpd. conf,

Change Listen 0.0.0.0: 80 to Listen 0.0.0.0: 8888.

Change Listen [: 0]: 80 to Listen [: 0]: 8888

5. place vendor and. env in the project (E: \ bd-shop );

Vendor is the dependent package of the project. because it is large and slow to download, it is packaged and used directly. It can be handled according to the actual situation.

6. install the node-v0.12.7-x64.msi (to install grunt-cli first install node. js)

7. add node_modules to bd-shop/resource/assets. enable git bash in E: \ bd-shop \ resources \ assets and write it:

npm install -g grunt-cli

After grunt-cli is installed, run the grunt command to build it (note that there is no space between grunt and-cli ).

8. install SQLSRV32.EXE and select C: \ wamp \ bin \ php \ php5.5.12 \ ext in the php installation directory: \ wamp \ bin \ php \ php5.5.12 \ php. in the INI file, add the following two lines of code:

extension=php_sqlsrv_55_ts.dllextension=php_pdo_sqlsrv_55_ts.dll

9. install sqlncli. msi; install msodbcsql. msi (OBDC driver)

10. install Laravel

First install composer(composer-setup.exe), and then follow the steps in the official http://laravel-china.org/docs/5.0/installation.

Note: The preceding path indicates the computer attributes, advanced system settings, environment variables, system variables, and PATH.

This article describes how to install the backend php in the development environment before the project. the front-end adopts grunt for self-development...

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.