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 10-18-2011, 08:30 PM   #1
paruhang
Member
 
Registered: Aug 2011
Location: /home
Posts: 96

Rep: Reputation: Disabled
httpd,php & mysql


hi everybody,

i have installed httpd on my laptop. i have create index.html on /var/www/html/index.html when i open mozilla and type 127.0.0.1 the code i have written "HELLOW WORLD...!" it displays that means it works properly if iam not wrong.


i try to install mysql the following messages displays:

# yum install mysql
Loaded plugins: aliases, refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Package mysql-5.1.47-4.el6.x86_64 already installed and latest version
Nothing to do

rpm -q mysql
mysql-5.1.47-4.el6.x86_64


and i try to install php too the following messages displays:

# yum install php
Loaded plugins: aliases, refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Package php-5.3.2-6.el6.x86_64 already installed and latest version
Nothing to do

rpm -q php
php-5.3.2-6.el6.x86_64

before iam using wamp on my windows now iam using 64 bits rhel 6 so iam new to linux.can anybody help me how to configure httpd,php and mysql manually...? and give simple example of writing php and creating database on linux. what i want to do is i want write php code, work with database on my local machine.if someone gives me some an ideas i'll be greatful
 
Old 10-19-2011, 12:17 AM   #2
Wild_Pointer
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
Setting Up A LAMP

The simplest way to set up a LAMP (Linux Apache MySQL PHP), is to do it using Ubuntu. There may be other operating systems that offer just as easy a setup, but I presently am unaware of them. You can setup a LAMP manually, but it can get a little involved. Ubuntu actually builds and configures and sets it to start on system start up. I did run into one problem. I had to set the MIME variable to read PHP files in the httpd-conf file of Apache (possibly found in the /etc/Apache/httpd-conf/ directory). Setting up the LAMP manually, is a little involved, but if you'd like to learn, the "LEARN (blank) IN 24 HOURS) published what I thought were excellent books on building LAMP's. I wish you the best. You can contact me if you like, but I'm pretty busy and may no be able to get right back to you.

Best regards

Last edited by Wild_Pointer; 10-19-2011 at 12:20 AM. Reason: punctuation errors
 
Old 10-19-2011, 01:29 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
The key pt is
Quote:
This system is not registered with RHN.
RHN support will be disabled.
The is a true RedHat install; you either pay them for a subscription (to get updates & support) and register with
Code:
rhn_register
at the cmd line as root, OR get Centos which is a free version of RHEL, inc updates but no support. Your choice....
 
Old 10-19-2011, 02:12 PM   #4
paruhang
Member
 
Registered: Aug 2011
Location: /home
Posts: 96

Original Poster
Rep: Reputation: Disabled
hellow wild pointer,
i have download lAMP but that folder doesn't contain .rpm file it contains lamp-0.0.9 folder and inside that folder it contains some folder and file they are as followd
clusters, examples, lamp, libsrc, merlin, changelog, makefile and readme. is that the lamp i have to download....? how do i install this file in my local machine..? or if there is link to download lamp plz share for me i'll be greatfull.
 
Old 10-19-2011, 06:00 PM   #5
Mitchal
LQ Newbie
 
Registered: Aug 2008
Location: Sydney
Distribution: Fedora
Posts: 9

Rep: Reputation: 3
Smile

Quote:
Originally Posted by paruhang View Post
hellow wild pointer,
i have download lAMP but that folder doesn't contain .rpm file it contains lamp-0.0.9 folder and inside that folder it contains some folder and file they are as followd
clusters, examples, lamp, libsrc, merlin, changelog, makefile and readme. is that the lamp i have to download....? how do i install this file in my local machine..? or if there is link to download lamp plz share for me i'll be greatfull.
Hi Paruhang,
LAMP is not so much a installable package as it is a common group of packages which run together to form a full functioning web/application server. So i dont the think the LAMP package that you downloaded is whatyou think it is. if you have already done a yum install of Apache (httpd), MySQL and PHP then you have got essentially what is called a LAMP configuration (LAMP stands for Linux Apache MySQL PHP)

i am running this configuration on both CENTOS and fedora flavours without too much configuration required. Do you have a support agreement with redhat? if not there would be no advantage with going with RHL6 and you might be better starting over with one of these free flavours.

If you need any further help fell free to get in touch with me.
Mitch
 
Old 10-19-2011, 08:52 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
LAMP, or any other LA combo, really, can be quite easily
put into place on any distro. My personal preference is
LAPP (Linux, Apache, PostgreSQL, PHP), others chose Python
instead of PHP ... the key is: most distros come with all
those combos ready available.


Cheers,
Tink
 
Old 10-20-2011, 12:51 PM   #7
paruhang
Member
 
Registered: Aug 2011
Location: /home
Posts: 96

Original Poster
Rep: Reputation: Disabled
hi mitchal,
thankx for your reply,
i have configure local repo in my system so i use yum command to install locally, i have installed php,mysql and apache successfully but i dont have an idea to configure and run those php,mysql and apache, iam learning to write some basic php code and creating database so i need to practise in my local system, can anybody guide me to configure php,mysql and apache. iam new to linux.
 
Old 10-20-2011, 01:54 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
A google for "redhat lamp how to" brought up a couple of interesting
links, one of them I found particularly useful:
http://www.howtoforge.com/quick-n-ea...er-centos-rhel


Amazing what ~ 30 seconds of search can get you ...



Cheers,
Tink
 
1 members found this post helpful.
Old 10-20-2011, 03:38 PM   #9
paruhang
Member
 
Registered: Aug 2011
Location: /home
Posts: 96

Original Poster
Rep: Reputation: Disabled
hi tinkster, thankx for your reply
i have followed the instruction as given and i have changed password as follows:

mysql> USE mysql;
mysql> UPDATE user SET Password=password WHERE user='root';
mysql> FLUSH PRIVILEGES;

when i try to login using mysql -u root -p this error displays

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

so how can i login using root password or what does it means...?
 
Old 10-20-2011, 04:53 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
If the line below is what you typed in, you didn't enter a password.

Quote:
mysql> UPDATE user SET Password=password WHERE user='root';
The link below shows the step. Where it says 'newpassword' you should type your actual password.

Quote:
UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
Did you do it this way and just not post correctly.
 
Old 10-20-2011, 04:55 PM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,961

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by paruhang View Post
hi tinkster, thankx for your reply
i have followed the instruction as given and i have changed password as follows:

mysql> USE mysql;
mysql> UPDATE user SET Password=password WHERE user='root';
mysql> FLUSH PRIVILEGES;

when i try to login using mysql -u root -p this error displays
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
so how can i login using root password or what does it means...?
Google also works for finding out how to correctly set passwords and MySQL privileges:

http://www.cyberciti.biz/faq/mysql-c...root-password/
 
1 members found this post helpful.
Old 10-20-2011, 06:05 PM   #12
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
I am using debian and this command works very well try this for yours
Quote:
mysql --user=root --password=your_root_passwd --database=mysql
As you have RHEL check the default directory i.e your http://localhost should point to directory below
Quote:
/var/www/html
put your index.php in this html directory and check whether you can run PHP or not from here.
 
1 members found this post helpful.
Old 10-20-2011, 06:05 PM   #13
paruhang
Member
 
Registered: Aug 2011
Location: /home
Posts: 96

Original Poster
Rep: Reputation: Disabled
thankx everybody,
i have installed php and test its okay but while installing
yum install php-mbstring php-mcrypt php-devel these three packages such error occurs.

# yum install php-mbstring php-mcrypt php-devel
Loaded plugins: aliases, refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package php-mbstring available.
No package php-mcrypt available.
No package php-devel available.
Error: Nothing to do

is that packages are necessary to install.. or what to do.
 
0 members found this post helpful.
Old 10-20-2011, 06:21 PM   #14
paruhang
Member
 
Registered: Aug 2011
Location: /home
Posts: 96

Original Poster
Rep: Reputation: Disabled
hi everybody,

when creating database called demo.from following this link http://www.howtoforge.com/quick-n-ea...er-centos-rhel


To Create A New MySQL User

To create a new mysql user 'guest' with 'all privileges' on the database 'demo':

mysql > create database demo
mysql >GRANT ALL PRIVILEGES ON demo.* TO 'guest'@'localhost' IDENTIFIED BY 'guest' WITH GRANT OPTION;
mysql> UPDATE user SET Password=PASSWORD('guest') WHERE user='guest';


following above link i was not able to create database demo but i have tried this i was able to create database called demo
mysql > create database demo;
i hope semicolon ';' is missing after demo. if iam not wrong.
 
0 members found this post helpful.
Old 10-20-2011, 06:30 PM   #15
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,961

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by paruhang View Post
thankx everybody,
i have installed php and test its okay but while installing yum install php-mbstring php-mcrypt php-devel these three packages such error occurs.

# yum install php-mbstring php-mcrypt php-devel
Loaded plugins: aliases, refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package php-mbstring available.
No package php-mcrypt available.
No package php-devel available.
Error: Nothing to do

is that packages are necessary to install.. or what to do.
As you were told before...you need to PAY FOR REDHAT in order to register the system. If you don't pay...you don't get access to the RHEL repositories, period. So pay or use CentOS instead.
 
  


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 5.1.6 & MySQL 5.0.34 connectivity test, php-mysql & libmysqlclient_15 kapshure Linux - Newbie 1 08-05-2010 08:11 PM
Slackware guide for AMP Apache MySQL & PHP xushi Slackware 35 05-11-2006 12:18 PM
Mysql & Httpd authentication landenm Linux - Software 3 06-17-2005 03:50 PM
How to uninstall httpd & PHP dhammika Linux - Software 4 04-28-2004 12:30 AM
PHP/MySQL/httpd jefx Linux - Newbie 4 05-27-2003 10:58 PM


All times are GMT -5. The time now is 08:34 PM.

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