Ubuntu LAMP setup Help!

  • onlyican.com
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1589
  • Loc: Hants, UK

Post 3+ Months Ago

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
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

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.
  • onlyican.com
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1589
  • Loc: Hants, UK

Post 3+ Months Ago

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.
  • onlyican.com
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1589
  • Loc: Hants, UK

Post 3+ Months Ago

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.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

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
  • Posts: 1589
  • Loc: Hants, UK

Post 3+ Months Ago

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.
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

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.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

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.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

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.

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 87 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.