LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-25-2010, 02:40 AM   #1
rewards
Member
 
Registered: Dec 2010
Posts: 135

Rep: Reputation: 0
Question Installing an application on a Linux Centos


I have a question. I have a Centos Linux at home. I managed to configure MySQL and Apache on it. Please make a note that httpd is running and it is located in /etc/httpd folder. mysqld is running as well. When I type http://localhost, 127.0.0.1 and 192.168.0.150, the browser take me to a page and that page is:
Apache 2 Test Page powered by CentOS.This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page it means that the Apache HTTP server installed at this site is working properly.

Now I have a php script that I downloaded and I need to install it on the local machine. This script relies on mysql and apache running on this Linux box. The script has folders and files such as tools, upload folders and within these folder there are other folders like include, install,files etc and they are located in the Desktop in a folder called php. Now in order for me to install this script I have to use a browser like Firefox and type a correct address in the address and go through the installation. Could anyone help and tell me how I can use Firefox browser and go through the installation process? Where should this php folder should be? I want for example when I type http://localhost, instead of going to this page, "Apache 2 Test Page powered by CentOS.This page is used to test the proper operation of the Apache HTTP server after it has been installed..............................., I want to go to page where I can install the script. Thank you all for your pateince and my long message.
 
Old 12-25-2010, 03:27 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Hi,

You can move the folder php under /var/www/html/, that is the default DocumentRoot for apache in Centos.
After that you can use http://localhost/php to access the application.
Note that you'll need to install php if you haven't done it already

Regards
 
1 members found this post helpful.
Old 12-25-2010, 05:30 AM   #3
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
First you need to make sure php package is installed. In order to achieve that yum install php
Your fresh install of apache will create empty directory of /var/www/html, once you create html or php file on that directory, it will load that file.
But you need to make sure that filename (either html or php) must be the same name as when you declare DirectoryIndex at httpd.conf
Normally, index.html is in default. You might want to include index.php
Cheer
 
1 members found this post helpful.
Old 12-25-2010, 03:08 PM   #4
rewards
Member
 
Registered: Dec 2010
Posts: 135

Original Poster
Rep: Reputation: 0
Thank you for your feedback. I did everything you said and now I am able to launch the installation process through the Firefox. But I have a problem here. When I go through the requirment check the system says:
MySQL: Unavailable
MySQL with MySQLi Extension: Unavailable
MS SQL Server 2000+: Unavailable
PostgreSQL 7.x/8.x: Unavailable
SQLite: Unavailable
Oracle: Unavailable

eventhough mysqld is runnung. When I type mysql at the terminal the out put is this:

[root@localhost ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| php |
| test |
+--------------------+
4 rows in set (0.00 sec)

mysql> SELECT User from mysql.user;
+-------+
| User |
+-------+
| root |
| |
| phpdb |
| root |
| |
| root |
+-------+
6 rows in set (0.00 sec)

mysql>

Last edited by rewards; 12-25-2010 at 03:26 PM.
 
Old 12-25-2010, 03:46 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Hi,

I guess you miss the php-mysql package.
 
Old 12-25-2010, 04:33 PM   #6
rewards
Member
 
Registered: Dec 2010
Posts: 135

Original Poster
Rep: Reputation: 0
Thank you for your feedback. I had to run httpd service again. Now I have another problem. On step 4 of the installation which is called Configuration I get this message: Cannot connect to the database:
Can't connect to MySQL server on 'http' (13).
Database Configuration
Database Driver: MYSQL
Database Host:http://localhost
Database Name: php
Database User Name: phpdb
Database Password: password

Does anyone know why i get this message? Thank you

[root@localhost ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| php |
| test |
+--------------------+
4 rows in set (0.00 sec)

mysql> SELECT User from mysql.user;
+-------+
| User |
+-------+
| root |
| |
| phpdb |
| root |
| |
| root |
+-------+
6 rows in set (0.00 sec)

mysql>

Last edited by rewards; 12-25-2010 at 04:43 PM.
 
Old 12-25-2010, 05:04 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Hi,

The error most likely comes from:
Quote:
Database Host:http://localhost
You should give just:
Code:
Database Host: localhost
Cheers
 
1 members found this post helpful.
Old 12-26-2010, 01:19 AM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,090

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
Is " PhpMyAdmin" installed ? That is normally used as the GUI for MySQL
Unless you DO want to setup and work with mysql from the terminal ONLY in text only

If it is , then is it configured ?
 
1 members found this post helpful.
Old 12-26-2010, 01:13 PM   #9
rewards
Member
 
Registered: Dec 2010
Posts: 135

Original Poster
Rep: Reputation: 0
I installed PhpMyAdmin and named the host databse localhost instead of http://localhost and it is all good. Thank you all for your support. Everything is working now. Happy holiday and cheers. :-)

Last edited by rewards; 12-26-2010 at 01:14 PM.
 
Old 12-26-2010, 02:32 PM   #10
rewards
Member
 
Registered: Dec 2010
Posts: 135

Original Poster
Rep: Reputation: 0
Hello all. I can access the website (http://localhost, 127.0.0.1 or 192.168.0.150) successfully from the local computer server where the script is located., But When I access the site from another computer in the same local network, I don't get the correct website. I see the site like html as text not graphic. Please see below text file output from the browser: Also I can only access the site by typing only 192.168.0.150. When I type http://localhost or 127.0.0.1, the site does not come up. Do you see what I did wrong? How can I fix this problem. Thank you again.

Email:
Password:
Remember me

* Sign Up
* Forgot Password?


Recent Logins
Admin PHP Local
Admin PHP Local
Sign Up and Start Using php
*Full Name:
*Choose a Username:
http://localhost/index.php?do=/your-user-name/
*Email Address:
*Password:
*Date of Birth:
/ /
*Gender:
*Location:
Time Zone:
*Image Verification:
Reload Image

Type in the verification code above:
*I have read and agree to the Terms of Use and Privacy Policy.
* Required Fields

*
* About
* |Privacy
* |Terms
* |Contact Us
* |Mobile
* |English (US)

Last edited by rewards; 12-26-2010 at 03:41 PM.
 
Old 12-26-2010, 05:37 PM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Hi,

I guess you've used localhost as the hostname when you configured your php application, that's why it cannot find images.
It's better to use your server IP 192.168.0.150 if you don't have a real hostname that other computers can use to connect to your box.
 
1 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
[SOLVED] Install application on Linux Centos rewards Linux - Newbie 5 12-25-2010 06:20 AM
good Forum application for Centos (Linux) sang Linux - Software 3 09-05-2010 07:37 AM
Inquiry:Problem installing application on Linux hadimotamedi Linux - Newbie 1 10-12-2009 06:55 AM
Update OpenGeu application menu after installing an application silencer07 Linux - Desktop 0 10-20-2008 09:19 PM
Running application after installing(New to linux) farrukh Linux - General 2 05-07-2004 03:42 AM


All times are GMT -5. The time now is 07:38 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