LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Advice for new linux user in regards to web development build. (https://www.linuxquestions.org/questions/linux-newbie-8/advice-for-new-linux-user-in-regards-to-web-development-build-4175414117/)

graceph 06-30-2012 03:28 AM

Advice for new linux user in regards to web development build.
 
Hi Linuxquestions,

I am new to Linux and wanted to just get some advice from the right people to wrap my head around how this all works. My path so far has been along the lines of "HTML/CSS -> Photoshop/Graphic Design -> CMS/E-commerce". Next I have a burning desire to learn PHP and thus am looking into Linux - you can imagine I have quite a wall of ignorance to overcome being a predominant Windows user.

At the moment I have Fedora 17 installed on a 64Bit older laptop. At this point I've installed the latest updates and a LAMP stack following instructions but I'm hesitant to do too much more before I get some insight into the basics.

I won't ever need to externally view anything on this machine I just want to start learning php/mysql on here and will need to be able to view it through localhost.

So my questions are:

=====

While trying to save a test hello world in gedit to /var/www/html I received an error message in regards to permissions, then while googling that I've been getting a lot of conflicting advice on which method is best to use for this environment so I can quickly edit php/html/css files stored in those locations. I'm a bit confused because I think I don't fully understand the whole user/root/permissions and development-environment/web-environment.

Would you be able to point me to a resource for the setup/access of phpadmin and possibly cpanel?

Could you also please advise me on some reading resources you would recommend for basic Linux knowledge that you think can get me started on right right track.

=====


I would appreciate any insight you can give into this new world I've stepping into. If I left out any necessary information I apologise.

Kind Regards,
Graceph

Mr. Alex 06-30-2012 04:20 AM

Quote:

While trying to save a test hello world in gedit to /var/www/html I received an error message in regards to permissions
httpd has it's own user that accesses files in /var/www/html, so you should give them read permissions for "other". For both dir and files.
Quote:

I'm a bit confused because I think I don't fully understand the whole user/root/permissions
It's really pretty easy once you dive in it.
http://www.comptechdoc.org/os/linux/..._ugfilesp.html
http://www.yolinux.com/TUTORIALS/Lin...ingGroups.html
Quote:

Would you be able to point me to a resource for the setup/access of phpadmin and possibly cpanel?
https://wiki.archlinux.org/index.php/Phpmyadmin (not for Fedora but you might find some similarities)
Quote:

Could you also please advise me on some reading resources you would recommend for basic Linux knowledge that you think can get me started on right right track.
http://www.ee.surrey.ac.uk/Teaching/Unix/
http://www.funtoo.org/wiki/Linux_Fundamentals,_Part_1 (even better)

graceph 06-30-2012 05:59 AM

Hi Mr. Alex,

Thanks a lot for that info it was exactly what I needed, from reading both those I had a go and what I've done is:
# chmod o=rwx /var/www/html/index.php

Is this what you meant when you said set it's permissions to "other"?

I appreciate your input.

P.S. Oh and I get a random error instead now when using gedit to save it comes up with a warning saying it was unable to make a backup but I can save anyway if I want, but it won't save if I try click the button. However I installed my preferred editor sublime text and it saved fine so I'm not worried but I just thought I would note it.

Mr. Alex 06-30-2012 06:11 AM

Yes, you got it right. But you set permissions only for the file in the end of the path. But accessing that file requires permissions for "other" in all the dirs in path so
Code:

chmod o=rwx /var/
chmod o=rwx /var/www/
chmod o=rwx /var/www/html/
chmod o=rwx /var/www/html/index.php

That is explained in all those manuals I gave you links to. If we have file "/var/log/somelog.txt" and "somelog.txt" has permissions for your user to be read but "log/" doesn't have permission to be executed - you won't be able to read "somelog.txt".

P. S. You open that file as "user", not "other". "other" in this case is for Apache (httpd).

Also in order to start with PHP you should setup LAMP properly. Can't say much about Fedora but for Arch is done like this.

pixellany 06-30-2012 06:16 AM

Quote:

Next I have a burning desire to learn PHP and thus am looking into Linux -
Why do you need Linux to learn or use PHP?


Quote:

you can imagine I have quite a wall of ignorance to overcome being a predominant Windows user.
I love it!!! What a picture!! All the Windows users surrounded by a wall of ignorance with armed guards to keep the knowledge out........Anyone remember the movie "Pleasantville"?

Seriously, we can all empathize. To be proficient at Windows, one must learn a bunch of stuff that was designed by either Marketing/Sales, Legal, or Accounting----but certainly not by Efficiency, Productivity or Ergonomics
(The first 3 are the largest departments at MS---each one fills a 20,000 sq ft building. The last 3 departments are in small trailers on the outskirts of town. Most employees in Group I don't know where they are.......;)

Seriously--attempt #2: Yes, to learn Linux, you have to UNlearn Windows.

graceph 06-30-2012 07:00 AM

Quote:

Originally Posted by Mr. Alex (Post 4715644)
Yes, you got it right. But you set permissions only for the file in the end of the path. But accessing that file requires permissions for "other" in all the dirs in path so
Code:

chmod o=rwx /var/
chmod o=rwx /var/www/
chmod o=rwx /var/www/html/
chmod o=rwx /var/www/html/index.php

That is explained in all those manuals I gave you links to. If we have file "/var/log/somelog.txt" and "somelog.txt" has permissions for your user to be read but "log/" doesn't have permission to be executed - you won't be able to read "somelog.txt".

P. S. You open that file as "user", not "other". "other" in this case is for Apache (httpd).

Also in order to start with PHP you should setup LAMP properly. Can't say much about Fedora but for Arch is done like this.

Thank you I've corrected those permissions. That's weird, either Fedora's LAMP setup is really streamlined or the guide I used(http://fedorasolved.org/server-solutions/lamp-stack/) is missing a lot of more advanced steps because that LAMP guide you showed me there has a lot of steps and information that would again help me understand some of this stuff.

I was considering switching to a more common OS like Ubuntu do you think it matters?


=====
=====

Quote:

Why do you need Linux to learn or use PHP?
I don't really need to I more want to, I've been interested for a long time but have just put it off until now. I remember vainly attempting to install redhat a couple years ago without reading any information prior(assuming it was partion>next>next>next like windows of course) and getting stuck at the root/swap section and just giving up in confusion - I have since reassessed lol.

At the moment I have to Edit>Save>FTP>Reload-Page to test anything and I'd prefer to cut out the ftp step even if it's involves other steps - at least I'll be learning.

I've also setup XAMPP, etc on the Windows machine in the past and to be honest it just frustrates me no matter how clean I try keep a Windows machine as soon as I install anything on it, it just slows right down. I don't install any games or junk on my business machine and I try to use lighter applications if I can but by the time I have Microsoft Office(unfortunately libreoffice can't handle some of the larger .CSV I manage sadly),Notepad++,Filezilla,Photoshop,business related crap,etc. I can already notice it slowing down and that's with a fairly good machine and heaps of free space. But yeah, mostly just out of curiosity. :)


Quote:

I love it!!! What a picture!! All the Windows users surrounded by a wall of ignorance with armed guards to keep the knowledge out........Anyone remember the movie "Pleasantville"?

Seriously, we can all empathize. To be proficient at Windows, one must learn a bunch of stuff that was designed by either Marketing/Sales, Legal, or Accounting----but certainly not by Efficiency, Productivity or Ergonomics
(The first 3 are the largest departments at MS---each one fills a 20,000 sq ft building. The last 3 departments are in small trailers on the outskirts of town. Most employees in Group I don't know where they are.......

Seriously--attempt #2: Yes, to learn Linux, you have to UNlearn Windows.
Yeah that's really how it feels, when I am achieving tasks through the terminal in Linux it just feels so natural and satisfying it's a shame that energy wasn't put into learning this system. I'm loving the increase of keyboard use, finally my touch typing is getting the appreciation it deserves.

That's interesting about MS, it shows too, I feel like it just gets so hard to streamline and get efficicent at my daily tasks with the way it's setup no matter how I try to reorganise it. And on top of it all I have to put up with Windows 8 soon.

P.S. I like pleasantville. ;)

Mr. Alex 06-30-2012 12:22 PM

Quote:

Originally Posted by graceph
I was considering switching to a more common OS like Ubuntu do you think it matters?

Yes it matters to some points. In different distributions setting up LAMP server has some minor differences.
As for Ubuntu - try to avoid it to prevent fake frustration. It's so buggy and raw these days, it doesn't even feel like GNU/Linux any more. I would recommend checking out
http://distrowatch.com/table.php?distribution=mepis
http://www.linuxmint.com/download_lmde.php/
http://distrowatch.com/table.php?distribution=pclinuxos
http://distrowatch.com/table.php?distribution=sabayon
These four are OK.

chrism01 07-01-2012 08:24 PM

Quote:

Could you also please advise me on some reading resources you would recommend for basic Linux knowledge that you think can get me started on right right track.
http://rute.2038bug.com/index.html.gz

2 collections of docs
http://www.tldp.org/
www.linuxtopia.org

graceph 07-04-2012 05:33 AM

I have been changing my email over to a new server and missed my subscription emails sorry about the late replies I just remembered to come check - apologies.

Quote:

Yes it matters to some points. In different distributions setting up LAMP server has some minor differences.
As for Ubuntu - try to avoid it to prevent fake frustration. It's so buggy and raw these days, it doesn't even feel like GNU/Linux any more. I would recommend checking out
http://distrowatch.com/table.php?distribution=mepis
http://www.linuxmint.com/download_lmde.php/
http://distrowatch.com/table.php?distribution=pclinuxos
http://distrowatch.com/table.php?distribution=sabayon
These four are OK.
Mr. Alex. That's really interesting I had no idea such variations even existed I'll read up on all of them a bit better and give one a go. I've been experimenting further and I'm starting to get the hang of it, I'm enjoying the change of pace.


Thanks chrism01 those resources are perfect, I can't ask for anything better I appreciate it. :)


All times are GMT -5. The time now is 11:46 AM.