Walle - 瓦力上线部署系统搭建攻略

实验系统:CentOS 7
实验前提:防火墙和selinux都关闭
实验说明:本实验共有1台主机,IP分配192.168.0.210
实验软件:walle-web-0.9.5  httpd-2.2  mysql-5.5  php-7.0.30
一、基础准备
  1.下载walle-web源码:
mkdir -pv /wallecd /walle wget https: //codeload.github.com/meolu/walle-web/tar.gz/v0.9.5 tar xf v0. 9.5 mv walle-web- 0.9 . 5 walle-web
cd
  2.安装LAMP环境:
yum -y install nginx php php-mysql php-mbstring mysql-server
service httpd start
service mysqld start
  3.加入php页面支持:
vim /etc/httpd/conf/httpd.conf--------------------------------------------->DirectoryIndex index.php index.html index.html.var //增加index.php
  4.mysql创建数据库并修改root密码:
mysql--------------------------------------------->CREATE DATABASE walle;UPDATE mysql.user SET Password=PASSWORD( 123456 ) WHERE User= 'root' ;FLUSH PRIVILEGES;
quit
二、安装walle-web
  1.修改配置文件,连接数据库:
vim /data/www/walle-web/config/local.php---------------------------------------------> 'db' => [ 'dsn' => 'mysql:host=127.0.0.1;dbname=walle' , //数据库地址与库名称 'username' => 'root' , //连接数据库用户 'password' => '123456' , //用户密码 ],
  2.安装composer:
curl -sS https: //getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer
  3.安装vendor:
    可从  http://pan.baidu.com/s/1c0wiuyc  下载,下载完成后解压到项目根目录。
tar xf vendor.tgz mv vendor /data/www/walle-web/
   4.初始化项目:
cd /data/www/walle-web/./yii run/setup //需要回答yes
三、最后的配置
  1.配置nginx的虚拟主机:
server {
listen 80;
server_name 192.168.0.211;
root /walle/walle-web/web;
index index.html 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_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

}

  2.使用浏览器访问http://192.168.0.210测试,用户名和密码均为admin:
    
    
  至此,服务器搭建完毕,感谢观看,谢谢!
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值