Home - nodes-cloud/homestead GitHub Wiki

To install PHP7.1

To install Swift3.0

The nhomestead is a fork of the laravel homestead, that is changed a bit to fit our environment.

If you already have the ndev-php7 machine, you will still have the same codebase, but all databases are gone, so remember to make a backup :-) To attach database and apache to your existing code base run "Fix project" from the nodes command

First ensure that you have the following software installed

Vagrant 1.9.1+ and Virtualbox 5.1.10+

You can find them here:

https://releases.hashicorp.com/vagrant/

https://www.virtualbox.org/wiki/Downloads

Install

Clone our fork of homestead

git clone [email protected]:nodes-cloud/homestead.git ~/nhomestead

After this install the script

cd ~/nhomestead
bash init.sh

Start the vagrant machine, if you don't have homestead, it will be downloaded

vagrant up

Then login to your machine

vagrant ssh

Because homestead is setup in a way thats a lot different from our setup, we have a small script to switch our nginx for apache, and a lot of other stuff

wget http://nodesmanager.io/bin/nodes-homestead
chmod +x nodes-homestead
./nodes-homestead

Then run the nodes command as usual

nodes

(In the nodes command run Github Token and Console init) (Tip: You can find your current github token in ~/.ndev-php7/config.yaml)

Logout of the Virtualmachine again (CTRL+D)

Create folder nodes-projects

mkdir ~/nodes-projects

Change ~/.nhomestead/Homestead.yaml

From

#folders:
#    - map: ~/nodes-projects
#      to: /var/www

to

folders:
    - map: ~/nodes-projects
      to: /var/www
      type: nfs

Change ~/.nhomestead/Vagrantfile

Uncomment the following line:

    #config.vm.provision :shell, :inline => "service apache2 start", run: "always"

After this:

vagrant reload
vagrant ssh

Edit php.ini variables:

sudo find /etc/php* -type f -name "php.ini" 2>/dev/null | while read filename; do sudo sed -i 's/upload_max_filesize = [0-9]*[BMG]/upload_max_filesize = -1/' $filename; sudo sed -i 's/post_max_size = [0-9]*[BMG]/post_max_size = -1/' $filename;  sudo sed -i 's/memory_limit = [0-9]*[BMG]/memory_limit = -1/' $filename; grep -E '(upload_max_filesize|post_max_size|memory_limit)' $filename; done 

Setup db

sudo su -
debconf-set-selections <<< "mysql-server-5.7 mysql-server/root_password password nodes09"
debconf-set-selections <<< "mysql-server-5.7 mysql-server/root_password_again password nodes09"
apt-get remove mysql-server
apt-get install mysql-server
dpkg-reconfigure mysql-server-5.7
CTRL+D

mkdir -p /var/nodes/templates && git clone [email protected]:nodes-cloud/templates.git /var/nodes/templates/

Install PHPMyAdmin

PMA_VERSION=4.6.6 && cd /var/www && wget https://files.phpmyadmin.net/phpMyAdmin/$PMA_VERSION/phpMyAdmin-$PMA_VERSION-all-languages.zip && unzip phpMyAdmin-*-all-languages.zip && mv phpMyAdmin-*-all-languages phpmyadmin && rm ./phpMyAdmin-*-all-languages.zip

Setup projects

When you have setup a project, you need to add it to your hosts file, edit it in your favorite editor e.g.:

sudo vim /etc/hosts

Set it up like

192.168.10.15 local-like.st
192.168.10.15 riide.local-like.st
192.168.10.15 baas.local-like.st