Page 4 of 5

Posted: Thu Dec 28, 2006 5:05 pm
by RobertGonzalez
The Ninja Space Goat wrote:do I need a C compiler to install apache? :?
There should be an easy way to install onto your system. At the very least, you should be able to download the source and do

Code: Select all

./configure
make
make test
make install
make clean

Posted: Thu Dec 28, 2006 5:13 pm
by John Cartwright
http://ubuntuguide.org/wiki/Ubuntu_Edgy ... TTP_Server

This guide is usually a one stop resource for all your ubuntu installation questions.

Posted: Thu Dec 28, 2006 5:45 pm
by nickvd
If you want to compile your own stuff, you will need to install the "build-essential" package.

console: sudo apt-get install build-essential

Posted: Sat Dec 30, 2006 7:09 pm
by Luke
alright I've got php5, apache2 and mysql5 installed now, but when I try to edit the php.ini file, it tells me it's read-only. So I went to the file and tried to change its permissions, but it told me I'm not the owner. Who is? :?

Posted: Sat Dec 30, 2006 7:17 pm
by John Cartwright
The Ninja Space Goat wrote:alright I've got php5, apache2 and mysql5 installed now, but when I try to edit the php.ini file, it tells me it's read-only. So I went to the file and tried to change its permissions, but it told me I'm not the owner. Who is? :?
how are you trying to edit the file? You need to be root to do be able to use the GUI to edit files, and by default you will be unable to log in as root. Instead, you insert "sudo" infront of your terminal line commands. Try:

Code: Select all

sudo gedit /etc/php5/apache2/php.ini

Posted: Sat Dec 30, 2006 7:17 pm
by Luke
:-D Thanks... that did the trick.

Posted: Sat Dec 30, 2006 7:51 pm
by RobertGonzalez
Remember, Security is like top priority in Linux. Almost anything you want to do that involves the system will require root level admin rights. And make sure the as soon as you are done handling the root level work that you

Code: Select all

#>exit
to get back to your regular user.

Posted: Sat Dec 30, 2006 8:00 pm
by Luke
well how do I write all of my php files to my apache server root directory if I don't have write permission on it? I'm confused. :?

Like in my windows set up, I could just open/save/close the files that were in my server's root directory with eclipse... how do I do that in linux?

Posted: Sat Dec 30, 2006 8:06 pm
by Chris Corbyn
sudo <whatever command here>

The first time you do that it asks for a password, subsequent times in the same session do not require a password.

If you really wanted to, you could change the permissions of the webroot too. I always use virtual hosts and make directories under /srv/www/<website> anyway.

Posted: Sat Dec 30, 2006 9:12 pm
by Luke
for right now, how do you change the permissions to the webroot? I just spent about 30 minutes trying to set up a virtual host and now I'm just annoyed and getting impatient. I'll have to figure that out another time. :(

Posted: Sun Dec 31, 2006 12:11 am
by nickvd
(as root) chown nickvd.nickvd files

chown <user> . <group> <files>

IIRC ubuntu creates a group for each user the same as their login name.

As your own user: sudo chown nickvd.nickvd files

(sudo: SuperUser DO)

Posted: Sun Dec 31, 2006 7:25 am
by Chris Corbyn
nickvd wrote:(as root) chown nickvd.nickvd files

chown <user> . <group> <files>

IIRC ubuntu creates a group for each user the same as their login name.

As your own user: sudo chown nickvd.nickvd files

(sudo: SuperUser DO)
Do that as recursive by using the "-R" flag.

You can also create a new group called something like "webmasters" and give that group write permissions to the webroot, then add yourself to the group:

Code: Select all

groupadd webmasters
chgrp -R webmasters /path/to/webroot
chmod -R g+rws /path/to/webroot
usermod -G webmasters <your-username>

Posted: Sun Dec 31, 2006 9:42 am
by RobertGonzalez
I thought ownership change was delimited by a colon, not a dot (or is the dot acceptable too?).

Code: Select all

chown -R user:group
Another thing you can do too Ninja is get help at the MAN pages by using the 'man' command in conjunction with your command you want information on. And I know on RedHat, I can type the command followed by '--help' to get some more information on that command as well.

Posted: Sun Dec 31, 2006 11:14 am
by Chris Corbyn
Everah wrote:I thought ownership change was delimited by a colon, not a dot (or is the dot acceptable too?).

Code: Select all

chown -R user:group
Another thing you can do too Ninja is get help at the MAN pages by using the 'man' command in conjunction with your command you want information on. And I know on RedHat, I can type the command followed by '--help' to get some more information on that command as well.
Colons and dots work fine. --help, -h and just ignoring passing any arguments are common ways to work out how to do things :)

I will say this: Understanding user permissions, groups and how processes need to run under a certain userid is a fairly big part of understanding your linux system and troubleshooting potential problems.

Posted: Mon Jan 01, 2007 5:39 pm
by Luke
yea and one of the biggest reasons for making the switch is to learn all about linux so that when we get a linux box at my work and start hosting our own site, I will know how to administrate it (or at least help administrate it). I should probably learn these things, but for now I need to work on some php stuff so I need to have read/write access to the files and I need to do it the easy way. I fully intend on learning as much as possible about linux and ubuntu, and I thank you guys for being so helpful :D

Although right now linux is strange and difficult for me, I am really enjoying learning about it and I really like it so far. :)