Update INSTALL.md

Improved readability using fenced code blocks.
This commit is contained in:
Jérôme Schneider 2014-02-02 12:43:04 +01:00
parent 5d17d06fc3
commit cdeb04eabd

View file

@ -77,31 +77,39 @@ Unpack the source package outside of the web site root
directory on your server. The location must be accessible to the web server. directory on your server. The location must be accessible to the web server.
Usually, it will be something like /var/www/ Usually, it will be something like /var/www/
# a. Enter the directory where the websites are stored ```sh
$ root:~> cd /var/www # a. Enter the directory where the websites are stored
$ root:~> cd /var/www
```
Unpacking will produce a directory with a name like baikal-x.y.z, where x.y.z Unpacking will produce a directory with a name like baikal-x.y.z, where x.y.z
correspond to the Baïkal version. For example, the Baïkal 0.2.0 source package correspond to the Baïkal version. For example, the Baïkal 0.2.0 source package
will create a directory named baikal-0.2.0 will create a directory named baikal-0.2.0
# b. Unpack the package using: ```sh
$ root:/var/www> tar xzf baikal-0.2.0.tgz # b. Unpack the package using:
$ root:/var/www> tar xzf baikal-0.2.0.tgz
```
Rename the untar'd directory to the name of your baikal dedicated subdomain. Rename the untar'd directory to the name of your baikal dedicated subdomain.
# c. Rename the directory to match your domain (good practice) ```sh
$ root:/var/www> mv baikal-0.2.0 dav.mydomain.com # c. Rename the directory to match your domain (good practice)
$ root:/var/www> mv baikal-0.2.0 dav.mydomain.com
# d. Enter the new Baïkal directory # d. Enter the new Baïkal directory
$ root:/var/www> cd dav.mydomain.com $ root:/var/www> cd dav.mydomain.com
```
In order to grant Apache access to the files of your Baïkal installation, In order to grant Apache access to the files of your Baïkal installation,
you'll have to grant the user running the apache process r+w permissions on you'll have to grant the user running the apache process r+w permissions on
the Baïkal files. In our example, we will suppose the linux username/usergroup the Baïkal files. In our example, we will suppose the linux username/usergroup
running Apache is www-data:www-data running Apache is www-data:www-data
# e. Change permissions on the files ```sh
$ root:/var/www/dav.mydomain.com> chown www-data:www-data Specific -Rf # e. Change permissions on the files
$ root:/var/www/dav.mydomain.com> chown www-data:www-data Specific -Rf
```
#### 3.2.1.2 - Setting up a Web Server #### 3.2.1.2 - Setting up a Web Server
@ -114,55 +122,57 @@ to your Web Server environment.
##### Setting up the Apache virtualhost ##### Setting up the Apache virtualhost
In our example, we will assume that the apache2 configuration directory is: In our example, we will assume that the apache2 configuration directory is: `/etc/apache2`
/etc/apache2
# a. Enter the Apache2 configuration directory ```sh
$ root:/var/www> cd /etc/apache2 # a. Enter the Apache2 configuration directory
$ root:/var/www> cd /etc/apache2
# b. Enter the sites-available directory
$ root:/etc/apache2> cd sites-available
# b. Enter the sites-available directory # c. Symlink the Baikal virtualhost file to this directory
$ root:/etc/apache2> cd sites-available $ root:/etc/apache2/sites-available> ln -s /var/www/dav.mydomain.com/Specific/virtualhosts/baikal.apache2
# c. Symlink the Baikal virtualhost file to this directory # d. Customize the virtualhost config file
$ root:/etc/apache2/sites-available> ln -s /var/www/dav.mydomain.com/Specific/virtualhosts/baikal.apache2 $ root:/etc/apache2/sites-available> nano baikal.apache2
# d. Customize the virtualhost config file # e. In baikal.apache2, replace references to dav.mydomain.com with your own domain name
$ root:/etc/apache2/sites-available> nano baikal.apache2
# e. In baikal.apache2, replace references to dav.mydomain.com with your own domain name # f. Activate the new virtualhost
$ root:/etc/apache2/sites-available> cd ../sites-enabled
$ root:/etc/apache2/sites-enabled> ln -s ../sites-available/baikal.apache2
# f. Activate the new virtualhost # h. Restart apache
$ root:/etc/apache2/sites-available> cd ../sites-enabled $ root:/etc/apache2/sites-enabled> /etc/init.d/apache2 restart
$ root:/etc/apache2/sites-enabled> ln -s ../sites-available/baikal.apache2 ```
# h. Restart apache
$ root:/etc/apache2/sites-enabled> /etc/init.d/apache2 restart
##### Setting up the nginx virtualhost ##### Setting up the nginx virtualhost
In our example, we will assume that the nginx configuration directory is: In our example, we will assume that the nginx configuration directory is: `/etc/nginx`
/etc/nginx
# a. Enter the nginx configuration directory ```sh
$ root:/var/www> cd /etc/nginx # a. Enter the nginx configuration directory
$ root:/var/www> cd /etc/nginx
# b. Enter the sites-available directory # b. Enter the sites-available directory
$ root:/etc/nginx> cd sites-available $ root:/etc/nginx> cd sites-available
# c. Symlink the Baikal virtualhost file to this directory # c. Symlink the Baikal virtualhost file to this directory
$ root:/etc/nginx/sites-available> ln -s /var/www/dav.mydomain.com/Specific/virtualhosts/baikal.nginx $ root:/etc/nginx/sites-available> ln -s /var/www/dav.mydomain.com/Specific/virtualhosts/baikal.nginx
# d. Customize the virtualhost config file # d. Customize the virtualhost config file
$ root:/etc/nginx/sites-available> nano baikal.nginx $ root:/etc/nginx/sites-available> nano baikal.nginx
# e. In baikal.nginx, replace references to dav.mydomain.com with your own domain name # e. In baikal.nginx, replace references to dav.mydomain.com with your own domain name
# f. Activate the new virtualhost # f. Activate the new virtualhost
$ root:/etc/nginx/sites-available> cd ../sites-enabled $ root:/etc/nginx/sites-available> cd ../sites-enabled
$ root:/etc/nginx/sites-enabled> ln -s ../sites-available/baikal.nginx $ root:/etc/nginx/sites-enabled> ln -s ../sites-available/baikal.nginx
# h. Restart nginx # h. Restart nginx
$ root:/etc/nginx/sites-enabled> /etc/init.d/nginx restart $ root:/etc/nginx/sites-enabled> /etc/init.d/nginx restart
```
#### 3.2.1.3 - Setting up Baïkal #### 3.2.1.3 - Setting up Baïkal
@ -172,22 +182,26 @@ In a web browser, navigate to http://dav.mydomain.com and follow the instruction
Baïkal "Bleeding-edge" is using composer to install its dependencies. Please check that you have git and composer installed on your system before going any further. Baïkal "Bleeding-edge" is using composer to install its dependencies. Please check that you have git and composer installed on your system before going any further.
# a. Checkout the Baïkal source code ```sh
$ root:/var/www> git clone https://github.com/jeromeschneider/Baikal.git dav.mydomain.com # a. Checkout the Baïkal source code
$ root:/var/www> git clone https://github.com/jeromeschneider/Baikal.git dav.mydomain.com
# b. Enter the new dav.mydomain.com directory # b. Enter the new dav.mydomain.com directory
$ root:/var/www> cd dav.mydomain.com $ root:/var/www> cd dav.mydomain.com
```
In order to grant Apache access to the files of your Baïkal installation, In order to grant Apache access to the files of your Baïkal installation,
you'll have to grant the user running the apache process r+w permissions on you'll have to grant the user running the apache process `r+w` permissions on
the Baïkal files. In our example, we will suppose the linux username/usergroup the Baïkal files. In our example, we will suppose the linux username/usergroup
running Apache is www-data:www-data running Apache is `www-data:www-data`
# c. Install Baïkal dependencies using composer ```sh
$ root:/var/www/dav.mydomain.com> composer install # c. Install Baïkal dependencies using composer
$ root:/var/www/dav.mydomain.com> composer install
# d. Change permissions on the files # d. Change permissions on the files
$ root:/var/www/dav.mydomain.com> chown www-data:www-data . -Rf $ root:/var/www/dav.mydomain.com> chown www-data:www-data . -Rf
```
You now have to declare Baïkal in your webserver. You may follow instructions in **"3.2.1.2 - Setting up a Web Server"** above to do so. You now have to declare Baïkal in your webserver. You may follow instructions in **"3.2.1.2 - Setting up a Web Server"** above to do so.
@ -275,22 +289,20 @@ Add a new CalDAV account:
Add a new CalDAV account: Add a new CalDAV account:
* in Settings > Accounts > Add Account > Advanced * in Settings > Accounts > Add Account > Advanced
* Select "CalDAV" * Select "CalDAV"
* Username: the username you just created * Username: the username you just created
* Password: the password you just defined * Password: the password you just defined
* Server Address: dav.mydomain.com/cal.php/calendars/username/default * Server Address: `dav.mydomain.com/cal.php/calendars/username/default` and replace domain and username with the correct values
and replace domain and username with the correct values
Add a new CardDAV account: Add a new CardDAV account:
* in Settings > Accounts > Add Account > Advanced * in Settings > Accounts > Add Account > Advanced
* Select "CardDAV" * Select "CardDAV"
* Username: the username you just created * Username: the username you just created
* Password: the password you just defined * Password: the password you just defined
* Email Address: an email address you want this CardDAV account to be assigned to * Email Address: an email address you want this CardDAV account to be assigned to
* Server Address: dav.mydomain.com/card.php/addressbooks/username/default * Server Address: `dav.mydomain.com/card.php/addressbooks/username/default` and replace domain and username with the correct values
and replace domain and username with the correct values
__Important notes:__ __Important notes:__
@ -349,4 +361,4 @@ sudo ln -s /etc/apache2/sites-available/baikal /etc/apache2/sites-enabled
sudo service apache2 restart sudo service apache2 restart
``` ```
Point your browser to http://hostname/baikal and there you go. Point your browser to http://hostname/baikal and there you go.