Go Back   AnandTech Forums > Software > *nix Software

· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· AMD Video Cards
· Nvidia
· Displays
· 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
· Home and Garden
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2015
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions

Thread Tools
Old 04-25-2012, 05:04 PM   #1
Senior Member
Blueychan's Avatar
Join Date: Feb 2008
Posts: 600
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 ---
[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
[root@localhost ~]# mkdir session
[root@localhost ~]# chmod 755 session
--- DATABASE ---
mysql -u root -p
(enter the password for root user)

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

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

[root@localhost ~]# vi inc/init.php
Edited the following line:
$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
<VirtualHost *:80>
DocumentRoot /root/Desktop/printmaster
ServerName testprintmaster
ServerAlias www.testprintmaster.com
[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
[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's Avatar
Join Date: May 2012
Posts: 97

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

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
Senior Member
Kinesis's Avatar
Join Date: May 2001
Posts: 466

Why not use XAMPP?
P8Z68-V Pro Gen 3 | 16 GB LP Corsair DDR3 | i7 2600K @ Stock
XFX 7970 DD 3GB Video Card | Asus Xonar DX Sound Card | LG Blu-Ray Player
Samsung Evo 256 GB SSD | Crucial M550 256 SSD | 2 X 500 GB WD Green Drive
1 X 1 TB WD Blue Drive
Kinesis is offline   Reply With Quote

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 06:33 PM.

Powered by vBulletin® Version 3.8.8 Alpha 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.