Lazy Dubuntu Alpha Release
Dec 16, 2014 · 698 words · 4 minute read
Happy to announce Lazy Dubuntu Alpha version with virtual host support. What is new ? We have replaced SmartGit for Git-cola because git-cola is completely open source. In addition, we have added SSMTP to our development environment so e-mails can go out from our ubuntu server. We have added OpenSSH client and server so servers can be accessed from another computer via SSH. As part of the lazy project, we are providing two set of commands new-website and delete-website. These commands are going to help you in creating a new virtual host and removing a virtual host.
How to create a new virtual host ?
sudo new-website newwebsite
# Remember that you can name your virtual host whatever you want, it not necessary to name it newwebsite.
This is going to create and auto-generate a virtual host with the name “newwebsite” and a index.html that said “its works newwebsite”. You can access this on a browser by typing the hostname and the extension .dev. In this case you should be able to access the website by typing newwebsite.dev. In the picture below you can see the process of what new-website does. This will create a new directory on /var/www/hostname
in this case /var/www/newwebsite
. Then, new-website is going to generate a file on apache that contains the necessary configuration to run a virtual host. Finally, new-website is going to add a new host on your /etc/hosts file
.
So now how I can install Drupal ?
After the virtual host is created the Drupal installation should be as a usual installation on Ubuntu. I’m assuming that you already created database using phpmyadmin that it can be found at localhost/phpmyadmin. Open the terminal and follow these steps to set-up the drupal install files.
cd /var/www/newwebsite
###
# Move to working directory.
# Remember that newwebsite can change depends on your hostname. sudo rm index.html
# Remove the test website sudo drush dl drupal-7
# For D8 just change to drush dl drupal-8 cd drupal-7* sudo mv * .[^.]* .. cd ..
###
sudo rm -rf drupal-7*
## Remove unnecessary folder
sudo cp sites/default/default.settings.php sites/default/settings.php sudo chmod a+w sites/default/settings.php sudo chmod a+w sites/default
Too Many Steps If you think these are two many steps for lazy users like us, I agree for that reason we are working on automating these steps for more information please check out this issue Virtual Host Support with Drush.
Now, we need to connect the database with our Drupal files, the faster way to do this is using drush. Assuming that your database is newwebsitedatabase
and your username is newwebsiteuser
and the password is newwebsitepassword
. You can type the following command in our working directory.
drush site-install standard --db-url='mysql://newwebsiteuser:newwebsitepassword@localhost/newwebsitedatabase' --site-name=NewWebsite
You should be able to see something similar to the image below. A success message with the password of the Drupal website.
How to remove a virtual host ?
sudo delete-website newwebsite # Make sure if you are typing the right hostname.
Warning You should be aware that this is going to remove all the files from your website and your virtual host configuration. However, we currently not supporting deleting database on sudo delete-website. We are working on adding this functionality, you can check out this issue Remove Database on delsite.
Pro Tip: If you are lazy you can use newsite instead of new-website and delsite instead of delete-website.
What is going to be next? I have several issues on github based on what is going to be the new features for Lazy Dubuntu. One of them is going to be Nginx support. Nginx is a very powerful server, it’s also an alternative of Apache for this reason, we are going to support Nginx as part of the Lazy Dubuntu project. Another cool feature that will be on Lazy Dubuntu is a website that contains all the information of the server, for more information about it check out this issue localhost website . I have been thinking about moving the Lazy Dubuntu documentation to darryl.ai instead of LazyDubuntu just because the is easier for me to manage.
Do you think this is awesome ? What you think about Lazy Dubuntu alpha ? I will appreciated your feedback.
- Get Your Libraries And Breakpoint Information From The UI
- 4 New CKEditor Plugins For Drupal 8
- Light Skeleton Drupal 8 Release
- My Sessions For DrupalCamp Stanford 2016
- Drupal Console SandCamp Sprinting At The Beach
- Dirty Trick To Style Views Fields in Drupal 8
- Drupal 8 Contrib Releases: Bootstrap Layouts, Light Skeleton and Casper
- Rebuilding DarrylNorris.com Using Drupal 8
- Pokémon and Drupal with Pokéapi
- Light Skeleton - A Simple Theme (MVP)