ozstar wrote:Not sure if I got it correctly, but I did this...
I unzipped 3.0.2.0-OpenCart.zip into /tmp/.
I created with Thunar a /html/ folder in /www/ then the folder opencart in folder html. Was that correct or were they both sub folders of www ?
Not sure about this part.. Do I drag the unzipped opencart files from /tmp/ to what folder, the www, html or opencart?
They were the only upzipped files I recall. Were there more?
Anyway once I get that folder stuff right then I will do the other commands.
If I need correction on the flow, just let me know.
Sorry to mess with your time.
In this case, you have started out with a particularly complex installation. It's not as easy as downloading it from software channel and letting it do all the work. Good Training!
In Linux, folder directory paths are linear. In this case, we are looking at a linear path starting with the folder labeled as "var."
Following the path, we have var/www/html/opencart
The linear path shows "var" folder which contains subfolder "www." Contained within "www" is a folder named "html." Contained within "html" is a folder named "opencart."
Now, let's say that you make a directory that is in folder /etc named "example. That path is /etc/example. Let's say you make another named "example2" that also is in /etc. That path is /etc/example2. It does not mention the folder named 'example" or any other folders that cohabit the /etc folder in its path because they are not directly referenced. The path never moves sideways. It is always linear, starting at the top and moving downward until you reach the referenced file.
Let's say that you have a path /var/www/html/subfolder1/example.txt.
Let's say you open your GUI Thunar and navigate that path and you see that in subfolder1 is also subfolder2. Opening that, you see also "example.txt."
This was not referenced by your path, it is another 'exampl.txt' and you can ignore it. Stick To Your Path. Do not deviate or stop sooner than it tells you to or go further than it tells you to.
Lastly, there is something that CAN confuse on paths: Assumed Path. Let's say that someone tells you to download an image and place it in your ~/Pictures folder. As you can see, that path doesn't look like it makes sense. In this case, the author of the instructions assumes you know the heading of the path without being told. And chances are that by the time you see one, you will know it. In this case, "~" symbol means /home folder. So you already know that the path must be /home/<Your user name folder, we will call it ozstar>/Pictures folder.
So each path is linear and it does not reference other directories that share space within a folder with it. Those directories would have their own path, even if that path is entirely the same until you reach that individual object.
I hope this makes sense. As you can see, this is MUCH more organized and direct than how some OS's do things.
In the guide that Swarfendor posted a link to, we see a command to follow. I will use that as an example, now
- Code:
mkdir -p /var/www/html/example.com
The 'mkdir" means "make directory." This is exactly the same as if you open the file manager in a GUI, you navigate the path to /var/www/html/, right click and select "Create Folder" and then name the folder "example.com"
The "-p" tells the computer that it is instructed to create a path. Rather than creating the directories in stages each folder along with way with multiple commands, the -p allows you to create the directory with one command as a path to the final directory.
Nexxt, the command shows the path to create. Using the -p command, with see that /var already exists. Let's assume /html in the path does not and neither does 'example.com". Then the mkdir command will follow the linear path until it references a directory that does not yet exist and create it and ignore directories in the path that already exist and not create a new one.
The next command shows
- Code:
sudo cp /var/www/html/example.com/{config-dist.php,config.php}
The command 'sudo' is SuperUser Do as in, Superuser Do this task. Sudo means you must use your password to grant Root or Admin privileges.
the 'cp' command means copy.
This can also be done using your GUI of your file manager. Right click and select copy on your original file, navigate to the new directory, right click and select paste.
In these terminal commands, you have much more speed but also much more power. Both the 'mv' and the 'cp' commands (move and copy, respectively) can do more than just move or copy. They also can alter your file if you wish. In this command, you can see that is the case: You are copying the file config-dist.php to the new directory AND renaming it at the same time, to config.php. You can see the advantage of efficiency.
Now, I am going to get ahead of us for a moment and address something new in the guide Swarf linked to that we did not discuss before.
- Code:
sudo nano /etc/nginx/sites-available/example.com
This one can get confusing. What Nano is, is using your text editor in the terminal.
But just as with all the examples above, you can do this using your GUI just as well. It May be easier for you to use the GUI for now, as it is much more familiar with the SAVE button and the Close Button because doing that in terminal the first time is a bit frustrating. Remembering to hold shift when past or copying in terminal when you do not hold shift at any other time and various other things can make it confusing.
In the above command, we navigate in our Elevated file manager to /etc/nginx/sites-available/ directory. We locate the file called "example.com" and open it with Gedit or Mousepad or whatever GUI text editor you are using.
Then make your changes in the familiar way.
So, while commands for the terminal can be fast and powerful, do not fear to deviate from the command line and use a more familiar method as you explore your system and learn how it is structured and organized. You will get the same result (Unless warned ahead of time that it is rare case exception) and you will feel less 'newby' and more in control. It may seem daunting at first, but once you get the hang of it... Like learning to ride a bike or how to drive a Manual car after learning how to drive with an Automatic, you find yourself never wanting to go back to being controlled by the machine, again.
And neverever feel ashamed to ask. Time passes but you are not taking anyones time. As far as being a Newby goes- don't worry about it. So am I.