Setup/Installation
Foreword
BEdita is a software in continuous development and does not have a stable version yet, altough the release candidate version is usable.
Below you will see how to install a backend application. At the end of this procedure you will find a folder named frontends, containing some frontend examples. Start from here to develop a frontend application.
There is not an automatic setup/install procedure with a graphical user interface, but you have to follow some easy steps.
Before installing BEdita
First it is necessary that some preliminary requirements are satisfied. You will need a system with:
- PHP 5.2 or newer with modules gd, mbstring, gettext (recommended)
- MySQL 5.0.26 or newr version with InnoDB engine and Stored Procedures support
- Apache 2
- shell access
That's it: all third party libraries needed by BEdita are bundled in the source package.
Download BEdita package
If your system does support the requirements listed above you can download the package. This package contains everything you need to setup and use BEdita.
There you will find the real BEdita application (bedita-app directory), SQL scripts needed to create tables/views and stored procedures (bedita-db dir), the CakePHP framework (cake folder), the template engine Smarty (vendors/smarty dir) and the phpThumb library (vendors/phpThumb dir), and many other libraries used.
Quick install
Copy or unpack bedita directory (content of the compressed source package) in a directory served by the web server. Then:
- create an empty database, create/choose a user with grants on data (DELETE, UPDATE...) and structure (DROP, CREATE,...)
- edit
bedita-app/config/database.phpadding database connection details (host, user,...) - create a root directory for media files, served by your webserver
- edit
bedita-app/config/bedita.sys.php, in$config['mediaRoot']write the absolute path to this media root dir, in$config['mediaUrl']write the web URL to the same directory, in$config['beditaUrl']write the web URL to BEdita installation. - make sure
bedita-app/tmpis writable from your web server - if you haven't mod_rewrite enabled remove
.htaccessfiles and uncommentApp.baseUrlinbedita/bedita-app/config/core.php. For more detail read the Note below. - launch
./cake.sh bedita initto check your setup
Installation details
Here the same instruction from above in more detail.
1. Create the database
Just create an empty database on MySQL and define a mysql user having grants on data (INSERT, DELETE, etc....) and on structure (CREATE, DROP, etc....). Make sure you have stored procedures available on your installation.
2. Launch the shell script bedita init
To initialize the system correctly, BEdita has a PHP script that you have to launch from the command line (a cake shell script, more precisely). Just go to the bedita directory above on the shell and type:
./cake.sh bedita init
(on Linux/Mac/*nix systems, on Windows use cake.bat instead of ./cake.sh). This script first checks your configuration, if it finds something wrong or not properly setup it will suggest you what to do. For instance if the database connection fails it will tell you which file to check and which variable to edit.
HINT: edit $default array in bedita-app/config/database.php, have a look at cakePHP documentation.
Don't worry!
There are just two files to edit, bedita-app/config/database.php for the database connection (look at the CakePHP docs) and bedita-app/config/bedita.sys.php where you have to define three fundamental variables for BEdita.
- the first one is
$config['mediaRoot']that indicates a directory on your filesystem where BEdita will put any file uploaded (through a form) on the system. Verify that the webserver has the right permissions to read and write in this directory. - the second is
$config['mediaUrl']that indicates the base URL from which you can reach the uploaded files. - the third is
$config['beditaUrl']that indicates the base URL of your BEdita installation
The simplest place where you can create mediaRoot directory is inside bedita-app/webroot. You could use the bedita-app/webroot/files CakePHP directory or create another one. Suppose you created media directory there, above variables will look like these:
$config['mediaRoot'] = "/path_to_bedita/bedita-app/webroot/media";
$config['mediaUrl'] = "http://www.example.com/bedita/media";
If you are on Windows use a more windows friendly path for mediaRoot, like "D:\path-to-bedita\....".
You can obviously have more complex configurations creating the media directory somewhere else defining a virtual host that points to it (recommended for production systems).
Once the system is correclty configured the script wil create and initialize the database. At last it will ask if you want to check the status of BEdita, just press y and you will receive a short summary of your configuration.
Be aware of the permissions on bedita-app/tmp directory that has to be recursively writable from your webserver.
Note: BEdita is based on CakePHP framework. CakePHP is built to work with mod_rewrite out of the box (http://book.cakephp.org/view/37/Apache-and-mod_...). If you want/can use it (recommended) check if it's enabled, otherwise if you want to configure CakePHP not to use mod_rewrite remove .htaccess files in/bedita/.htaccess
/bedita/bedita-app/.htaccess
/bedita/bedita-app/webroot/.htaccess
And uncomment the App.baseUrl in bedita/bedita-app/config/core.php
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
And now?
Open your browser and write on the address bar the location that points to your BEdita installation.
You will be redirected to the login page. Type bedita as username and also as password et voilà...have fun with BEdita!!
mediaRoot6 Comments
Alberto Pagliarini
08-03-2009
Hi JChristian,
thanks for trying BEdita! In a future version BEdita will have a graphical installation but at the moment we are fixing bugs and refining some things to release a stable version at soon as possible with many exciting features.
Why don't you post your problem in the public forum (http://forum.bedita.com)? There we'll give you support to solve it. Also write the console output, to better understand what is going wrong.
thanks
Dejavu
11-10-2009
hello.
this document not clear!
i can't install bedita.
your project need some skillful documenters!
Stefano Rosanelli
11-10-2009
Hi Dejavu,
we are working hard at the moment to publish a better documentation - we're aware that not everything is clear and intuitive.
If you write in our forum
http://forum.bedita.com/viewforum.php?f=5
and tell us what's going wrong with your setup, we will help you.
In a future release we will provide a graphical installation.
Thansk for your feedback
Stefano
Peter
01-20-2010
I still get the following errormessage, but I didn´understand it, because I´m not a programmer. Betida looks pretty good and I hope I can run it. What´s wrong with my config?
Regards Peter
Notice (8): Undefined index: javascript [APP/tmp/smarty/compile/^%%F1^F12^F12F86F2%%error500.tpl.php, line 12]
[....]
Fatal error: Call to a member function link() on a non-object in /customers/odwserv.de/odwserv.de/httpd.www/bedita/bedita-app/tmp/smarty/compile/^%%F1^F12^F12F86F2%%error500.tpl.php on line 12
Alberto Pagliarini
01-20-2010
Hi Peter,
thanks a lot for trying BEdita and for your feedback!
Other people are getting the same error when haven't run the init shell script. There's a thread in our forum.
Read ideint post and the following solution and evenyually post in the forum for any problems. We'll try to help you.
ps. I have truncated the stack trace you have posted because you can find the same error in the post forum.
Write a comment
Screencast of a typical install of BEdita 3.0 with database setup on Linux (but it's similar on other platforms). Video only (no audio).
see on YouTube


JChristian
08-03-2009
It makes me very difficult to install, I tried many times and nothing. If you could put graphical installation BEdita instructor or a video without any audio, just see the installation in localhost. BEdita I love what I have read but it will be better if you install achievement ...
thanks