Go Back   AnandTech Forums > Software > *nix Software

Forums
· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2013
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions
   

Reply
 
Thread Tools
Old 04-25-2012, 05:04 PM   #1
Blueychan
Senior Member
 
Blueychan's Avatar
 
Join Date: Feb 2008
Posts: 547
Default Need help configuring Apache, MySQL, PHP on CentOS Linux (Long)

Hello all, I am new to Linux (CentOS) and have been trying to setup up this web application https://github.com/craigrodway/printmaster on CentOS for the last couple hours.

The instruction from the author is a bit vague for a newbie like me:
- Create directory on webserver to store files (configure as virtual host or subdir)
- Copy all Print Master files to the folder you just created
- Create a new directory called session where you extracted the files and make it writeable
- Create a new username and database in MySQL
- Import the printmaster.sql file into the new database
- Edit the $db line in inc/init.php to reflect your database details
- Invent your own security (.htaccess, integrated Windows authentication...)

I try to follow the instruction from guide in the wiki section but still could not get it to work:https://github.com/craigrodway/print...ation-on-Linux

Could anyone here help!?

=====================================
= Here are a history off what I did =
=====================================

1. Installed / configured Apache Server following this instruction: http://dev.antoinesolutions.com/apache-server.
(Visited localhost in the web browser and saw an Apache Test Page.)

2. Installed / configured PHP following this intruction:http://dev.antoinesolutions.com/php
(Visited localhost/phpinfo in the web browser, and there's the phpinfo output. So it works!)

3. Installed / configured MySQL

--- FILES ---
Quote:
[root@localhost ~]# cd /tmp
[root@localhost ~]# wget https://github.com/craigrodway/print...tarball/master --no-check-certificate
[root@localhost ~]# tar zxvf master
[root@localhost ~]# mv craigrodway-printmaster-af9843d/* /root/Desktop/printmaster/
Created 'session' directory is in the printmaster directory, made it writable
Quote:
[root@localhost ~]# mkdir session
[root@localhost ~]# chmod 755 session
--- DATABASE ---
Quote:
mysql -u root -p
(enter the password for root user)

Quote:
mysql> CREATE USER 'printers'@'localhost' IDENTIFIED BY 'printersPASS';
Query OK, 0 rows affected (0.00 sec)
Quote:
mysql> CREATE DATABASE printers;
Query OK, 1 row affected (0.00 sec)
Quote:
mysql> GRANT ALL PRIVILEGES ON printers.* TO 'printers'@'localhost';
Query OK, 0 rows affected (0.00 sec)
Quote:
mysql> quit;
--- IMPORT SQL FILE ---

Quote:
[root@localhost ~]# mysql -u root -p printers < printmaster.sql
(Import the printmaster.sql as instructed)

Quote:
[root@localhost ~]# vi inc/init.php
Edited the following line:
Quote:
$db = new fDatabase('mysql', 'printers', 'printers', 'printersPASS', 'localhost');
--- Now I set up VirtualHost on httpd ---
First of all, do I even need to set up virtual host?

Created the file /etc/httpd/conf.d/testprintmaster.conf with the following text
Quote:
<VirtualHost *:80>
DocumentRoot /root/Desktop/printmaster
ServerName testprintmaster
ServerAlias www.testprintmaster.com
</VirtualHost>
Quote:
[root@localhost ~]# service httpd restart
--- Now I visit www.testprintmaster.com on the web browser ---
And Apache direct it to a search page ... WTF!?

I check the syntax check on VirtualHost configuration
Quote:
[root@localhost ~]# /usr/sbin/httpd -S

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 localhost.localdoman (/etc/httpd/conf.d/ssl.conf:81)
*:80 is a NameVirtualHost
default server testprintmaster (/etc/httpd/conf.d/testprintmaster.conf:2)
port 80 namevhost testprintmaster (/etc/httpd/conf.d/testprintmaster.conf:2)
Syntax OK
What did I do wrong? Any idea?

Last edited by Blueychan; 04-26-2012 at 10:28 AM.
Blueychan is offline   Reply With Quote
Old 05-15-2012, 05:51 PM   #2
Redinit
Member
 
Redinit's Avatar
 
Join Date: May 2012
Posts: 97
Default

Did you ever get this figured out?
Redinit is offline   Reply With Quote
Old 05-16-2012, 09:23 AM   #3
sourceninja
Diamond Member
 
sourceninja's Avatar
 
Join Date: Mar 2005
Posts: 7,901
Default

Does apache have the rights to read /root/Desktop/printmaster? I'm not sure on cent, but on ubuntu server apache runs as www-data, which means by default it would not be able to read files in /root.
sourceninja is offline   Reply With Quote
Old 06-07-2012, 08:45 PM   #4
Kinesis
Senior Member
 
Kinesis's Avatar
 
Join Date: May 2001
Posts: 459
Default

Why not use XAMPP?
__________________
:
Kinesis is offline   Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:26 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.