An example of a fast, low effort, cross platform CentOS 7 development environment.
Write code, automate, and then rinse and repeat.
- Install Vagrant https://www.vagrantup.com/downloads
- Setup a Hypervisor https://en.wikipedia.org/wiki/Hypervisor
- Get VS-Code https://code.visualstudio.com/
- SSH-Remote addon installed https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh
Your BIOS needs to have support for a Hypervisor, but most do. However this can often be disabled by default, and software is often not good at checking for this. Likely you need to enable VT-x or AMD-V if things seem to fail for no good reason :-)
https://en.wikipedia.org/wiki/X86_virtualization#Hardware-assisted_virtualization
Note for Apple M1 users: these instructions will not work for you. x86 hardware is still fine, but not Apple silicon.
Open a terminal and create the file vagrant_centos7
and then proceed:
export VAGRANT_VAGRANTFILE=vagrant_centos7
vagrant validate vagrant_centos7
vagrant status
vagrant up
vagrant ssh-config
vagrant ssh
You should now be logged into your virtual machine.
If you want to login from another client on your Desktop you can paste the output from ssh-config into your ~/.ssh/config
file.
With VS-Code you can remote into the VM and work from there: https://code.visualstudio.com/docs/remote/ssh
When finished:
exit
vagrant destroy