Difference between revisions of "OwnCloud"

From Wikislax
Jump to: navigation, search
(Created page with "{{RightTOC}} == What is OwnCloud ? == [http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different cli...")
 
Line 15: Line 15:
 
  # cd ..
 
  # cd ..
 
  # chown -R apache:apache owncloud
 
  # chown -R apache:apache owncloud
 
That's it. <u>Note</u> : the other package Dahdi-tools is not required. <u>Other note</u> : Dahdi requires a kernel compiled with CONFIG_CRC_CCITT=y.
 
 
== Installing Jansson ==
 
 
Jansson is a required Json development library. [http://www.digip.org/jansson/releases/ Download] then untar and install.
 
 
# tar -C /usr/local -xvf jansson-x.y.z.tar.gz
 
# cd /usr/local/jansson-linux-x.y.z
 
# ./configure --prefix=/usr/local --libdir=/usr/local/lib64
 
# make
 
# make install
 
# make clean
 
 
== Installing c-client ==
 
 
The asterisk imap option requires presence of library c-lient.a, which is part of Imap-uw, by the University of Washington. The University of Washington seems to be no longer distributing the software so we keep a copy for your convenience. [{{SERVER}}/wikislax/download/c-client.tar.Z Download] then untar and install :
 
 
# gunzip c-client.tar.Z
 
# tar -C /usr/local -xvf c-client.tar
 
# cd /usr/local
 
# chown -R root:root imap-2007f
 
# chmod -R o-w imap-2007f
 
# cd imap2007f
 
# make slx EXTRACFLAGS="-I/usr/include/openssl -g -O2 -fPIC" SSLCERTS=/etc/ssl/certs SSLKEYS=/etc/ssl/private
 
 
== Installing Speex ==
 
 
Speex is a required free codec. [https://www.speex.org/downloads/ Download] speex source code then untar and install.
 
 
# tar -C /usr/local -xvf speex-x.y.z.tar.gz
 
# cd /usr/local/speex-x.y.z
 
# ./configure --prefix=/usr/local --libdir=/usr/local/lib64
 
# make
 
# make install
 
# make clean
 
 
== Installing Asterisk ==
 
 
[http://www.asterisk.org/downloads Download Asterisk] then untar and install. Make menuselect affords choosing which components to use. If using mysql, be sure to read the next paragraph before invoking make. Otherwise proceed. make samples affords creating the configuration files in /usr/local/etc/asterisk.
 
 
# groupadd asterisk
 
# useradd -g asterisk asterisk
 
# tar -C /usr/local --no-same-permissions --no-same-owner -xvf asterisk-x.y.z.t.tar.gz
 
# cd /usr/local/asterisk-x.y.z.t
 
# ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --mandir=/usr/local/man \
 
--with-asound --with-crypto --with-iconv --with-imap=/usr/local/imap-2007f \
 
--with-jansson --with-ldap --with-speex --with-ssl
 
# make menuselect
 
# make
 
# make install
 
# make install-logrotate
 
# make samples
 
# make clean
 
# chown -R asterisk:asterisk /usr/local/lib64/asterisk
 
# chown -R asterisk:asterisk /usr/local/var/lib/asterisk
 
# chown -R asterisk:asterisk /usr/local/var/log/asterisk
 
# chown -R asterisk:asterisk /usr/local/var/run/asterisk
 
# chown -R asterisk:asterisk /usr/local/var/spool/asterisk
 
# chmod o+x /usr/local/etc/asterisk
 
# chmod o-x /usr/local/lib64/asterisk
 
# chmod o-x /usr/local/var/lib/asterisk
 
# chmod o-x /usr/local/var/log/asterisk
 
# chmod o-x /usr/local/var/run/asterisk
 
# chmod o-x /usr/local/var/spool/asterisk
 
 
If using mysql modules, there might be a glitch with the mysql include path. Replace in the files below the lines with "#include <mysql/mysql.h>" by lines with "#include <mysql.h>" (removing the directory) :
 
 
addons/app_mysql.c
 
addons/cdr_mysql.c
 
addons/res_config_mysql.c
 
 
It is then possible to launch asterisk in the foreground with various levels of verbosity (depending on the number of v's). However the default configuration files include a number of options that we don't want, so we'll rename them first and start with empty files. Asterisk includes a console and then proposes a shell  :
 
 
# cd /usr/local/etc/asterisk
 
# mv extensions.conf extensions.conf.sample
 
# mv extensions.ael extensions.ael.sample
 
# mv sip.conf sip.conf.sample
 
# sudo -u asterisk asterisk -vvvc
 
. . .
 
*CLI>
 
 
Type '''help''' to view the available commands, however before doing anything useful we'll need to modify the configuration files so let's just '''core stop gracefully''' here.
 
 
== Running asterisk ==
 
 
Asterisk runs as a daemon so must be launched at startup and stopped at shutdown. Update /etc/rc.d/rc.local and /etc/rc.d/rc.local_shutdown accordingly :
 
 
# vi /etc/rc.d/rc.local
 
. . .
 
# start asterisk
 
if [ -x /usr/local/sbin/safe_asterisk ]; then
 
        echo "Starting asterisk: /usr/local/sbin/safe_asterisk -G asterisk -U asterisk -p"
 
        /usr/local/sbin/safe_asterisk -G asterisk -U asterisk -p
 
fi
 
<esc>
 
:x
 
# vi /etc/rc.d/rc.local_shutdown
 
. . .
 
# stop asterisk
 
if [ -r /usr/local/var/run/asterisk/asterisk.pid ]; then
 
        echo "Stopping asterisk: kill -INT `cat /usr/local/var/run/asterisk/asterisk.pid`"
 
        kill -INT `cat /usr/local/var/run/asterisk/asterisk.pid`
 
fi
 
<esc>
 
:x
 
 
== Configuring Asterisk ==
 
 
Asterisk running in the backgroung, it's possible to attach to the process using '''asterisk -r''' and to exit the asterisk shell by typing '''exit'''. Most of the configuration files can be modified externally then reloaded using commands such as '''dialplan reload''', '''sip reload''', or '''voicemail reload'''. A few files however cannot (example confbridge.conf), and require restarting using '''core restart now'''. Type '''help''' to get a complete list of commands.
 
 
The configuration files are created under EPREFIX/etc and there are many of them (112 in version 1.15.0.0 !). The bad news is that they must be all reviewed and modified to remove unneeded configuration options. When done though, modifying only a few will afford getting a working system with a reasonnable set of features. We decided to use LDAP to configure our users so this is what is detailed below.
 
 
<u>Note</u> : the asterisk configuration files are organized in contexts whose names are enclosed in square brackets on a line of its own. Definitions in these contexts - otherwise mentionned - are valid inside these contexts only.
 
 
{| {{thead}}
 
|-
 
! {{chead}} width="150" | Configuration file
 
! {{chead}} | Usage
 
|-
 
| [[Sip.conf|sip.conf]]
 
| to configure sip accounts
 
|-
 
| [[Res_ldap.conf|res_ldap.conf]]
 
| to configure LDAP users
 
|-
 
| [[Confbridge.conf|confbridge.conf]]
 
| to configure conferences
 
|-
 
| [[Voicemail.conf|voicemail.conf]]
 
| to configure voicemail boxes
 
|-
 
| [[Extensions.conf|extensions.conf]]
 
| to configure the dialplan
 
|}
 
  
 
<br clear=all>
 
<br clear=all>
 
== Documentation ==
 
 
[https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Documentation Asterisk Wiki]
 
 
[{{SERVER}}/wikislax/download/Asterisk.pdf Asterisk Book]
 
  
 
<br/>
 
<br/>
  
{{pFoot|[[Sucknews]]|[[Main Page]]|[[Sip.conf]]}}
+
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}

Revision as of 15:16, 18 January 2025

What is OwnCloud ?

OwnCloud is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.

Installing OwnCloud

OwnCloud is available as a PHP application relying on various databases. See the OwnCloud documentation for details. We will be using MySQL. download tarball then untar and install.

# tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2
# chown -R apache:apache owncloud
# cd /var/www/htdocs
# ln -s /usr/local/owncloud owncloud
# cd ..
# chown -R apache:apache owncloud



Asterisk Main Page Desktop software