walle mysql 配置_walle安装配置

1、安装mysql,并创建walle库

2、安装ansibleyum -y install ansible

3、安装php5.6及相关组件rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

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

yum install php56w-fpm

4、创建walle目录路径mkdir -p /data/www/walle-web

cd /data/www/walle-web

5、git clone walle代码到本地服务器git clone https://github.com/meolu/walle-web.git

6、安装composercurl -sS https://getcomposer.org/installer | php

mv composer.phar /usr/local/bin/composer

7.1、安装vendorcd walle-web

composer install --prefer-dist --no-dev --optimize-autoloader -vvvv

7.2、更改walle 数据库配置

vim /data/www/walle-web/walle-web/config/local.phpreturn [

'components' => [

'db' => [

'dsn'       => isset($_ENV['WALLE_DB_DSN'])  ? $_ENV['WALLE_DB_DSN']  : 'mysql:host=127.0.0.1;dbname=walle',

'username'  => isset($_ENV['WALLE_DB_USER']) ? $_ENV['WALLE_DB_USER'] : 'root',

'password'  => isset($_ENV['WALLE_DB_PASS']) ? $_ENV['WALLE_DB_PASS'] : '123456',

],

8、初始化项目cd walle-web

./yii walle/setup # 需要你的yes

9、安装nginx并配置yum -y install nginx

cd /etc/nginx/conf.d/

vim default.conf

/etc/init.d/nginx startserver {

listen       80;

server_name  localhost; # 改你的host

root /data/www/walle-web/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;

}

}

10、启动php/etc/init.d/php-fpm start

11、修改mail服务器配置

vim /data/www/walle-web/walle-web/config/local.php'mail' => [

'transport' => [

'host'       => isset($_ENV['WALLE_MAIL_HOST']) ? $_ENV['WALLE_MAIL_HOST'] : 'smtp.163.com',     # smtp 发件地址

'username'   => isset($_ENV['WALLE_MAIL_USER']) ? $_ENV['WALLE_MAIL_USER'] : 'zengxxxx@163.com',  # smtp 发件用户名

'password'   => isset($_ENV['WALLE_MAIL_PASS']) ? $_ENV['WALLE_MAIL_PASS'] : 'xxxxx',       # smtp 发件人的密码

'port'       => isset($_ENV['WALLE_MAIL_PORT']) ? $_ENV['WALLE_MAIL_PORT'] : 465,                       # smtp 端口

'encryption' => isset($_ENV['WALLE_MAIL_ENCRYPTION']) ? $_ENV['WALLE_MAIL_ENCRYPTION'] : 'ssl',                    # smtp 协议

],

'messageConfig' => [

'charset' => 'UTF-8',

'from'    => [

(isset($_ENV['WALLE_MAIL_EMAIL']) ? $_ENV['WALLE_MAIL_EMAIL'] : 'zengchengpeng2009@163.com') => (isset($_ENV['WALLE_MAIL_NAME']) ? $_ENV['WALLE_MAIL_NAME'] : '花满树出品'),

],  # smtp 发件用户名(须与mail.transport.username一致)

aba207e6f7dc9a71a2b5c08f16f8b349.png

12、初始登录账号密码

admin/admin

88b4f6ce94e954528bf2feadf1eede6f.png

参考链接:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值