-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
INSTALL
145 lines (98 loc) · 4.28 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
Project Cato Installation File
INSTALLING CATO
---------------
As you'll see, I've tried to make installing Cato as easy as possible.
If you have a decent PHP environment already set up, the installation
should be a very simple process.
DEPENDENCIES
------------
Cato has been tested with:
* The Apache web server
* The MySQL database server
* PHP version 5.3
* Mac OS X 10.5 and 10.6
It will probably work with other PHP 5.x systems. It will probably also
work with other web servers, databases, and it should work on Windows
and Linux systems. There is nothing Mac-specific about Cato, except the
default configuration files.
Cato requires:
* The PHP MDB2 module
* The Smarty templating system
With this release these tools are now included under the 'lib' folder of
the Cato distribution. I don't know if this is 100% legal, but it makes
it 99% easier to get Cato up and running, especially if you're not a
PHP wizard.
INSTALLATION INSTRUCTIONS
-------------------------
Assuming 1) you already have Apache, MySQL, and PHP installed, and 2) you
already have the database for your project installed in your MySQL database,
you can install Cato very easily, as follows.
1) Set up a directory where you can install the Cato files.
Cato is known to work with Apache, so the easiest way to
install Cato is in an Apache 'htdocs' directory. On my Mac
I use MAMP, so Cato goes in this directory:
/Applications/MAMP/htdocs/cato
The easiest way to do this is to checkout the code from Github
under the htdocs folder, then rename the folder from
Cato-CRUD-Generator to 'cato'.
2) While this step is optional, I've found it easier when
I have multiple web apps running on my computer.
(a) Create an entry in your "hosts" file for Cato. On my Mac
I edit /etc/hosts, and add an entry for Cato like this:
127.0.0.1 cato
In the real world, my actual entry looks like this:
127.0.0.1 localhost sleetmute drupal6 cato
Each of those names correspond to web apps I'm currently working on.
(b) Add an entry like this to your Apache httpd.conf file:
<VirtualHost 127.0.0.1>
ServerName cato
DocumentRoot /Applications/MAMP/htdocs/cato
<Directory /Applications/MAMP/htdocs/cato>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
3) Edit the Cato configuration files. The main file you
need to configure is "db.cfg". This file tells Cato how to
connect to your database. On my system that file looks like
this:
$dsn = array(
'phptype' => 'mysql',
'username' => 'root',
'password' => 'root',
'hostspec' => 'localhost',
'database' => 'drupal6',
'port' => '/Applications/MAMP/tmp/mysql/mysql.sock'
);
If you're not using MAMP, you'll also have to edit the
"app.cfg" file. There are just a couple of settings in that
file, and it should be well-documented.
There is also a file named "smarty.cfg", which you'll only need
to edit if you want to create some Smarty template variables.
(This is really just for advanced users.)
4) Start/restart Apache. Again, I use MAMP, so I just restart
Apache through the MAMP UI. Because MAMP runs Apache on
port 8888 by default, I can now access the Cato UI through
this URL:
http://cato:8888/
At this point Cato should be up and running. If you haven't already
watched the video on how to use Cato, I recommend watching it now:
http://www.catocrudgenerator.com/screenshots-crud-generator/
You can also find more information at the Cato project pages:
http://www.catocrudgenerator.com
NO PHP?
-------
If you don't have PHP installed on your system, I'm afraid I won't
be of too much help, but I'll give you what I can.
On Mac OS X systems, I *strongly* recommend using MAMP for PHP/MySQL
development. You can download MAMP here:
http://www.mamp.info
For Linux systems, I'll be really surprised if PHP isn't installed
by default. If it isn't, you can probably using RPM or YUM to install
it very easily.
For Windows, and for Linux systems without PHP installed, the best I
can do is point you to the main PHP website:
http://php.net
Just download the stable release from there.