Description
Ok, I want to use a virtual machine with Vagrant and Homestead on my computer to work on my websites in the same context as their production server. That's the all point of using a virtual host isnt it ? To get rid of dependencies conflicts between your host mahcine and your projects requirements.
Example
The production server of my project A needs PHP5.6, i want my virtual
machine to run PHP5.6, while my host machine can run another version
of PHP. Am i right ?
Following Symfony and Homestead documentations, I must run "composer require laravel/homestead" into my project folder to install homestead... which leads to install my project dependencies on my host machine !!
Am I missunderstanding virtual machine purpose or what ?
I guess I could put my project folder into a sub directory, so there would be 2 composer.(json|lock) files, but it breaks my git structure
Homestead is not the virtual machine, but a CLI tool and Vagrant box to setup a virtual machine for PHP projects easily.
It configures Vagrant for you in such a way that you can create virtual machines for your PHP projects easily, it's not the virtual machine itself.
Install homestead as a global Composer dependency (it's just a CLI application) and use the homestead command to configure, start and shutdown the Vagrant virtual machine.
Related
I am trying to remote debug via ssh on an ubuntu host at Ali with no success. I'm using the the latest Rider, 2022.1 EAP 10.
The error is:
Debugger worker was not initialized within 100,000 ms
I’m running Ubuntu 20.04 64bit on Ali Cloud. And one side note: for the following steps from Jetbrains documents, I wasn’t able to succeed:
cd /[application path]/WebApplication to go to the application root folder.
chmod +x ./WebApplication to add the executable bit if needed.
ASPNETCORE_URLS=http://0.0.0.0:5000 ./WebApplication to run the application
WebApplication is a directory, the OS kept complaining it's a directory even after chmod+x. I managed to run the self-contained executable.
It is always better to ask such questions in JetBrains public issue tracker.
This problem should already be fixed in the next Rider versions:
https://youtrack.jetbrains.com/issue/RIDER-76083
I'm using Laravel Homestead as my local development environment on my Linux machine, and learned about excluding folders, which is great to avoid syncing Symfony's cache.
Currently I'm using rsync, with this configuration:
folders:
- map: ~/www/my-symfony-project
to: /home/vagrant/www/my-symfony-project
type: "rsync"
options:
rsync__exclude: ["var/cache"]
I then have to run vagrant rsync-auto from my Homestead directory in order to initiate rsync and get file sync to work.
I was wondering, is there any other way besides rsync to have this feature and not having to run rsync-auto every time I need to boot up my Homestead VM?
I am currently working on a laravel project on my MAC using homestead environment. Am i able to replicate a homestead environment on Ubuntu 14.04.5?
If you want to replicate the homestead environment you need to install this softwares as listed in the docs:
Git
PHP 7.1
Nginx
MySQL
MariaDB
Sqlite3
Postgres
Composer
Node (With Yarn, Bower, Grunt, and Gulp)
Redis
Memcached
Beanstalkd
Mailhog
ngrok
Probably you do not need all of them so remove what you do not use.
To install each software you can try so search in the apt repository and search for a guide con configure each of them.
For a LEMP stack you can try this: https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04
Homestead uses a script called settler that it uses to provision the environment you use in Homestead, the script can be found here:
https://github.com/laravel/settler/blob/master/scripts/provision.sh
I need to deploy IPython Notebook on an Ubuntu remote server.
One solution is to deploy it as a local user, without sudo privileges, on a system where other servers are already running.
The second solution is to setup a new server, and install IPython with sudo privileges.
I'd like to know before to start, if there are some requirements related to the IPython Notebook server deployment that can make solution 1 difficult.
I found these tutorials particularly useful when setting up IPython nbserver:
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch
Running a notebook server
They don't require sudo privileges. You can also try setting up virtualenv to encapsulate the environment to the local user. However, it is necessary to set the port where Notebook can be accessed from the outside, so there can be potential conflict if you're not able to expose ports on the server.
I use Windows 8 and installed Virtualbox so i can access to a Linux (Ubuntu) System.
The most i still did to do this - so at this moment i have a working Virtualbox with Ubuntu 14.04 LTS.
In my case i need this Virtualbox with Linux for meteor.
The problem:
meteor uses nodejs and so i need to have symlinks access (i think its symlinks - i read a few about it)
Reference: How to run meteor app inside an Ubuntu VrtualBox and edit using an editor on a Windows host?
He describes the same problem i have now:
Error: EROFS, read-only file system '/media/sf_Shared/Dropbox/dev_uhurajr/chat/.meteor/local/.build320446.build/programs/server/npm/logging/main/node_modules'
So i tried to enabled Symlinks on my host (windows) this way:
VBoxManage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOURSHAREFOLDERNAME 1
Reference: http://www.ahtik.com/blog/fixing-your-virtualbox-shared-folder-symlink-error/
This works fine! When i check the extradata for my VM the field SharedFoldersEnableSymlinksCreate is on 1
I set this value for 2 folders. The shared folder on Windows and also the name of the shared folder on my Linux VM.
But .. the same problem. The following error occurs everytime meteor tries to write symlinks:
Error: UNKNOWN, unknown error '/media/Projekte/test/.meteor/local/.build320446.build/programs/server/npm/logging/main/node_modules'
So whats the right way to get this working ?
Guessing you were using Virtualbox version after 4.0, please:
Enable symlinks VBoxManage.exe setextradata YOUR_VM VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOUR_SHARED_FOLDER 1
Run VirtualBox 'as admininstrator' on Windows.
Replace the YOUR_VM and YOUR_SHARED_FOLDER with your own value. You can check the value via VBoxManage.exe getextradata YOUR_VM enumerate
VirtualBox enabled symbolic for shared folder since 4.0, it's Windows permissions blocking you. You can either enable the permission for user or simply run VirtualBox as an administrator.
Please to refer the Virtualbox documentation:
Doc updated, please refer to the doc Shared Folders:
Starting with version 4.0, VirtualBox shared folders also support symbolic links (symlinks), under the following conditions:
The host operating system must support symlinks (i.e. a Mac, Linux or Solaris host is required).
Currently only Linux and Solaris Guest Additions support symlinks.
I made a development vm with setup and run scripts.
https://github.com/gfk-ba/meteor-dev-vm
Just put your meteor app in the app directory and follow the instructions in the readme.md