- Feb 1, 2008
- 602
- 0
- 76
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/printmaster/wiki/Installation-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 ---
Created 'session' directory is in the printmaster directory, made it writable
--- DATABASE ---
--- IMPORT SQL FILE ---
Edited the following line:
--- 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
--- 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
What did I do wrong? Any idea?
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/printmaster/wiki/Installation-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/printmaster/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 ---
(enter the password for root user)mysql -u root -p
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;
--- IMPORT SQL FILE ---
(Import the printmaster.sql as instructed)[root@localhost ~]# mysql -u root -p printers < printmaster.sql
[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
</VirtualHost>
[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:
