Adding Drupal 8 on the other hand was a whole new challenged in itself as I had to deal with SSH (myself and SSH have never been good friends).
LAMP, Drush 7 (installed via "composer"), Drupal 8 (Setting up DB, settings .php and files permissions).
So here is the walk-through/ tutorial that I created.
Install drupal 8 on google cloud
NOTES;- $ is only for spacing, do do add the $ when in SSH
- When setting up the DB, all the < > parts need to be deleted (example CREATE DATABASE <DBName> should look like CREATE DATABASE DBName).
CREATE NEW PROJECT
- <ProjectName>
CREATE NEW INSTANCE (COMPUTE ENGINE)
- Click to deploy
-LAMP
SETTING UP DRUSH 7
$ sudo su
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
$ sed -i '1i export PATH="$HOME/.composer/vendor/bin:$PATH"' $HOME/.bashrc
$ source $HOME/.bashrc
$ composer global require drush/drush:dev-master
$ drush --version
$ sudo a2enmod rewrite
$ sudo apt-get install php5-curl
$ sudo service apache2 restart
INSTALL DRUPAL 8
$ cd /var/www
$ drush dl drupal-8
$ sudo mv drupal-8.0.0-beta6/* drupal-8.0.0-beta6/.htaccess ./
$ sudo rm -rf drupal-8.0.0-beta6/
SETTING UP DATABASE
$ mysql -u root -p
$ Enter Passord for "root"
$ CREATE DATABASE <DBName>;
$ GRANT ALL PRIVILEGES ON <DBName>.* TO <DBUserName>@localhost IDENTIFIED BY '<DBPassWord>';
$ exit;
SETTINGS.PHP AND PERMISSIONS
....cd into the Drupal 8 directory just created....
$ cd sites/default
$ cp ../example.settings.local.php ./settings.local.php
$ cp default.settings.php settings.php
$ cp default.services.yml services.yml
$ chmod 0666 settings.php services.yml
$ mkdir files
$ sudo chown <user_name_gmail_com>:www-data files
$ chmod 0775 files
Go you your browser (do not exit or close down the SSH box just yet).
It is at this point that one goes to the IP address supplied by you "VM Instance" and complete the Drupal 8 installation through http://123.123.123.123/ (whatever your Google IP is).
Then after browser installation is complete, go back to the SSH box and complete the following.
AFTER WEB INSTALL (SETTINGS.PHP AND PERMISSIONS)
$ chmod 0644 settings.php services.yml
$ cd /var/www/
$ chmod 0755 sites/default
Tested this twice and it has worked twice :) It takes +- 7 minutes all up to complete by following above.
Cheers
James
No comments:
Post a Comment