PHP分享
您现在的位置是:博客主页 > Web教程 > PHP分享

widows下fastadmin命令行安装

By 点想博主 on PHP分享 Time 2019-09-25 from:互联网 96人已围观
简介:    强烈建议使用命令行安装,因为采用命令行安装的方式可以和FastAdmin随时保持更新同步。使用命令行安装请提前准备好Git、Node.js、Composer、Bower环境,我们为Windows下开发者准备了一个简单的视频安装教程( https://www.fastadmin.net/video/install.html ),可跟着教程一步一步安装。Linux下FastAdmin的安装请使用以下命令进行安装。

强烈建议使用命令行安装,因为采用命令行安装的方式可以和FastAdmin随时保持更新同步。使用命令行安装请提前准备好Git、Node.js、Composer、Bower环境,我们为Windows下开发者准备了一个简单的视频安装教程( https://www.fastadmin.net/video/install.html ),可跟着教程一步一步安装。Linux下FastAdmin的安装请使用以下命令进行安装。

安装成功的必要知识点:

如何安装 Composer:https://pkg.phpcomposer.com

win系统gitbush下使用composer:https://beltxman.com/1854.html

Windows 环境下php安装openssl证书:https://beltxman.com/1854.html

Composer 使用:https://learnku.com/articles/15287/composer-use

  1. 克隆FastAdmin到你本地
    git clone https://gitee.com/karson/fastadmin.git
  2. 进入目录
    cd fastadmin
  3. 下载前端插件依赖包
    bower install
  4. 下载PHP依赖包
    composer install
  5. 一键创建数据库并导入数据
    php think install -u 数据库用户名 -p 数据库密码
  6. 添加虚拟主机并绑定到fastadmin/public目录

安装前先看哈环境是否存在:

Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW/www.fastadmin.com/fastadmin (master)
$ node -v
v10.15.3

Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW/www.fastadmin.com/fastadmin (master)
$ npm -v
6.8.0

Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW/www.fastadmin.com/fastadmin (master)
$ npm install bower -g--registry=https://registry.npm.taobao.org
npm WARN deprecated bower@1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN saveError ENOENT: no such file or directory, open 'G:PhpStudyPHPTutorialWWWwww.fastadmin.comfastadminpackage.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'G:PhpStudyPHPTutorialWWWwww.fastadmin.comfastadminpackage.json'
npm WARN fastadmin No description
npm WARN fastadmin No repository field.
npm WARN fastadmin No README data
npm WARN fastadmin No license field.

+ bower@1.8.8
added 1 package from 1 contributor in 7.333s

Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW/www.fastadmin.com/fastadmin (master)
$ bower install
bash: bower: command not found

Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW/www.fastadmin.com/fastadmin (master)
$ npm install -g bower
npm WARN deprecated bower@1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
C:UsersAdministratorAppDataRoamingnpmbower -> C:UsersAdministratorAppDataRoamingnpmnode_modulesbowerbinbower
+ bower@1.8.8
added 1 package from 1 contributor in 9.628s 

安装的时候提示:

$ bower install 

    bash: bower: command not found

淘宝镜像:npm install bower -g--registry=https://registry.npm.taobao.org

安装bower命令:npm install -g bower

常见问题

  1. 如果使用命令行安装则后台管理默认账号是admin,默认密码是123456
  2. 提示请先下载完整包覆盖后再安装,说明你是直接从仓库下载的代码,请从官网下载完整包覆盖后再进行安装
  3. 执行php think install时出现Access denied for user ...,请确保数据库服务器、用户名、密码配置正确
  4. 执行php think install时报不是内部或外部命令? 请将php.exe所在的目录路径加入到环境变量PATH中
  5. 如果提示当前权限不足,无法写入配置文件application/database.php,请检查database.php是否可读,还有可能是当前安装程序无法访问父目录,请检查PHP的open_basedir配置
  6. 如果提示找不到fastadmin.fa_admin表或表不存在,请检查你的MySQL是否开启了支持innodb
  7. 如果在Linux环境中使用的是root账户,bower install执行出错,请尝试添加上--allow-root参数
  8. 如果访问后台右侧空白,请检查资源是否下载完整,可使用bower install多试两次或下载资源包覆盖
  9. 如果composer install失败,请尝试在命令行进行切换配置到国内源,命令如下composer config -g repo.packagist composer https://packagist.laravel-china.org


继续安装:



Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW
$ git clone https://gitee.com/karson/fastadmin.git
Cloning into 'fastadmin'...
remote: Enumerating objects: 7604, done.
remote: Counting objects: 100% (7604/7604), done.
remote: Compressing objects: 100% (2372/2372), done.
remote: Total 7604 (delta 5192), reused 7123 (delta 4898)iB/s
Receiving objects: 100% (7604/7604), 12.46 MiB | 809.00 KiB/s, done.
Resolving deltas: 100% (5192/5192), done.

Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW
$ cd fastadmin

Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW/fastadmin (master)
$ bower install
bower bootstrap-slider#*    not-cached https://github.com/pammacdotnet/bootstrap-slider.git#*
bower bootstrap-slider#*       resolve https://github.com/pammacdotnet/bootstrap-slider.git#*
bower toastr#~2.1.3             cached https://github.com/johnpapa/toastr-bower.git#2.1.3
bower toastr#~2.1.3           validate 2.1.3 against https://github.com/johnpapa/toastr-bower.git#~2.1.3
bower bootstrap#^3.3.7          cached https://github.com/twbs/bootstrap.git#3.4.1
bower bootstrap#^3.3.7        validate 3.4.1 against https://github.com/twbs/bootstrap.git#^3.3.7
bower font-awesome#^4.6.1       cached https://github.com/FortAwesome/Font-Awesome.git#4.7.0
bower font-awesome#^4.6.1     validate 4.7.0 against https://github.com/FortAwesome/Font-Awesome.git#^4.6.1
bower bootstrap-table#~1.11.0   cached https://github.com/wenzhixin/bootstrap-table.git#1.11.1
bower bootstrap-table#~1.11.0 validate 1.11.1 against https://github.com/wenzhixin/bootstrap-table.git#~1.11.0
bower plupload#~2.2.0           cached https://github.com/moxiecode/plupload.git#2.2.1
bower plupload#~2.2.0         validate 2.2.1 against https://github.com/moxiecode/plupload.git#~2.2.0
bower jstree#~3.3.2             cached https://github.com/vakata/jstree.git#3.3.8
bower jstree#~3.3.2           validate 3.3.8 against https://github.com/vakata/jstree.git#~3.3.2
bower jquery#^2.1.4             cached https://github.com/jquery/jquery-dist.git#2.2.4
bower jquery#^2.1.4           validate 2.2.4 against https://github.com/jquery/jquery-dist.git#^2.1.4
bower eonasdan-bootstrap-datetimepicker#~4.17.43           cached https://github.com/Eonasdan/bootstrap-datetimepicker.git#4.17.47
bower eonasdan-bootstrap-datetimepicker#~4.17.43         validate 4.17.47 against https://github.com/Eonasdan/bootstrap-datetimepicker.git#~4.17.43
bower bootstrap-select#~1.11.2                             cached https://github.com/snapappointments/bootstrap-select.git#1.11.2
bower bootstrap-select#~1.11.2                           validate 1.11.2 against https://github.com/snapappointments/bootstrap-select.git#~1.11.2
bower moment#^2.20.1                                       cached https://github.com/moment/moment.git#2.24.0
bower moment#^2.20.1                                     validate 2.24.0 against https://github.com/moment/moment.git#^2.20.1
bower tableExport.jquery.plugin#~1.10.3                    cached https://github.com/hhurz/tableExport.jquery.plugin.git#1.10.7
bower tableExport.jquery.plugin#~1.10.3                  validate 1.10.7 against https://github.com/hhurz/tableExport.jquery.plugin.git#~1.10.3
bower jcrop#~2.0.4                                         cached https://github.com/tapmodo/Jcrop.git#2.0.4
bower jcrop#~2.0.4                                       validate 2.0.4 against https://github.com/tapmodo/Jcrop.git#~2.0.4
bower jquery.cookie#~1.4.1                                 cached https://github.com/carhartl/jquery-cookie.git#1.4.1
bower jquery.cookie#~1.4.1                               validate 1.4.1 against https://github.com/carhartl/jquery-cookie.git#~1.4.1
bower jquery-slimscroll#~1.3.8                             cached https://github.com/rochal/jQuery-slimScroll.git#1.3.8
bower jquery-slimscroll#~1.3.8                           validate 1.3.8 against https://github.com/rochal/jQuery-slimScroll.git#~1.3.8
bower require-css#~0.1.8                                   cached https://github.com/guybedford/require-css.git#0.1.10
bower require-css#~0.1.8                                 validate 0.1.10 against https://github.com/guybedford/require-css.git#~0.1.8
bower Sortable#~1.5.0                                      cached https://github.com/RubaXa/Sortable.git#1.5.1
bower Sortable#~1.5.0                                    validate 1.5.1 against https://github.com/RubaXa/Sortable.git#~1.5.0
bower fastadmin-cxselect#~1.4.0                            cached https://github.com/karsonzhang/fastadmin-cxselect.git#1.4.1
bower fastadmin-cxselect#~1.4.0                          validate 1.4.1 against https://github.com/karsonzhang/fastadmin-cxselect.git#~1.4.0
bower nice-validator#~1.1.1                                cached https://github.com/niceue/validator.git#1.1.4
bower nice-validator#~1.1.1                              validate 1.1.4 against https://github.com/niceue/validator.git#~1.1.1
bower fastadmin-addtabs#~1.0.3                             cached https://github.com/karsonzhang/jquery-addtabs.git#1.0.4
bower fastadmin-addtabs#~1.0.3                           validate 1.0.4 against https://github.com/karsonzhang/jquery-addtabs.git#~1.0.3
bower less#~2.7.1                                          cached https://github.com/less/less.git#2.7.3
bower less#~2.7.1                                        validate 2.7.3 against https://github.com/less/less.git#~2.7.1
bower fastadmin-dragsort#~1.0.0                            cached https://github.com/karsonzhang/fastadmin-dragsort.git#1.0.0
bower fastadmin-dragsort#~1.0.0                          validate 1.0.0 against https://github.com/karsonzhang/fastadmin-dragsort.git#~1.0.0
bower bootstrap-daterangepicker#~2.1.25                    cached https://github.com/dangrossman/bootstrap-daterangepicker.git#2.1.27
bower bootstrap-daterangepicker#~2.1.25                  validate 2.1.27 against https://github.com/dangrossman/bootstrap-daterangepicker.git#~2.1.25
bower requirejs-plugins#~1.0.3                             cached https://github.com/millermedeiros/requirejs-plugins.git#1.0.3
bower requirejs-plugins#~1.0.3                           validate 1.0.3 against https://github.com/millermedeiros/requirejs-plugins.git#~1.0.3
bower fastadmin-citypicker#~1.3.1                          cached https://github.com/karsonzhang/fastadmin-citypicker.git#1.3.1
bower fastadmin-citypicker#~1.3.1                        validate 1.3.1 against https://github.com/karsonzhang/fastadmin-citypicker.git#~1.3.1
bower art-template#^3.1.3                                  cached https://github.com/aui/artTemplate.git#3.1.3
bower art-template#^3.1.3                                validate 3.1.3 against https://github.com/aui/artTemplate.git#^3.1.3
bower fastadmin-selectpage#~1.0.0                          cached https://github.com/karsonzhang/fastadmin-selectpage.git#1.0.1
bower fastadmin-selectpage#~1.0.0                        validate 1.0.1 against https://github.com/karsonzhang/fastadmin-selectpage.git#~1.0.0
bower fastadmin-layer#~3.1.2                               cached https://github.com/karsonzhang/fastadmin-layer.git#3.1.3
bower fastadmin-layer#~3.1.2                             validate 3.1.3 against https://github.com/karsonzhang/fastadmin-layer.git#~3.1.2
bower bootstrap-slider#*                                 download https://github.com/pammacdotnet/bootstrap-slider/archive/master.tar.gz
bower jquery#>=1.9.1                                       cached https://github.com/jquery/jquery-dist.git#3.4.1
bower jquery#>=1.9.1                                     validate 3.4.1 against https://github.com/jquery/jquery-dist.git#>=1.9.1
bower bootstrap-slider#*                                  extract archive.tar.gz
bower bootstrap-slider#*                                 resolved https://github.com/pammacdotnet/bootstrap-slider.git#879a98dcd0
bower moment#>=2.10.5                                      cached https://github.com/moment/moment.git#2.24.0
bower moment#>=2.10.5                                    validate 2.24.0 against https://github.com/moment/moment.git#>=2.10.5
bower tableExport.jquery.plugin#~1.10.3                   skipped file-saver
bower tableExport.jquery.plugin#~1.10.3                   skipped html2canvas
bower tableExport.jquery.plugin#~1.10.3                   skipped jspdf
bower tableExport.jquery.plugin#~1.10.3                   skipped jspdf-autotable
bower es6-promise#>=4.2.4                                  cached https://github.com/components/es6-promise.git#4.2.4
bower es6-promise#>=4.2.4                                validate 4.2.4 against https://github.com/components/es6-promise.git#>=4.2.4
bower moment#>=2.9.0                                       cached https://github.com/moment/moment.git#2.24.0
bower moment#>=2.9.0                                     validate 2.24.0 against https://github.com/moment/moment.git#>=2.9.0
bower toastr#~2.1.3                                       install toastr#2.1.3
bower font-awesome#^4.6.1                                 install font-awesome#4.7.0
bower bootstrap-table#~1.11.0                             install bootstrap-table#1.11.1
bower plupload#~2.2.0                                     install plupload#2.2.1
bower jstree#~3.3.2                                       install jstree#3.3.8
bower jquery#^2.1.4                                       install jquery#2.2.4
bower bootstrap-slider#*                                  install bootstrap-slider#879a98dcd0
bower eonasdan-bootstrap-datetimepicker#~4.17.43          install eonasdan-bootstrap-datetimepicker#4.17.47
bower bootstrap-select#~1.11.2                            install bootstrap-select#1.11.2
bower tableExport.jquery.plugin#~1.10.3                   install tableExport.jquery.plugin#1.10.7
bower jcrop#~2.0.4                                        install jcrop#2.0.4
bower jquery.cookie#~1.4.1                                install jquery.cookie#1.4.1
bower bootstrap#^3.3.7                                    install bootstrap#3.4.1
bower jquery-slimscroll#~1.3.8                            install jquery-slimscroll#1.3.8
bower require-css#~0.1.8                                  install require-css#0.1.10
bower nice-validator#~1.1.1                               install nice-validator#1.1.4
bower fastadmin-cxselect#~1.4.0                           install fastadmin-cxselect#1.4.1
bower Sortable#~1.5.0                                     install Sortable#1.5.1
bower fastadmin-addtabs#~1.0.3                            install fastadmin-addtabs#1.0.4
bower fastadmin-dragsort#~1.0.0                           install fastadmin-dragsort#1.0.0
bower requirejs-plugins#~1.0.3                            install requirejs-plugins#1.0.3
bower fastadmin-citypicker#~1.3.1                         install fastadmin-citypicker#1.3.1
bower bootstrap-daterangepicker#~2.1.25                   install bootstrap-daterangepicker#2.1.27
bower art-template#^3.1.3                                 install art-template#3.1.3
bower fastadmin-selectpage#~1.0.0                         install fastadmin-selectpage#1.0.1
bower fastadmin-layer#~3.1.2                              install fastadmin-layer#3.1.3
bower es6-promise#>=4.2.4                                 install es6-promise#4.2.4
bower less#~2.7.1                                         install less#2.7.3
bower moment#>=2.10.5                                     install moment#2.24.0

toastr#2.1.3 publicassetslibstoastr
└── jquery#2.2.4

font-awesome#4.7.0 publicassetslibsfont-awesome

bootstrap-table#1.11.1 publicassetslibsbootstrap-table

plupload#2.2.1 publicassetslibsplupload

jstree#3.3.8 publicassetslibsjstree
└── jquery#2.2.4

jquery#2.2.4 publicassetslibsjquery

bootstrap-slider#879a98dcd0 publicassetslibsbootstrap-slider

eonasdan-bootstrap-datetimepicker#4.17.47 publicassetslibseonasdan-bootstrap-datetimepicker
├── jquery#2.2.4
└── moment#2.24.0

bootstrap-select#1.11.2 publicassetslibsbootstrap-select
└── jquery#2.2.4

tableExport.jquery.plugin#1.10.7 publicassetslibstableExport.jquery.plugin
├── es6-promise#4.2.4
└── jquery#2.2.4

jcrop#2.0.4 publicassetslibsjcrop

jquery.cookie#1.4.1 publicassetslibsjquery.cookie
└── jquery#2.2.4

bootstrap#3.4.1 publicassetslibsbootstrap
└── jquery#2.2.4

jquery-slimscroll#1.3.8 publicassetslibsjquery-slimscroll

require-css#0.1.10 publicassetslibsrequire-css

nice-validator#1.1.4 publicassetslibsnice-validator
└── jquery#2.2.4

fastadmin-cxselect#1.4.1 publicassetslibsfastadmin-cxselect

Sortable#1.5.1 publicassetslibsSortable

fastadmin-addtabs#1.0.4 publicassetslibsfastadmin-addtabs

fastadmin-dragsort#1.0.0 publicassetslibsfastadmin-dragsort
└── jquery#2.2.4

requirejs-plugins#1.0.3 publicassetslibsrequirejs-plugins

fastadmin-citypicker#1.3.1 publicassetslibsfastadmin-citypicker
└── jquery#2.2.4

bootstrap-daterangepicker#2.1.27 publicassetslibsbootstrap-daterangepicker
├── jquery#2.2.4
└── moment#2.24.0

art-template#3.1.3 publicassetslibsart-template

fastadmin-selectpage#1.0.1 publicassetslibsfastadmin-selectpage

fastadmin-layer#3.1.3 publicassetslibsfastadmin-layer

es6-promise#4.2.4 publicassetslibses6-promise

less#2.7.3 publicassetslibsless

moment#2.24.0 publicassetslibsmoment

Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW/fastadmin (master)
$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 29 installs, 0 updates, 0 removals
  - Installing topthink/think-installer (v1.0.12): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.12.0): Loading from cache
  - Installing paragonie/random_compat (v9.99.99): Loading from cache
  - Installing symfony/polyfill-php70 (v1.12.0): Loading from cache
  - Installing symfony/http-foundation (v3.4.31): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing symfony/psr-http-message-bridge (v1.2.0): Loading from cache
  - Installing guzzlehttp/promises (v1.3.1): Loading from cache
  - Installing ralouphie/getallheaders (3.0.3): Loading from cache
  - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
  - Installing guzzlehttp/guzzle (6.3.3): Loading from cache
  - Installing doctrine/cache (v1.4.4): Loading from cache
  - Installing overtrue/socialite (1.3.0): Loading from cache
  - Installing psr/log (1.1.0): Loading from cache
  - Installing monolog/monolog (1.25.1): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing pimple/pimple (v3.2.3): Loading from cache
  - Installing overtrue/wechat (3.3.33): Loading from cache
  - Installing symfony/options-resolver (v3.4.31): Loading from cache
  - Installing endroid/qr-code (1.9.3): Loading from cache
  - Installing topthink/framework (v5.0.24): Loading from cache
  - Installing topthink/think-captcha (v1.0.8): Loading from cache
  - Installing mtdowling/cron-expression (v1.2.1): Loading from cache
  - Installing phpmailer/phpmailer (v5.2.27): Loading from cache
  - Installing karsonzhang/fastadmin-addons (1.1.10): Loading from cache
  - Installing overtrue/pinyin (3.0.6): Loading from cache
  - Installing markbaker/complex (1.4.7): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing phpoffice/phpspreadsheet (1.5.2): Loading from cache
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/psr-http-message-bridge suggests installing nyholm/psr7 (For a super lightweight PSR-7/17 implementation)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
phpmailer/phpmailer suggests installing league/oauth2-google (Needed for Google XOAUTH2 authentication)
phpoffice/phpspreadsheet suggests installing mpdf/mpdf (Option for rendering PDF with PDF Writer)
phpoffice/phpspreadsheet suggests installing dompdf/dompdf (Option for rendering PDF with PDF Writer)
phpoffice/phpspreadsheet suggests installing tecnickcom/tcpdf (Option for rendering PDF with PDF Writer)
phpoffice/phpspreadsheet suggests installing jpgraph/jpgraph (Option for rendering charts, or including charts with PDF or HTML Writers)
Writing lock file
Generating autoload files

Administrator@PC-20190222QKVD MINGW64 /g/PhpStudy/PHPTutorial/WWW/fastadmin (master)
$ 



相关文章
文章评论

( 0 )