- 浏览: 2551861 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Laravel PHP Framework(1)Introduction and Installation
Check PHP is on my Local Machine
> php --version
PHP 7.1.16 (cli) (built: Mar 31 2018 02:59:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
I am following the document to do with Laravel 5.6
PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension
> composer --version
Composer version 1.6.5 2018-05-04 11:44:59
Download the installer
> composer global require "laravel/installer"
Make sure it is in the PATH
export PATH=/Users/hluo/.composer/vendor/bin:$PATH
Check the version
> laravel -V
Laravel Installer 2.0.1
List all the command
> laravel list
Laravel Installer 2.0.1
Usage:
command [options] [arguments]
Create a sample project to demo
> laravel new blogdemo
It will create a project with all dependencies in blogdemo directory.
You can find all PHP package from here
https://packagist.org/
Make sublime open current folder
> sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
> subl .
It is pretty easy, that is cool.
> php artisan -V
Laravel Framework 5.6.29
Set Up MySQL 5.7 On MAC
https://dev.mysql.com/downloads/mysql/5.7.html#downloads
Temp password for root t?%VFE>kH4(M
Once we download the mysql server, we can download the MySQL Workbench and MySQL Shell.
In the Workbench, we can start one MySQL instance and reset the root password as we needed.
Then I can use the username and password to login in that console.
> mysql -h localhost -u carl -p
Create the database we need
> create database sillycat;
Grant the permission
> GRANT ALL ON sillycat.* TO sillycat@localhost IDENTIFIED BY '12345678';
Then we can logon on that database easily
> mysql -u sillycat -h localhost -p12345678
Import the data into that database
> mysql -u sillycat -h localhost -p12345678 sillycat </Users/hluo/work/sillycat/docs/sillycat.sql
I got the latest nodeJS environment
> node --version && npm --version
v8.11.3
5.6.0
When I do
> composer install
I got the error message about PHP environment
Problem 1
- Installation request for fgrosse/phpasn1 2.0.1 -> satisfiable by fgrosse/phpasn1[2.0.1].
- fgrosse/phpasn1 2.0.1 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
Problem 2
- Installation request for laravel/horizon v1.2.3 -> satisfiable by laravel/horizon[v1.2.3].
- laravel/horizon v1.2.3 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
Upgrade my PHP
https://php-osx.liip.ch/
> curl -s http://php-osx.liip.ch/install.sh | bash -s 7.2
Add this to the PATH
export PATH=/usr/local/php5/bin:$PATH
> php --version
PHP 7.2.9 (cli) (built: Aug 21 2018 07:42:00) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.9, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.6.1, Copyright (c) 2002-2018, by Derick Rethans
When I go to the directory, I saw the file /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/gmp.so
Find the ini file
> php --ini
Configuration File (php.ini) Path: /usr/local/php5/lib
Loaded Configuration File: /usr/local/php5/lib/php.ini
> sudo vi /usr/local/php5/lib/php.ini
extension=gmp
Problem solved.
Set Up Redis on Local Machine
> wget http://download.redis.io/releases/redis-4.0.11.tar.gz
Unzip the file and go to that directory
> make
> make PREFIX=/Users/hluo/tool/redis-4.0.11 install
> sudo ln -s /Users/hluo/tool/redis-4.0.11 /opt/redis-4.0.11
> redis-cli --version
redis-cli 4.0.11
We can change the redis.conf file to enable all the IP and port
bind 0.0.0.0
Command to run the server
> redis-server
Or
> redis-server ./redis.conf
Verify it is running
> redis-cli -h localhost -p 6379 ping
PONG
References:
https://laravel.com/
https://stackoverflow.com/questions/26402472/open-a-folder-in-sublime-text-3-using-command-line
https://packagist.org/
https://laracasts.com/series/laravel-from-scratch-2017/episodes/2?autoplay=true
Check PHP is on my Local Machine
> php --version
PHP 7.1.16 (cli) (built: Mar 31 2018 02:59:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
I am following the document to do with Laravel 5.6
PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension
> composer --version
Composer version 1.6.5 2018-05-04 11:44:59
Download the installer
> composer global require "laravel/installer"
Make sure it is in the PATH
export PATH=/Users/hluo/.composer/vendor/bin:$PATH
Check the version
> laravel -V
Laravel Installer 2.0.1
List all the command
> laravel list
Laravel Installer 2.0.1
Usage:
command [options] [arguments]
Create a sample project to demo
> laravel new blogdemo
It will create a project with all dependencies in blogdemo directory.
You can find all PHP package from here
https://packagist.org/
Make sublime open current folder
> sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
> subl .
It is pretty easy, that is cool.
> php artisan -V
Laravel Framework 5.6.29
Set Up MySQL 5.7 On MAC
https://dev.mysql.com/downloads/mysql/5.7.html#downloads
Temp password for root t?%VFE>kH4(M
Once we download the mysql server, we can download the MySQL Workbench and MySQL Shell.
In the Workbench, we can start one MySQL instance and reset the root password as we needed.
Then I can use the username and password to login in that console.
> mysql -h localhost -u carl -p
Create the database we need
> create database sillycat;
Grant the permission
> GRANT ALL ON sillycat.* TO sillycat@localhost IDENTIFIED BY '12345678';
Then we can logon on that database easily
> mysql -u sillycat -h localhost -p12345678
Import the data into that database
> mysql -u sillycat -h localhost -p12345678 sillycat </Users/hluo/work/sillycat/docs/sillycat.sql
I got the latest nodeJS environment
> node --version && npm --version
v8.11.3
5.6.0
When I do
> composer install
I got the error message about PHP environment
Problem 1
- Installation request for fgrosse/phpasn1 2.0.1 -> satisfiable by fgrosse/phpasn1[2.0.1].
- fgrosse/phpasn1 2.0.1 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
Problem 2
- Installation request for laravel/horizon v1.2.3 -> satisfiable by laravel/horizon[v1.2.3].
- laravel/horizon v1.2.3 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
Upgrade my PHP
https://php-osx.liip.ch/
> curl -s http://php-osx.liip.ch/install.sh | bash -s 7.2
Add this to the PATH
export PATH=/usr/local/php5/bin:$PATH
> php --version
PHP 7.2.9 (cli) (built: Aug 21 2018 07:42:00) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.9, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.6.1, Copyright (c) 2002-2018, by Derick Rethans
When I go to the directory, I saw the file /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/gmp.so
Find the ini file
> php --ini
Configuration File (php.ini) Path: /usr/local/php5/lib
Loaded Configuration File: /usr/local/php5/lib/php.ini
> sudo vi /usr/local/php5/lib/php.ini
extension=gmp
Problem solved.
Set Up Redis on Local Machine
> wget http://download.redis.io/releases/redis-4.0.11.tar.gz
Unzip the file and go to that directory
> make
> make PREFIX=/Users/hluo/tool/redis-4.0.11 install
> sudo ln -s /Users/hluo/tool/redis-4.0.11 /opt/redis-4.0.11
> redis-cli --version
redis-cli 4.0.11
We can change the redis.conf file to enable all the IP and port
bind 0.0.0.0
Command to run the server
> redis-server
Or
> redis-server ./redis.conf
Verify it is running
> redis-cli -h localhost -p 6379 ping
PONG
References:
https://laravel.com/
https://stackoverflow.com/questions/26402472/open-a-folder-in-sublime-text-3-using-command-line
https://packagist.org/
https://laracasts.com/series/laravel-from-scratch-2017/episodes/2?autoplay=true
发表评论
-
Stop Update Here
2020-04-28 09:00 316I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 476NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 369Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 370Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 337Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 431Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 436Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 374Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 455VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 385Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 478NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 423Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 337Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 247GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 451GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 328GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 314Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 318Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 294Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 312Serverless with NodeJS and Tenc ...
相关推荐
在 `laravel_framework-master` 文件中,我们可以找到一个 Laravel 项目的源码,这包括了项目的配置、模型、控制器、视图、路由、中间件等组成部分。通过学习和研究这个项目,你可以更深入地理解 Laravel 框架的实践...
1. **优雅的语法**:Laravel 采用艺术级的语法设计,如路由定义、控制器定义、模板引擎 Blade 等,使得代码更易读、易写,提高了开发者的编码体验。 2. **Eloquent ORM**:Laravel 提供了 Eloquent 对象关系映射...
Laravel is a clean and classy framework for PHP web development. It helps you to create wonderful applications using simple, expressive syntax. Development should be a creative and enjoyable ...
[只读] Illuminate Redis 组件的子树拆分(参见 laravel/framework)MIT 许可证 (MIT)版权所有 (c) Taylor Otwell特此授予获得此软件和相关文档文件(“软件”)副本的任何人免费许可,以无限制方式处理软件,包括但...
Laravel Up and Running A Framework for Building Modern PHP Apps 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本...
1. **Blade 模板**:Blade 是 Laravel 的模版引擎,支持 PHP 代码直接嵌入,提供了简洁的语法。 2. **本地化**:Laravel 支持多语言,可以轻松实现应用的国际化。 3. **前端脚手架**:Laravel Mix 提供了 Webpack ...
本资源"learning-laravel-framework-spring-2020-2021-sec-b-源码.zip"是针对2020年至2021年春季期间,Laravel框架学习课程的第二部分源码,旨在帮助开发者深入理解并熟练掌握Laravel的高级特性。 1. **路由系统**...
《Laravel: Up and Running A Framework for Building Modern PHP Apps》是由Matthew E. Stauffer所著的书籍,讲述了Laravel框架的使用方法和相关概念。Laravel是一个高级的PHP框架,它提供了构建现代Web应用程序所...
Matt Stauffer—a leading teacher and developer in the Laravel community—delivers a high-level overview and concrete examples to help experienced PHP web developers get started with Laravel right away...
Chatify Laravel软件包这是一个Laravel软件包,用于通过一个命令行向您的应用程序添加完整的实时聊天系统。 要求PHP> = 5.3.2。 Laravel> = 5.4 Pusher Api帐户。 Chatify Laravel软件包这是一个Laravel软件包,可...
综上所述,"Laravel开发-cqrs-es-framework-laravel" 提供了一个框架,使开发者能够在Laravel环境中利用CQRS和ES原则构建更高效、可扩展和可维护的应用程序。通过适配器,这个框架能够无缝地融入Laravel的生态系统,...
The 'Code' books have thousands of readers and are considered by many to be the most effective method of learning the Laravel framework. As always, my books serve as both an introduction for ...