以上就是给各位分享debian下使用curl创建laravel项目,其中也会对debian安装curl组件进行解释,同时本文还将给你拓展composer创建laravel项目出错怎么办、CURL响应发
以上就是给各位分享debian下使用curl创建laravel项目,其中也会对debian安装curl组件进行解释,同时本文还将给你拓展composer创建laravel项目出错怎么办、CURL响应发送到自定义URL PHP / Laravel、Debian 8 升级到 9 Debian 9 How to upgrade Debian 8 Jessie to Debian 9 Stretch、Debian Tips【在Debian下使用dos2unix、unix2dos、ifconfig、Adobe Flash Player、蓝牙音响等工具】等相关知识,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!
本文目录一览:- debian下使用curl创建laravel项目(debian安装curl组件)
- composer创建laravel项目出错怎么办
- CURL响应发送到自定义URL PHP / Laravel
- Debian 8 升级到 9 Debian 9 How to upgrade Debian 8 Jessie to Debian 9 Stretch
- Debian Tips【在Debian下使用dos2unix、unix2dos、ifconfig、Adobe Flash Player、蓝牙音响等工具】
debian下使用curl创建laravel项目(debian安装curl组件)
不需要提前安装composer,在Linux下,要安装composer,需要先安装PHP环境,如果我们用docker,这样做显然是不必要的,那有没有更简单的方法呢?
那就是使用laravel给我们准备的shell,执行如下命令:
curl -s https://laravel.build/test-app | bash
参考资料
https://laravel.com/docs/9.x/installation#installation-via-composer
composer创建laravel项目出错怎么办
composer/" target="_blank">composer创建
关于composer下创建laravel项目出错的解决办法
Composer是一个依赖管理工具(PHP>5.0),用composer可以用来管理改项目所需要的依赖(”packages” 和 “libraries”),在laravel中会体现在vendor文件夹下。
首先,用composer创建一个laravel项目(要先cd目录):。
1 |
|
其中laravel=5.1.11是版本号,可以模糊规定版本,我输入了5.1.04结果就开始下载5.1.4。接下来是文件夹名(任意名字),至于–prefer-dist,是为了强制使用压缩包,而不是克隆源代码。
接下来在创建项目的时候我遇到了一个问题,就是创建最新的laravel5.3的时候可以正常创建,但是创建laravel5.1的时候提示出错:
1 |
|
下面还有”returned error code 255”等消息,解决办法为:
composer是一个“只要不更新到最新版就很可能出错”的东西,所以要随用随更新。
使用composer命令更新即可,两条都要用
1 2 |
|
然后就可以随意创建任意版本的项目了。
CURL响应发送到自定义URL PHP / Laravel
在使用laravel 8参考链接https://laravel.com/docs/8.x/http-client时使用Http
use Illuminate\Support\Facades\Http;
public function amazon(Request $request)
{
$url = $request->input('link');
$parsed_link = parse_url($url);
$url = 'https://www.amazon.com/s?k=' .$url;
$url=str_replace(' ','+',$url);
$response = Http::get($url)->body(); // body() function will return html of url
echo $response // as it is already html of amazon or do some datamanipulation here
// return view('FrontEnd/amazon/result_page',compact('response'));
}
Debian 8 升级到 9 Debian 9 How to upgrade Debian 8 Jessie to Debian 9 Stretch
How to upgrade Debian 8 Jessie to Debian 9 Stretch
-
1. Objective 2. What‘s New 3. Preparations 4. Jessie Full Upgrade 5. Update Package Repository to Debian Stretch 6. Upgrade to Debian Stretch Simulation 7. Upgrade to Debian Stretch
Objective
This article explains a system upgrade procedure from Debian 8 Jessie Linux to Debian 9 Stretch.What‘s New
Apart from the up to date Linux kernel,Stretch comes with a considerable amount of new and updated software as well as a number of packages had been rendered obsolete:This new release of Debian again comes with a lot more software than its predecessor jessie; the distribution includes over 15346 new packages,for a total of over 51687 packages. Most of the software in the distribution has been updated: over 29859 software packages (this is 57% of all packages in jessie). Also,a significant number of packages (over 6739,13% of the packages in jessie) have for varIoUs reasons been removed from the distribution.
SOURCE:debian.org
Preparations
Given that the Debian is an extremely robust Linux distribution,combined with the fact that there is nothing certain in life,the chances are,that after the upgrade you may end up with a broken system. Therefore,it is necessary to point out that no system upgrade is bulletproof and you should discuss,prepare and possibly test any proper failover or recovery process prior the proposed system upgrade to Debian Stretch. The rule of thumb is,the less software installed on your system,the higher chance for a successful upgrade.The chances for a successful and fully functional upgrade are decreased by a number of 3rd-party packages installed on your current system. From this reason,remove any obsolete standard repository and 3rd-party software before you attempt the upgrade. The command which might be helpful here is:
# aptitude search ‘~o‘
Perform a full backup of data and manual configuration files residing on your current system. For example,these may include but not limited to user home directories,databases,websites,etc. In case you run Debian Linux virtually take a snapshot just in case something goes wrong during the Stretch upgrade.
REFERENCE:
Jessie Full Upgrade
Before we move on with the upgrade,let‘s fully upgrade our current Debian Jessie system:# apt-get update # apt-get upgrade # apt-get dist-upgrade
# dpkg -C
# apt-mark showhold
On Hold
will not be upgraded,which may cause inconsistencies after Stretch upgrade. Before you move to the next part,it is recommended to fix all issues produced by both above commands.
Update Package Repository to Debian Stretch
Now,that we have a current system fully upgraded,it is time to resynchronize the package index files with new Debian Stretch sources. This is done by editing/etc/apt/sources.list
file to include
stretch
package repository. First,make a backup the current
/etc/apt/sources.list
:
# cp /etc/apt/sources.list /etc/apt/sources.list_backup
apt edit-sources
or use your favourite text editor e.g.,
/etc/apt/sources.list
file to include stretch repositories. Simply update keyword
jessie
to
stretch
.
Example:
deb https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
sed
command to automate this tedious task:
# sed -i ‘s/jessie/stretch/g‘ /etc/apt/sources.list
/etc/apt/sources.list
file edit is completed,use
apt-get
command to update packages index:
# apt-get update
Upgrade to Debian Stretch Simulation
Before we hit the UPGRADE button,let‘s useapt
command to see a preview of what we are facing. To do this execute
apt list --upgradable
command in order to get a quick survey of the number of packages to be installed,updated and removed without affecting the system.
# apt list --upgradable
Upgrade to Debian Stretch
We have come to the most exciting part,which is the actual Jessie upgrade to Debian Stretch system. During the upgrade you may be asked:There are services installed on your system which need to be restarted when certain libraries,such as libpam,libc,and libssl,are upgraded. Since these restarts may cause interruptions of service for the system,you will normally be prompted on each upgrade for the list of services you wish to restart. You can choose this option to avoid being prompted; instead,all necessary restarts will be done for you automatically so you can avoid being asked questions on each library upgrade.The choice is about whether you wish the system to restart your services automatically during the system upgrade or you wish to do it manually or after the system is fully upgrade to Stretch. When ready,execute the bellow commands to commence the Debian Stretch upgrade process:
Restart services during package upgrades without asking?
# apt-get upgrade
# apt-get dist-upgrade
At this stage you should have your Jessie Debian Linux system fully upgraded to Debian Stretch. Follow,this guide to
# aptitude search ‘~o‘
Debian Tips【在Debian下使用dos2unix、unix2dos、ifconfig、Adobe Flash Player、蓝牙音响等工具】
unix2dos、dos2unix
想使用unix2dos与dos2unix,需要安装的是tofrodos
su root
apt-get install -y tofrodos
echo -e "alias unix2dos=''todos -u''\nalias dos2unix=''fromdos -d''" >> ~/.bashrc
source ~/.bashrc
完成上述步骤,即可使用unix2dos与dos2unix了。安装好tofrodos以后,PATH下就会新增todos与fromdos两个命令,执行todos -h或者fromdos -h即可查看其用法,你会发现它俩其实是一样的。
ifconfig
想使用ifconfig,需要安装的是net-tools
su root
apt-get install -y net-tools
安装好net-tools以后,就可以使用ifconfig等工具了。
Adobe Flash Player
想要使用adobe flash player plugin for firefox,需要从Adobe Flash Player官网下载.tar.gz文件保存到本地,然后打开终端并切入下载到的这个压缩包所在的目录,执行以下步骤:
tar -zxf ./flash_player_npapi_linux.x86_64.tar.gz #解压
su root #切入root用户身份
cp ./libflashplayer.so /usr/lib/mozilla/plugins/ #把解压出的*.so文件复制到Firefox浏览器的插件所在的目录
cp -r ./usr/* /usr #把解压出来的usr目录下的配置文件复制到/usr目录下
完成上述步骤后,重启Firefox浏览器即可使用Adobe Flash Player插件播放网页视频了。
蓝牙音响
对于拥有蓝牙功能的计算机,想要使用蓝牙音响,需要先打开蓝牙音响进入配对状态,然后打开Debian系统“设置”中的“蓝牙(Bluetooth)”,与蓝牙音响进行连接配对。然后,以root用户身份执行:
apt-get install -y pavucontrol
安装好pavucontrol以后,在Debian系统“设置”>“声音(Sound)”的“输出(Output)”列表中点选蓝牙音响对应的那项即可。最好顺便把蓝牙音响的输出音量稍微调小一点,因为针对新增的音频输出设备的默认初始音量可能接近100%,太响。
图示:
关于debian下使用curl创建laravel项目和debian安装curl组件的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于composer创建laravel项目出错怎么办、CURL响应发送到自定义URL PHP / Laravel、Debian 8 升级到 9 Debian 9 How to upgrade Debian 8 Jessie to Debian 9 Stretch、Debian Tips【在Debian下使用dos2unix、unix2dos、ifconfig、Adobe Flash Player、蓝牙音响等工具】的相关知识,请在本站寻找。
本文标签: