install postgress:
Set a password for the postgres superuser:
(You may need to quit using \q when you are done).
(Note: You could also generate a random password and use it here. Just be sure to record it in an accessible location.)
Create the first database:
Install the newest version (> 0.9.8) from the DAViCal repositories:
Note: Port 11371 must be open in the firewall to allow the keyserver.
Set up DaviCal PostgreSQL users
Create the DaviCal users (first becoming the the system root superuser, using sudo su, then becoming the database superuser, postgres):
You will get asked about superusers, roles and databases, but just say "No" to all questions. This functional ID needs only minimum rights. Repeat the process to create one more user, "davical_dba":
Edit the configuration file pg_hba.conf:
Add the following 4 lines near (or at) the top;
(The last line is for accessing the database over TCP/IP, assuming the database and the apache2 server are on the same computer. See here under "Connecting to the Database" for more details.)
Restart the postgreSQL server:
Setup the DaviCal database
Run the database creation/installation script:
Write down the admin password when it is displayed. You will need it later.
Once the creation script has run correctly, again edit the pg_hba.conf file:
and remove the line
local all all trust
(This step is not strictly necessary for the installation, but do you really want anybody with a local account to have free access to all the databases?)
Restart the database daemon:
Test that your database creation was successful
You should see a table with a list of access permissions to "davical_dba". (Typing "\q" exits pqsl.)
Set up Apache2
In your router settings (assuming you have one), set your port forwarding so that your port 80 (http) and 443 (https) is forwarded to your server. Make sure your server firewall (if you have one) allows incoming ports 80 and 443.
so that these lines were used (instead of the original ones):
To then make the virtualhost file active, I made a symbolic link from the virtualhost configuration file in the apache2 "sites-available" folder to the apache2 "sites-enabled" folder:
Then restart apache2:
Create your configuration file
Use admin as your initial login, and the password assigned to you at installation (you did write it down, didn't you?)
(See here if you forgot your password. In brief:
Only the initial "admin" password is stored in plain text. All subsequent users have their password stored in an encrypted state. If you change the admin password through the web interface it will also be encrypted from that point forward.)
Then you can also log through localhost using your browser:
http://localhost/davical
source: http://wiki.davical.org/w/Ubuntu/Lucid
sudo apt-get install postgresql sudo -u postgres psql postgres
\password postgres
sudo -u postgres createdb mydb
sudo apt-key advanced --keyserver pgp.net.nz --recv-keys F6E0FA5CF0307507BB23A512EAFCFEBF8FEB8EBF echo "deb http://debian.mcmillan.net.nz/debian lenny awm " | sudo tee /etc/apt/sources.list.d/davical.list sudo apt-get update sudo apt-get install davical
sudo su su postgres -c "createuser davical_app" exit
sudo su su postgres -c "createuser davical_dba" exit
sudo nano /etc/postgresql/8.4/main/pg_hba.conf
local all all trust local davical davical_dba trust local davical davical_app trust host davical davical_app 127.0.0.1/32 trust
sudo /etc/init.d/postgresql-8.4 restart
sudo su su postgres -c /usr/share/davical/dba/create-database.sh exit
sudo nano /etc/postgresql/8.4/main/pg_hba.conf
sudo /etc/init.d/postgresql-8.4 restart
sudo su su postgres psql davical davical=# \z davical=# \q exit exit
Install the Apache2 webserver, if you have not done so already. See the Ubuntu documentation for help. sudo apt-get install apache2
sudo nano /etc/apache2/sites-available/mydavicalsite
# # Virtual Host def for Debian package DAViCal <VirtualHost *:80> DocumentRoot /usr/share/davical/htdocs DirectoryIndex index.php index.html ServerName mydavicalsite.dyndns.org ServerAlias calendar.mydavicalsite.dyndns.org Alias /images/ /usr/share/davical/htdocs/images/ <Directory /usr/share/davical/htdocs/> AllowOverride None Order allow,deny Allow from all </Directory> php_value include_path /usr/share/awl/inc php_value magic_quotes_gpc 0 php_value register_globals 0 php_value error_reporting "E_ALL & ~E_NOTICE" php_value default_charset "utf-8" </VirtualHost>
sudo ln -s /etc/apache2/sites-available/mydavicalsite /etc/apache2/sites-enabled/mydavicalsite better sudo a2ensite site_name
sudo /etc/init.d/apache2 restart
sudo su su postgres psql davical -c 'select username, password from usr;'
sudo ln -s /usr/share/davical/htdocs /var/www/davical