sh Laravel Homestead after.sh脚本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Laravel Homestead after.sh脚本相关的知识,希望对你有一定的参考价值。

#!/bin/sh

# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.

echo "Updating machine software"
locale-gen en_GB.UTF-8

# Updating composer
composer self-update

# Updating and upgrading dependencies
apt-get update && apt-get upgrade -y

# Installing PHPUnit
apt-get install phpunit -y

echo "Configuring extra machine software"

# Adding configuration params to xdebug.ini
xdebug="zend_extension=xdebug.so

xdebug.max_nesting_level=300
xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.remote_port=9000
xdebug.scream=0
xdebug.cli_color=1
xdebug.remote_host=192.168.33.1
xdebug.remote_autostart=1
xdebug.show_local_vars=1
xdebug.idekey=PHPSTORM
xdebug.remote_log=/tmp/xdebug.log
xdebug.remote_handler=dbgp
"
echo "$xdebug" > "/etc/php5/mods-available/xdebug.ini"

# Adding configuration to ~/.profile file
profile='export PHP_IDE_CONFIG="serverName=vagrant"
export XDEBUG_CONFIG="idekey=PHPSTORM remote_host=192.168.33.1 profiler_enable=1"'
echo "$profile" >> "/home/vagrant/.profile"

echo "Disabling/Enabling things that will make this work"

# Disabling Blackfire PHP module
sudo php5dismod blackfire

# Enabling Xdebug PHP module
sudo php5enmod xdebug

# Generating a appliying proper permissions to xdebug log file
sudo touch /tmp/xdebug.log
sudo chown vagrant:vagrant /tmp/xdebug.log
sudo chmod 777 /tmp/xdebug.log

# Restarting PHP-FPM
service php5-fpm restart

以上是关于sh Laravel Homestead after.sh脚本的主要内容,如果未能解决你的问题,请参考以下文章

sh 在Laravel Homestead中安装MSSQL的脚本(阅读评论)

sh Windows上带有SMB的Laravel Homestead(“更快的共享文件夹”)

sh Laravel Homestead配置脚本,包括WP-CLI和AWS-CLI

新的 laravel/homestead 配置中的 GitHub OAuth 令牌的 Composer 错误

基于 Laravel 开发博客应用系列 —— Homestead 和 Laravel 安装器

Homestead 和 Laravel 基础理解