Ubuntu LAMP setup Help!

  • onlyican.com
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Nov 20, 2005
  • Posts: 1589
  • Loc: Hants, UK
  • Status: Offline

Post October 9th, 2007, 4:01 am

Hey all.

I am good at programming, but when it comes to installing or Linux, I am a baby.

I just purchased a very nice laptop from Dell, with Ubuntu 7.04 installed.
No offence but I HATE Micro N Soft.

ANyway

I am a PHP Programmer, so looking to install everything on my laptop and get to work.

I have looked around but everything is either too technical or based for Servers, this is not a server, I want to set up a localhost.

Can anyone assist me on this.

Thanks
Heal your mind, and the body will follow
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post October 9th, 2007, 4:01 am

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post October 9th, 2007, 4:37 am

Bookmark this page.
http://packages.ubuntu.com/feisty/

If you look in the web section you'll find all kinds of usefull packages.

Rather than retype it, here's my blog entry from when I installed apache2, php5, mysql5, & cURL.
Strong with this one, the sudo is.
  • onlyican.com
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Nov 20, 2005
  • Posts: 1589
  • Loc: Hants, UK
  • Status: Offline

Post October 9th, 2007, 5:34 am

Wow that was easy.

I am used to Windows.
I work in the folder on the local machine and just created new files and folders within the folder www

I can't seem to do this.

How do I create new files and save files to the directory.
Heal your mind, and the body will follow
  • onlyican.com
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Nov 20, 2005
  • Posts: 1589
  • Loc: Hants, UK
  • Status: Offline

Post October 10th, 2007, 1:11 am

I have sorted out the permission problem

For people who need.

Open Terminal

Type
Quote:
sudo nautilus

Then type your password.

This opens a File Browser, Navigate to your folder, but as Root owner.
Right click on the folder and select Permissions
Change the owner to your user.
Heal your mind, and the body will follow
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post October 10th, 2007, 1:25 am

Another way to change ownership, but from just the terminal, is like so
Code: [ Select ]
sudo chown user:group /path/to/folder/or/file


or to change permissions
Code: [ Select ]
sudo chmod 0777 /path/to/folder/or/file


These two will come in handy as well
Code: [ Select ]
chown --help
chmod --help
  1. chown --help
  2. chmod --help
  • onlyican.com
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Nov 20, 2005
  • Posts: 1589
  • Loc: Hants, UK
  • Status: Offline

Post October 10th, 2007, 6:24 am

Cheers mate, lost count how many pints I owe you, I think you can get very drunk every night of the month at my expense at the moment.
Heal your mind, and the body will follow
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Joined: Jul 20, 2007
  • Posts: 3318
  • Loc: Trout Creek, MT
  • Status: Offline

Post October 10th, 2007, 6:44 am

onlyican.com wrote:
I have looked around but everything is either too technical or based for Servers, this is not a server, I want to set up a localhost.


Technically, this is going to be a server, but you'll be viewing everything from the local machine (http://127.0.0.1 or http://localhost). It is a server because your PHP is a server-side scripting, you are just using one computer instead of a computer, a network, and a seperate webserver.
Like Mr Spork, I also write about my interest in alcoholic beverages.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Joined: Oct 30, 2004
  • Posts: 2521
  • Loc: /usr/src/MI
  • Status: Offline

Post October 16th, 2007, 4:11 am

joebert wrote:
Another way to change ownership, but from just the terminal, is like so
Code: [ Select ]
sudo chown user:group /path/to/folder/or/file


or to change permissions
Code: [ Select ]
sudo chmod 0777 /path/to/folder/or/file


the execution of this chmod command will only change the permissions of the files in that folder. so maybe you have a folder called /path/to/folder/or/file/MyFolder
and now you can access that folder, but nothing inside of it because the permissions aren't inherited. in order to change the permissions of all files recursively inside of a folder, you'd want to execute:
Code: [ Select ]
sudo chmod -hR 777 /path/to/blah


this is quite handy knowledge as i've spent way too much time cd'ing into a folder, changing permissions, cd'ing into another, changing permissions, going back and into another folder..... yuck. lol


do note; that this will give all users complete access to all of those files. this is unnecessary if your user has ownership of the files. if you'd like to grant read and execute to the files, but write access to your user you'd replace the 777 with 755. to figure out the numbers you use, you give each item (read, write, execute) a value of 1, 2, or 4. the first number is for the owner of the file (who has read+write+exec permissions so 1+2+4), i believe second is the owning group (who has read+-+execute so 1+-+4) and third is everyone else (same as previous). you can research this more if you'd like :] just thought i'd add a little tidbit about it.
Image
"In a world without walls and fences, who needs Windows and Gates?"
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post October 16th, 2007, 4:49 am

On the box sitting next to me I don't have to share space with anyone because it's a personal development box.

I have Apache running under its' own user:group , altering the User and Group directives in /etc/apache2/apache2.conf.

Since PHP runs under Apaches' name, any folders or files that need to be writable for PHP get chowned to myname:apachegroup instead of myname:myname & chmoded to 775.

This way I can read/write/execute them via FTP because of the first 7,
read/write/execute them via PHP because of the second 7,
and read/execute them via a browser because of the 5 at the end.

Be carefull not to omit "execute" permission (6 instead of 7) on directories for the directories' owner, doing so will prevent FTP applications from retrieving the directory contents for that directory.
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 59 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.