Owncloud: Difference between revisions
Line 202: | Line 202: | ||
==Turvalise üheduse huvides määrame serveri kasutama SSL protokolli ehk Https-i== | ==Turvalise üheduse huvides määrame serveri kasutama SSL protokolli ehk Https-i== | ||
http://ubuntuserverguide.com/2013/04/how-to-setup-owncloud-server-5-with-ssl-connection.html | http://ubuntuserverguide.com/2013/04/how-to-setup-owncloud-server-5-with-ssl-connection.html <br> | ||
http://sharadchhetri.com/2013/05/24/how-to-configure-self-signed-ssl-certificate-in-owncloud-ubuntu/ | http://sharadchhetri.com/2013/05/24/how-to-configure-self-signed-ssl-certificate-in-owncloud-ubuntu/ | ||
'''Loome kausta SSL sertidele:''' | |||
<pre># mkdir -p /etc/apache2/ssl</pre> | |||
'''Loome Self Signed sertifikaadi''' | |||
<pre> | |||
openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/owncloud.pem -keyout /etc/apache2/ssl/owncloud.key</pre> | |||
'''Häälestame owncloud.conf faili''' | |||
Owncloud.conf failis suuname port 80 päringud porti 443. | |||
Avame faili muutmiseks: | |||
<pre>nano /etc/apache2/conf.d/owncloud.conf</pre> | |||
Lisame sinna sisu: | Lisame sinna sisu: | ||
<pre> | |||
<VirtualHost 192.168.56.200:80> | <VirtualHost 192.168.56.200:80> | ||
RewriteEngine on | RewriteEngine on | ||
Line 226: | Line 237: | ||
</Directory> | </Directory> | ||
</VirtualHost> | </VirtualHost> | ||
</pre> | |||
Muutke 192.168.56.200 teie serveri IP aadressiks, või kui on kasutusel DNS , siis servri nimeks. | |||
Teeme teenusele restardi: | |||
<pre> | |||
service apache2 restart | service apache2 restart | ||
</pre> | |||
Revision as of 12:14, 4 December 2013
OwnCloud Serveri installeerimine
Sissejuhatus
OwnCloud on avatud lähetekoodiga vaba tarkvara, millega saab luua endale oma privaatpilve failide vahteamsieks. On oma põhimõttelt väga Dropboxi sarnane.
Koduleht: Http://owncloud.org
Instaleerimine Ubuntu LTS 12.04 serverile
Installeerime Owncloud serveri Koolis antud ubuntu serveri peale
Server
RAM 512MB
HDD dynamicly allocated 8GB
2 Võrgukaarti NIC1 - NAT (eth0 - Ubuntus) ja NIC2 - HostOnly (eth1 - Ubuntus)
Logige serverisse sisse ja seadistage võrk failis /etc/network/interfaces (liidese eth1 ip aadress 192.168.56.200).
Installi info ja failid on saadaval: http://owncloud.org/install/
Kui Linuxi server töötab, saab asume OwnCloud-i installima:
Selleks on Linuxi distrotes erinevad käsud, siinkohal toome ära Ubuntu versioonide käsud:
Add repository and install manually For xUbuntu 13.04 run the following as root: echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:community:nightly/xUbuntu_13.04/ /' >> /etc/apt/sources.list.d/owncloud.list apt-get update apt-get install owncloud You can add the repository key to apt like this: wget http://download.opensuse.org/repositories/isv:ownCloud:community:nightly/xUbuntu_13.04/Release.key apt-key add - < Release.key For xUbuntu 12.10 run the following as root: echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:community:nightly/xUbuntu_12.10/ /' >> /etc/apt/sources.list.d/owncloud.list apt-get update apt-get install owncloud You can add the repository key to apt like this: wget http://download.opensuse.org/repositories/isv:ownCloud:community:nightly/xUbuntu_12.10/Release.key apt-key add - < Release.key For xUbuntu 12.04 run the following as root: echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:community:nightly/xUbuntu_12.04/ /' >> /etc/apt/sources.list.d/owncloud.list apt-get update apt-get install owncloud You can add the repository key to apt like this: wget http://download.opensuse.org/repositories/isv:ownCloud:community:nightly/xUbuntu_12.04/Release.key apt-key add - < Release.key
Ubuntu 12.04 näide
Lisame repositooriumi owncloudi:
echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:community:nightly/xUbuntu_12.04/ /' >> /etc/apt/sources.list.d/owncloud.list
Lisame Reopositooriumi key:
wget http://download.opensuse.org/repositories/isv:ownCloud:community:nightly/xUbuntu_12.04/Release.key apt-key add - < Release.key
Uuendame repo ja installime:
apt-get update apt-get install owncloud
Installi käigus tuleb konfigureerida ka mysql:
[pilt]
Sql root kasutaja parooliks paneme turvalise parooli, kindlasti ülesse märkida, kuna edaspidi läheb seda vaja.
---installitud :)
Vaatame mis pakkidest OwnCloud sõltub
# apt-cache depends owncloud
owncloud
|Depends: apache2 apache2-mpm-itk apache2-mpm-event apache2-mpm-prefork apache2-mpm-worker Depends: <httpd> apache2-mpm-itk bozohttpd monkey nginx-naxsi tntnet aolserver4-core aolserver4-daemon apache2-mpm-event apache2-mpm-prefork apache2-mpm-worker boa cherokee ebhttpd lighttpd mathopd micro-httpd mini-httpd nginx-extras nginx-full nginx-light ocsigen webfs yaws Depends: php5 Depends: php5-mysql Depends: php5-sqlite Depends: php5-common Depends: php5-gd Depends: php-xml-parser |Depends: ntp Depends: <time-daemon> chrony openntpd |Recommends: clamav Recommends: clamav-daemon Recommends: curl |Recommends: exim4 Recommends: <mail-transport-agent> citadel-mta courier-mta esmtp-run exim4-daemon-light lsb-invalid-mta masqmail msmtp-mta nullmailer qmail-run sendmail-bin ssmtp xmail dma:i386 dma exim4-daemon-heavy postfix
Mysql häälestamine
Serveris logime mysql konsooli sisse root kasutajana:
mysql -u root -p
Selle käsu täitmise jooksul küsitakse Mysql root parooli mille ennist panime serverile.
Järgmiseks loome owncloudi jaoks andmebaasi järgmise käsuga:
CREATE DATABASE owncloud;
Anname kasutajale owncloud õigused andmebaasi kasutada: Selles käsus muudame enne ära "some_password" turvalise parooliga.
GRANT ALL ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'some_password';
Testime kas veebileht töötab
Alustuseks teeme teenusele restardi:
service apache2 restart
Nüüd avaneb aadressilt:[serveri IP]/owncloud meil selleks http://192.168.56.200/owncloud/ Selline leht:
[pilt]
Loome admin kasutaja: admin admin
Loome test kasutaja user user
Turvalise üheduse huvides määrame serveri kasutama SSL protokolli ehk Https-i
http://ubuntuserverguide.com/2013/04/how-to-setup-owncloud-server-5-with-ssl-connection.html
http://sharadchhetri.com/2013/05/24/how-to-configure-self-signed-ssl-certificate-in-owncloud-ubuntu/
Loome kausta SSL sertidele:
# mkdir -p /etc/apache2/ssl
Loome Self Signed sertifikaadi
openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/owncloud.pem -keyout /etc/apache2/ssl/owncloud.key
Häälestame owncloud.conf faili Owncloud.conf failis suuname port 80 päringud porti 443.
Avame faili muutmiseks:
nano /etc/apache2/conf.d/owncloud.conf
Lisame sinna sisu:
<VirtualHost 192.168.56.200:80> RewriteEngine on ReWriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] </VirtualHost> <VirtualHost 192.168.56.200:443> SSLEngine on SSLCertificateFile /etc/apache2/ssl/owncloud.pem SSLCertificateKeyFile /etc/apache2/ssl/owncloud.key DocumentRoot /var/www/owncloud/ <Directory /var/www/owncloud/> AllowOverride All order allow,deny Allow from all </Directory> </VirtualHost>
Muutke 192.168.56.200 teie serveri IP aadressiks, või kui on kasutusel DNS , siis servri nimeks.
Teeme teenusele restardi:
service apache2 restart
Https nüüd töötab
Lubame suurte failide synkimise php.ini-s
http://doc.owncloud.org/server/5.0/admin_manual/configuration/configuring_big_file_upload.html
Klienttarkvara install
Linuksile kliendi
http://owncloud.org/sync-clients/
For xUbuntu 12.04 run the following as root:
echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:devel/xUbuntu_12.04/ /' >>
/etc/apt/sources.list.d/owncloud-client.list apt-get update apt-get install owncloud-client
You can add the repository key to apt like this:
wget http://download.opensuse.org/repositories/isv:ownCloud:devel/xUbuntu_12.04/Release.key apt-key add - < Release.key
Klient installitud ubuntu kliendile:
pilt
Proovitud iso faili synkis ilusti ära 750MB
http://fabianpeter.de/cloud/owncloud-migrating-from-sqlite-to-mysql/ https://wiki.itcollege.ee/index.php/Veebiserveri_labor_v.2#Sertifikaadi_genereerimine