一键安装部署代码的神器之安装-----walle(瓦力)

来源:互联网 发布:台达plc编程说明书 编辑:程序博客网 时间:2024/04/28 20:16

以下内容摘自  http://doc.huamanshu.com/ 。如果在安装composer有问题的,请参照

Linux系列软件源码安装之二-----Composer

  http://blog.csdn.net/u012369749/article/details/50436719  
 

1.简洁安装指南

git clone git@github.com:meolu/walle-web.gitcd walle-webvi config/web.php # 设置mysql连接composer install  # 如果缺少bower-asset的话, 先安装:composer global require "fxp/composer-asset-plugin:*"./yii run/setup   # 初始化项目配置nginx/apache的webroot指向walle-web/web

2.最最最详细安装指南

以下安装,均在宿主机(一台配置了LAMP/LNMP的linux机器,并且安装git/svn)上操作,如有问题,详见Q&A。

如果还没有安装php 5.4+环境的,请先安装php5.4+,详情看php 5.6安装。

1.代码检出

mkdir -p /data/www/walle-web && cd /data/www/walle-web  # 新建目录git clone git@github.com:meolu/walle-web.git .          # 代码检出

2.设置mysql连接

vi config/local.php +14'db' => [    'dsn'       => 'mysql:host=127.0.0.1;dbname=walle', # 新建数据库walle    'username'  => 'username',                          # 连接的用户名    'password'  => 'password',                          # 连接的密码],

3.安装composer,如果已安装跳过

curl -sS https://getcomposer.org/installer | phpmv composer.phar /usr/local/bin/composer                # PATH目录

4.安装vendor

cd walle-webcomposer install --prefer-dist --no-dev --optimize-autoloader -vvvv

安装速度慢或失败,可直接下载vendor解压到项目根目录

5.初始化项目

cd walle-web./yii run/setup # 需要你的yes

6.配置nginx/apache

凡是在第7步刷新页面看到50x均是前5步安装不完整,自行检查

凡是在第7步刷新页面看到404均是nginx/apache配置不当,自行检查

nginx简单配置

server {    listen       80;    server_name  walle.compony.com; # 改你的host    root /the/dir/of/walle-web/web; # 根目录为web    index index.php;    # 建议放内网    # allow 192.168.0.0/24;    # deny all;    location / {        try_files $uri $uri/ /index.php$is_args$args;    }    location ~ \.php$ {        try_files $uri = 404;        fastcgi_pass   127.0.0.1:9000;        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;        include        fastcgi_params;    }}

apache简单配置

LoadModule rewrite_module modules/mod_rewrite.soLoadModule php5_module        /usr/lib64/httpd/modules/libphp5.so<FilesMatch \.php$>    SetHandler application/x-httpd-php</FilesMatch><VirtualHost *:80>ServerName walle.*.comDocumentRoot /code/walle-web/webErrorLog logs/dev.-error.logCustomLog logs/dev.-accesslog common    <Directory "/code/walle-web/web">      Options  FollowSymLinks        AllowOverride ALL        Order allow,deny        Allow from all    </Directory></VirtualHost>

7.恭喜:)

访问地址:localhost

当然,可能你配置nginx时的server_name是walle.company.com时,配置本地hosts之后,直接访问:walle.company.com亦可。

0 0
原创粉丝点击