您尚未登录。

楼主 #1 2020-01-23 20:10:27

pythinker
会员
注册时间: 2019-02-12
已发帖子: 215
积分: 215

thinkphp 只能用 Composer 才能安装成功吗?我用git装貌似缺文件, 不知道为什么.

电脑是 Ubuntu 18.04 LTS

sudo apt-get update
sudo apt-get install curl php7.4-cli -y
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
composer create-project topthink/think tp

然后用浏览器打开 http://localhost/tp/public/index.php 正常.

离线

楼主 #2 2020-01-23 22:13:21

pythinker
会员
注册时间: 2019-02-12
已发帖子: 215
积分: 215

Re: thinkphp 只能用 Composer 才能安装成功吗?我用git装貌似缺文件, 不知道为什么.

$
$ sudo composer create-project topthink/think ./
Do not run Composer as root/super user! See https://getcomposer.org/root for details

Installing topthink/think (v6.0.2)
  - Installing topthink/think (v6.0.2): Downloading (100%)
Created project in ./
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 14 installs, 0 updates, 0 removals
  - Installing psr/container (1.0.0): Downloading (100%)
  - Installing topthink/think-helper (v3.1.3): Downloading (100%)
  - Installing psr/log (1.1.2): Downloading (100%)
  - Installing psr/simple-cache (1.0.1): Downloading (100%)
  - Installing topthink/think-orm (v2.0.31): Downloading (100%)
  - Installing symfony/polyfill-php72 (v1.13.1): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.13.1): Downloading (100%)
  - Installing symfony/var-dumper (v4.4.3): Downloading (100%)
  - Installing opis/closure (3.5.1): Downloading (100%)
  - Installing psr/cache (1.0.1): Downloading (100%)
  - Installing league/flysystem (1.0.63): Downloading (100%)
  - Installing league/flysystem-cached-adapter (1.0.9): Downloading (100%)
  - Installing topthink/framework (v6.0.2): Downloading (100%)
  - Installing topthink/think-trace (v1.2): Downloading (100%)
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
symfony/var-dumper suggests installing symfony/console (To use the ServerDumpCommand and/or the bin/var-dump-server script)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
league/flysystem-cached-adapter suggests installing ext-phpredis (Pure C implemented extension for PHP)
Writing lock file
Generating autoload files
> @php think service:discover
Succeed!
> @php think vendor:publish
Succeed!
$
$

安装成功.

离线

楼主 #3 2020-01-23 22:29:04

pythinker
会员
注册时间: 2019-02-12
已发帖子: 215
积分: 215

Re: thinkphp 只能用 Composer 才能安装成功吗?我用git装貌似缺文件, 不知道为什么.

#
# composer create-project topthink/think ./
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Installing topthink/think (v5.1.39)
  - Installing topthink/think (v5.1.39): Loading from cache
Created project in ./
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing topthink/think-installer (v2.0.0): Loading from cache
  - Installing topthink/framework (v5.1.39): Loading from cache
Writing lock file
Generating autoload files
#
#

另外这台也是 Ubuntu18.04 的, 但是只能装 v5.1.39 版本.

离线

楼主 #4 2020-01-23 22:48:24

pythinker
会员
注册时间: 2019-02-12
已发帖子: 215
积分: 215

Re: thinkphp 只能用 Composer 才能安装成功吗?我用git装貌似缺文件, 不知道为什么.

sudo composer create-project topthink/think  ./ 6.0.2

sudo composer create-project topthink/think  ./ 5.1.39

装上 php7之后, 就可以装 thinkphp6了, 最后一个参数指定版本.

离线

楼主 #5 2020-01-23 23:04:00

pythinker
会员
注册时间: 2019-02-12
已发帖子: 215
积分: 215

Re: thinkphp 只能用 Composer 才能安装成功吗?我用git装貌似缺文件, 不知道为什么.

sudo apt-get install php7.4 php7.4-common php7.4-mbstring -y

sudo phpenmod -v 7.4 opcache pdo xml calendar ctype dom exif ffi fileinfo ftp gettext iconv json phar posix readline shmop simplexml sockets sysvmsg sysvsem sysvshm tokenizer xmlreader xmlwriter xsl mbstring 

终于安装成功了:

# sudo composer create-project topthink/think  ./ 6.0.2
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Installing topthink/think (v6.0.2)
  - Installing topthink/think (v6.0.2): Loading from cache
Created project in ./
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 14 installs, 0 updates, 0 removals
  - Installing psr/container (1.0.0): Downloading (100%)
  - Installing topthink/think-helper (v3.1.3): Downloading (100%)
  - Installing psr/log (1.1.2): Downloading (100%)
  - Installing psr/simple-cache (1.0.1): Downloading (100%)
  - Installing topthink/think-orm (v2.0.31): Downloading (100%)
  - Installing symfony/polyfill-php72 (v1.13.1): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.13.1): Downloading (100%)
  - Installing symfony/var-dumper (v4.4.3): Downloading (100%)
  - Installing opis/closure (3.5.1): Downloading (100%)
  - Installing psr/cache (1.0.1): Downloading (100%)
  - Installing league/flysystem (1.0.63): Downloading (100%)
  - Installing league/flysystem-cached-adapter (1.0.9): Downloading (100%)
  - Installing topthink/framework (v6.0.2): Downloading (100%)
  - Installing topthink/think-trace (v1.2): Downloading (100%)
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
symfony/var-dumper suggests installing symfony/console (To use the ServerDumpCommand and/or the bin/var-dump-server script)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
league/flysystem-cached-adapter suggests installing ext-phpredis (Pure C implemented extension for PHP)
Writing lock file
Generating autoload files
> @php think service:discover
Succeed!
> @php think vendor:publish
Succeed!
#

离线

楼主 #6 2020-01-23 23:13:32

pythinker
会员
注册时间: 2019-02-12
已发帖子: 215
积分: 215

Re: thinkphp 只能用 Composer 才能安装成功吗?我用git装貌似缺文件, 不知道为什么.

sudo apt-get remove php5* -y
sudo apt-get install php7.4 php7.4-common php7.4-mbstring -y
a2enmod php7.4

sudo composer create-project topthink/think  ./ 6.0.2

这样终于把 thinkphp 6.0.2 在另外一台Ubuntu18.04 跑起来了.

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn