安装配置:

mysql: http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
yum repolist enabled | grep mysql rm -rf /etc/yum.repos.d/mysql*.config-file-path vim /etc/yum.repos.d/mysql-community.repo
#note the baseurl, centos6 --> el6, view the system version: uname -r
# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql yum install mysql-community-server service mysqld start mysql -uroot -p
create user 'vagrant'@'%' identified by 'vagrant';
grant all privileges on *.* to vagrant@'%'identified by 'password'; PHP:
  .检查当前安装的PHP包
    yum list installed | grep php
如果有安装的PHP包,先删除他们
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
.CentOs .x
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
CentOs .X
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm .运行yum install
yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-bcmath.x86_64 php56w-devel.x86_64 yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64 php70w-bcmath.x86_64 php70w-devel.x86_64
.安装PHP FPM yum install php56w-fpm yum install php70w-fpm
5.service php-fpm start nginx:
rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum install nginx
service nginx start vim /etc/nginx/nginx.conf
#include /etc/nginx/conf.d/*.conf; #去掉行首的#, vim /etc/nginx/conf.d/php-dev.conf
server
{
listen 80;
server_name php-dev.jobstreet.com;
index index.html index.htm index.php;
root /var/www/html; location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
} PHP Demo: 注意开启 service php-fpm start

php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
    php composer-setup.php
    php -r "unlink('composer-setup.php');"
    mv composer.phar /usr/local/bin/composer

composer dump-autoload
 
    php artisan make:auth
    php artisan migrate
    php artisan make:model Article
    php artisan make:migration create_article_table
    php artisan make:seeder ArticleSeeder
    php artisan db:seed

附nginx配置laravel:

server {
listen ;
server_name php-dev.jobstreet.com;
set $root_path '/workspaces/hello-php/laravel/public';
root $root_path; index index.php index.html index.htm; try_files $uri $uri/ @rewrite; location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$;
} location ~ \.php { fastcgi_pass 127.0.0.1:;
fastcgi_index /index.php; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
} location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
} location ~ /\.ht {
deny all;
}
}

最新文章

  1. tornado 学习笔记16 HTTP1Connection
  2. Windows Setup progject : 修改默认安装路径
  3. pedestal-工作记
  4. NGUI 学习笔记实战之二——商城数据绑定(Ndata)
  5. c#部分---递归题目;猴子摘桃
  6. 如何撰写SCI论文的讨论部分?——经典结构 – 俗称“倒漏斗型。
  7. Min Edit Distance
  8. atoi函数的实现(考虑不同进制、溢出)
  9. Atitit.Gui控件and面板----web server区----- web服务器监控面板and控制台条目
  10. oracle在desc表时,name 和type列不能格式化问题(占位过长)
  11. ggplot2 theme相关设置—矩形设置(rect)
  12. Bootstrap 在手机页时,导航下拉自动回收
  13. Redis 攻击还原Linux提权入侵的相关说明
  14. 吴恩达机器学习笔记49-主成分分析问题(Principal Component Analysis Problem Formulation)
  15. 微信小程序+微信管理后台+微信用户前台
  16. 拉普拉斯平滑处理 Laplace Smoothing
  17. BZOJ1179或洛谷3672 [APIO2009]抢掠计划
  18. python测试开发django-40.模型(model)中choices使用
  19. 【错误记录】flask mysql 死锁
  20. k序列和

热门文章

  1. hash扩展攻击本地实验
  2. Aaja.pro 未定义
  3. 【Linux相识相知】计算机的组成、linux发行版和哲学思想、基础命令和目录结构(FHS)
  4. python搭建本地服务器
  5. django内置组件——ContentTypes
  6. javascript统计一个字符在一段字符串出现次数
  7. 【代码笔记】Java文件的输入输出(1)——Java.io包的初步理解
  8. nodejs进阶(7)—async异步流程控制
  9. Python爬虫实战:将网页转换为pdf电子书
  10. css 简单梯形