LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-06-2008, 06:33 PM   #1
2beahacker
LQ Newbie
 
Registered: Oct 2008
Location: China
Distribution: Ubuntu 8.04
Posts: 9

Rep: Reputation: 0
LAMP problem on ubuntu8.04


Hello,eveyone!
I have just installed apache and mysql on ubuntu8.04.But when I start the machine,apache didn't start automatically.
Because when I type " /usr/local/apache2/bin/apachectl restart"
I got the error :
Code:
httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Does this mean I should run as root?
And the MYSQL problem,I try to start mysql server with
/usr/local/mysql/bin/mysqld_safe -user=mysql&
Unluckily,error comes again!
Code:
$ nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /usr/local/mysql/var
/usr/local/mysql/bin/mysqld_safe: 380: cannot create /usr/local/mysql/var/dear-laptop.err: Permission denied
rm: cannot remove `/usr/local/mysql/var/dear-laptop.pid': Permission denied
eval: 1: cannot create /usr/local/mysql/var/dear-laptop.err: Permission denied
STOPPING server from pid file /usr/local/mysql/var/dear-laptop.pid
tee: /usr/local/mysql/var/dear-laptop.err: Permission denied
081007 07:23:10  mysqld ended
tee: /usr/local/mysql/var/dear-laptop.err: Permission denied
But befor I have running
cd /usr/local/mysql
chown -R root .
chown -R mysql var
chown -R mysql var/.
chgrp -R mysql .
Maybe I can't express the problem clearly with my poor English.
Thanking you in anticipation.
 
Old 10-06-2008, 07:08 PM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
Did you install them from source (as I see /usr/local in your post)?
 
Old 10-06-2008, 07:18 PM   #3
2beahacker
LQ Newbie
 
Registered: Oct 2008
Location: China
Distribution: Ubuntu 8.04
Posts: 9

Original Poster
Rep: Reputation: 0
Yes,I make it myself
 
Old 10-06-2008, 07:27 PM   #4
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
Any particular reason for this? Why the packages from repositories are not suitable? If you install them from repos one command will give you installed, running and configured Apache and MySQL.
 
Old 10-06-2008, 07:34 PM   #5
2beahacker
LQ Newbie
 
Registered: Oct 2008
Location: China
Distribution: Ubuntu 8.04
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by klearview View Post
Any particular reason for this? Why the packages from repositories are not suitable? If you install them from repos one command will give you installed, running and configured Apache and MySQL.
Sorry,my English is poor.I mean I install them from files with .tar.gz
not from apt-get
 
Old 10-06-2008, 08:01 PM   #6
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
Again, why from source?

Unless you have a particular reason for this installing Apache and MySQL on Ubuntu from source is a huge waste of time when 'sudo apt-get install mysql-server apache2' gives you fully configured, running and functional servers.
 
Old 10-06-2008, 08:16 PM   #7
2beahacker
LQ Newbie
 
Registered: Oct 2008
Location: China
Distribution: Ubuntu 8.04
Posts: 9

Original Poster
Rep: Reputation: 0
But if I use 'sudo apt-get install mysql-server apache2',I can't decide which directory to be installed or configured.
So,can anyone solve above problem?
 
Old 10-06-2008, 08:36 PM   #8
Kingtiger01
Member
 
Registered: Nov 2006
Location: Watkins Glen, NY
Distribution: Ubuntu-8.04/Xebian
Posts: 56

Rep: Reputation: 16
i believe with apt you can specify switches. or you can manually edit the conf. to specify a different file locations.
 
Old 10-06-2008, 08:57 PM   #9
2beahacker
LQ Newbie
 
Registered: Oct 2008
Location: China
Distribution: Ubuntu 8.04
Posts: 9

Original Poster
Rep: Reputation: 0
But once I had installed them with apt ,it didn't make me more comfortable.I met many problems ,too.
 
Old 10-06-2008, 10:29 PM   #10
Kingtiger01
Member
 
Registered: Nov 2006
Location: Watkins Glen, NY
Distribution: Ubuntu-8.04/Xebian
Posts: 56

Rep: Reputation: 16
hmm, then i would go to Linux from scratch or Gentoo instead. as they both use source packages instead of Binary's. Ubuntu build system is poor for Source Packages.
 
Old 10-07-2008, 02:56 AM   #11
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 489

Rep: Reputation: 37
Everytime it's complaining about Permission. I think you better check your permission first. Also post the steps you took to configure in ubuntu.
 
Old 10-07-2008, 03:00 AM   #12
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 570

Rep: Reputation: 58
Make sure you have mysql user/group and apache or httpd user/group, or you could use user: nobody group: nogroup.
 
Old 10-08-2008, 06:09 PM   #13
2beahacker
LQ Newbie
 
Registered: Oct 2008
Location: China
Distribution: Ubuntu 8.04
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by robertjinx View Post
Make sure you have mysql user/group and apache or httpd user/group, or you could use user: nobody group: nogroup.
nobody group: nogroup
It works.Thanks very much.
 
Old 10-08-2008, 11:34 PM   #14
Kingtiger01
Member
 
Registered: Nov 2006
Location: Watkins Glen, NY
Distribution: Ubuntu-8.04/Xebian
Posts: 56

Rep: Reputation: 16
good to see~
 
  


Reply

Tags
apache, lamp, mysql


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound problem Ubuntu8.04 kernel 2.6.24-19-386 cctv Linux - Desktop 0 09-09-2008 08:44 PM
LVM configuration in UBUNTU8.04.1 ajay.karn Linux - Server 4 08-18-2008 05:04 AM
kde4 not so smooth on ubuntu8.04 arkarkwin Linux - Laptop and Netbook 2 08-01-2008 07:37 AM
What are the settings to fdformat a USBfloppy with Ubuntu8.04 on a Dell D810Laptop carg0 Linux - Newbie 1 05-21-2008 05:39 AM
LXer: LAMP vs. LAMP Rematch LXer Syndicated Linux News 0 11-08-2006 03:03 AM


All times are GMT -5. The time now is 09:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration