keskiviikko 12. maaliskuuta 2014

Installing Drupal in VitualBox on Debian. Part 2. Including basic use of Terminal. VICTORY!

Smoke has cleared. And Drupal is now installed in my virtual server. Unfortunately there was no perfect tutorial to be found. I ended up using these two sites:

If you are stuck, Just Google: "How to (insert what you want to do) in Debian"

First one lacks information about packages that need to be installed, and second has some incomprehensible inputs in VirtualHost-files. But sure enough after hours of grinding (16 to be exact) Drupal is on my server and is working. Those hours will teach you about Linux architecture and Debian system. A knowledge of how to use the command prompt and commands are essential. If you are completely new to this, you should look them up. (http://ss64.com/bash/)

Command Prompt (or Terminal) can be found at: Applications > Accessories > Terminal

Be sure to login as system administrator by entering command: su (stands for Super User) and give the administrative password you needed to make in the installation process. This will give you access to root, so your Terminal should now say [root@computername:]. Now you have full access to all the files and right to modify them via Terminal.

For basic navigation, use commands: 

  • ls (to see what is in the current directory)
  • cd [the name of the directory]* (to change directory)
  • cd .. (to go back one folder in the directory tree)
  • mkdir [directory name]* (to create a new folder with given name)
  • rmdir [directory name]* (to remove a folder with given name)
*Do not add those brackets

File editing or making new files:
To avoid using "nano" text editor, I recommend using: sudo gedit [file to open or one you want to make]
This will open the wanted file or a new document in Gedit text editor in current directory. Remember to put [.php | .html | .css] or other file ending if needed.
Gedit is readily installed in your system, if you are using Debian 7

First thing you should do, input into termial the following command: sudo apt-get update
This will update Debian to the latest stable version. Secondly go to the second link and follow at least the packet installing part. That will get you started.

I will not go to detail on how I managed to make the whole thing work, but if you have any questions, please ask me in the comments.

Though changing rights to all of the [var/www/] folders using [chmod -R 777]-command  is a bit extreme and should not be done at any real instance, it got my project working. Since I wanted to install the system only to get authentic test-environment to our service to be, those settings shouldn't harm your process.

If you are using the first link as guidance, I recommend that instead of creating a [mysite] folder, you just paste all of the Drupal extracts into the [var/www/] folder and use localhost address [127.0.0.1]. It removes some of the problems in those pesky VirtualHost-files. And if you are not really setting up a server, and your main idea is just to get it running so you can make a prototype and learn about Drupal. That should be more than enough.

It also helps having friends who knows about Linux-environments. I'm still looking for the ultimate "Drupal in
Debian" -guide. If that can be found, I'll post it here in my blog. Who knows, maybe I'll produce one myself after I get to know this system a bit better.

The feeling of getting this piece of ****( as I referred it to be multiple times during this project) working was a moment of elation and relaxation. All that tenseness build up by constant errors or unexplained walls in process just gone in an instant. When you get to this point, rejoice! Breathe in this feeling! It will keep you going, and get you addicted. The kind of healthy addiction for a feeling of accomplishment. If you don't feel it, you're more than probably working in the wrong field.

You will need patience for your own incompetence (you will never know enough), tenacity to push forward to your goal, and curiousness about the system in whole. That is the toolkit for your future heroics in the field of information technology. So I bid you safe journey to the endless bytes and wish you lightning-fast internet-connection.

If you have any questions, please feel free to ask! Over and out!
-Juho

Ei kommentteja:

Lähetä kommentti