LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-17-2011, 03:26 AM   #1
paruhang
Member
 
Registered: Aug 2011
Location: /home
Posts: 96

Rep: Reputation: Disabled
php,mysql and apache


hi everybody,
i have installed php,mysql and apache manually,and i have checked it is installed properly or not,
[root@server ~]# rpm -q httpd
httpd-2.2.15-5.el6.x86_64
[root@server ~]# rpm -q mysql
mysql-5.1.47-4.el6.x86_64
[root@server ~]# rpm -q php
php-5.3.2-6.el6.x86_64
[root@server ~]#

i want to configure locally on my machine, i don't know about any configuration file and i don't know how to configure because iam newer to this rhel6 and after configure how to check php,mysql and apache is configured properly. if somebody guide me to right way i'll be greatful.
 
Old 09-17-2011, 04:40 AM   #2
rahulkya
Member
 
Registered: Feb 2009
Location: New Delhi
Distribution: Linux mint,Ubuntu,Debian,RHEL 5,slackware 13.1, free BSD,solaris.
Posts: 186
Blog Entries: 3

Rep: Reputation: 33
The webserver default folder is
Quote:
/var/www/
Run you web file's from this folder ...You can reach there by typing localhost/filename
or by you server's IP address ..

If you want to secure you website there are separate tutorials ...Do some google..
 
0 members found this post helpful.
Old 09-17-2011, 05:08 AM   #3
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
paste phpinfo.php file in /var/www
go to url firefox
http://ipaddress/phpinfo.php
it will display the php info then ur php conf is wright

for apache got to firefox type
http://localhost
apache page will appears the apache is conf


for mysql

create a root user for mysql and assign password to it

mysql -uroot -p
prompt for passwordassword
mysql>

then ur login wright
 
Old 09-17-2011, 01:46 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,721

Rep: Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137
Quote:
Originally Posted by rahulkya View Post
The webserver default folder is /var/www
Run you web file's from this folder ...You can reach there by typing localhost/filename
or by you server's IP address ..
The web server MAY be at /var/www, depending on the distro. Some are /srv/www, some are in different places. Without knowing what version/distro of Linux the OP has (they didn't say), it's dangerous to speculate. OP, look into your apache.conf file(s), and see where your DocumentRoot directive is set.
Quote:
Originally Posted by arun5002
paste phpinfo.php file in /var/www, go to url firefox
http://ipaddress/phpinfo.php
it will display the php info then ur php conf is wright
Again, only IF the document root is /var/www, otherwise it won't work. And again, spell out your words.
Quote:
for apache got to firefox type
http://localhost
apache page will appears the apache is conf
The default page for Apache will display "It works!", and Apache may NOT be configured to work with PHP correctly, if apache2-mod_php5 isn't installed.
Quote:
for mysql
create a root user for mysql and assign password to it

mysql -uroot -p
prompt for passwordassword
mysql>

then ur login wright
A root user for MySQL is created by default, and if you re-create it without granting privileges to the tables correctly, you'll be in a bad spot. The best way to see if MySQL is running is just to type in "sudo mysql". If it's up and running and configured with default values, you'll see a "mysql>" prompt. If you do, it's working...type quit to get back to a prompt.
 
Old 09-18-2011, 07:30 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,347

Rep: Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365
Hate to disagree with you , but in this case
Quote:
Without knowing what version/distro of Linux the OP has (they didn't say)
from OP post #1
Quote:
am newer to this rhel6

# and

rpm -q httpd
httpd-2.2.15-5.el6.x86_64
 
Old 09-19-2011, 09:43 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,721

Rep: Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137
Quote:
Originally Posted by chrism01 View Post
Hate to disagree with you , but in this case
from OP post #1
Well fine, then. Missed it from the first post.....
 
Old 09-19-2011, 10:21 AM   #7
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi

Your server has the config files located at:
Apache (HTTP) : /etc/httpd/conf/httpd.conf
PHP : /etc/php.ini
MySQL : /etc/my.cnf (which isn't really that much to configure, more useful is to run it first with: service mysqld restart and then using TB0ne commands)

Remember: all services need to be started to have it checked if they work.
Apache can be easily misconfigured if you don't know what you're doing, so always check it first with: apachectl -t to see the output (must be: Syntax OK)

Last edited by lithos; 09-19-2011 at 10:23 AM.
 
Old 09-20-2011, 01:11 AM   #8
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Thanks tbone for ur reply


Regards
arun
 
0 members found this post helpful.
  


Reply


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
php/shell script to install mysql,apache and php automatically stranger_6_7 Linux - General 2 08-11-2009 02:07 AM
10.2 Apache PHP MySQL stevemad Slackware 11 09-30-2005 07:47 AM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM
php-nuke with apache php mysql c0c0deuz Linux - Software 0 03-30-2003 06:23 AM
PHP, MySQL and Apache miker Linux - Newbie 1 03-27-2002 01:29 PM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration