Owncloud installieren: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(→Links) |
|||
(13 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
== Voraussetzungen == | |||
<pre> | |||
sudo apt-get install php5-gd php5-curl | |||
sudo a2enmod headers | |||
</pre> | |||
Für ''passwords''-App: | |||
<pre> | |||
sudo apt-get install php5-mcrypt | |||
sudo php5enmod mcrypt | |||
</pre> | |||
== Installation == | == Installation == | ||
Zeile 17: | Zeile 30: | ||
<pre> | <pre> | ||
mysql -u root -p | mysql -u root -p | ||
mysql> create database if not exists | mysql> create database if not exists owncloud; | ||
mysql> create user | mysql> create user 'owncloud'@'%' identified by '<password>'; | ||
mysql> grant all privileges on owncloud.* to 'owncloud'@'%'; | mysql> grant all privileges on owncloud.* to 'owncloud'@'%'; | ||
mysql> create user | mysql> create user 'owncloud'@'localhost' identified by '<password>'; | ||
mysql> grant all privileges on owncloud.* to 'owncloud'@'localhost'; | mysql> grant all privileges on owncloud.* to 'owncloud'@'localhost'; | ||
mysql> flush privileges; | mysql> flush privileges; | ||
Zeile 65: | Zeile 76: | ||
<pre> | <pre> | ||
cd /etc/apache2/sites-available/ | cd /etc/apache2/sites-available/ | ||
sudo nano owncloud. | sudo nano cloud.conf | ||
</pre> | |||
<pre> | |||
<VirtualHost *:80> | |||
ServerName cloud.kirner.or.at | |||
ServerAlias cloud.kirner.or.at | |||
Redirect / https://cloud.kirner.or.at | |||
</VirtualHost> | |||
</pre> | |||
<pre> | |||
sudo nano cloud-ssl.conf | |||
</pre> | |||
<pre> | |||
<VirtualHost *:443> | |||
ServerName cloud.kirner.or.at | |||
ServerAlias cloud.kirner.or.at | |||
SSLEngine on | |||
SSLCertificateFile /etc/ssl/certs/owncloud.crt | |||
SSLCertificateKeyFile /etc/ssl/private/apache.key | |||
# Pfad zu den Webinhalten | |||
DocumentRoot /var/www/owncloud | |||
KeepAlive On | |||
KeepAliveTimeout 5 | |||
<IfModule mod_headers.c> | |||
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" | |||
</IfModule> | |||
ErrorLog ${APACHE_LOG_DIR}/cloud.kirner.or.at-error.log | |||
CustomLog ${APACHE_LOG_DIR}/cloud.kirner.or.at-access.log combined | |||
</VirtualHost> | |||
</pre> | |||
<pre> | |||
sudo a2ensite owncloud | |||
sudo a2ensite owncloud-ssl | |||
sudo service apache2 reload | |||
</pre> | </pre> | ||
Zeile 85: | Zeile 136: | ||
sudo apt-get install php-pear | sudo apt-get install php-pear | ||
sudo pecl install redis | sudo pecl install redis | ||
</pre> | |||
<pre> | |||
wget https://pecl.php.net/get/redis-2.2.8.tgz | |||
tar zxpf redis* | |||
cd redis* | |||
phpize | |||
./configure | |||
make | |||
make install | |||
</pre> | |||
Danach befindet sich die kompilierte Datei in folgenden Pfad: | |||
<pre> | |||
/usr/lib/php5/20121212/redis.so | |||
</pre> | </pre> | ||
Zeile 105: | Zeile 171: | ||
Zurück zu [[ | Zurück zu [[Owncloud installieren (unterschiedliche Versionen)|Owncloud installieren]] |
Aktuelle Version vom 27. Juli 2020, 18:26 Uhr
Voraussetzungen
sudo apt-get install php5-gd php5-curl sudo a2enmod headers
Für passwords-App:
sudo apt-get install php5-mcrypt sudo php5enmod mcrypt
Installation
Download:
wget https://download.owncloud.org/community/owncloud-8.2.2.zip
In Apache Wurzelverzeichnis verschieben
unzip owncloud-8.2.2.zip sudo mv owncloud /var/www/owncloud/ sudo chown -R www-data:www-data /var/www/owncloud/
Datenbank erstellen:
mysql -u root -p mysql> create database if not exists owncloud; mysql> create user 'owncloud'@'%' identified by '<password>'; mysql> grant all privileges on owncloud.* to 'owncloud'@'%'; mysql> create user 'owncloud'@'localhost' identified by '<password>'; mysql> grant all privileges on owncloud.* to 'owncloud'@'localhost'; mysql> flush privileges; mysql> quit;
Konfiguration
Apache-Konfiguration anlegen
cd /etc/apache2/conf-available/ sudo nano owncloud.conf
Alias /owncloud "/var/www/owncloud/" <Directory "/var/www/owncloud"> Options +FollowSymLinks AllowOverride All <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/owncloud SetEnv HTTP_HOME /var/www/owncloud </Directory> <Directory "/var/www/owncloud/data/"> # just in case if .htaccess gets disabled Require all denied </Directory>
sudo a2enconf owncloud sudo service apache2 reload
Sites
cd /etc/apache2/sites-available/ sudo nano cloud.conf
<VirtualHost *:80> ServerName cloud.kirner.or.at ServerAlias cloud.kirner.or.at Redirect / https://cloud.kirner.or.at </VirtualHost>
sudo nano cloud-ssl.conf
<VirtualHost *:443> ServerName cloud.kirner.or.at ServerAlias cloud.kirner.or.at SSLEngine on SSLCertificateFile /etc/ssl/certs/owncloud.crt SSLCertificateKeyFile /etc/ssl/private/apache.key # Pfad zu den Webinhalten DocumentRoot /var/www/owncloud KeepAlive On KeepAliveTimeout 5 <IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" </IfModule> ErrorLog ${APACHE_LOG_DIR}/cloud.kirner.or.at-error.log CustomLog ${APACHE_LOG_DIR}/cloud.kirner.or.at-access.log combined </VirtualHost>
sudo a2ensite owncloud sudo a2ensite owncloud-ssl sudo service apache2 reload
PHP Memory Cache
sudo apt-get install redis-server php5-redis
Redis-Version checken:
php -i | grep Redis
Falls die Version kleiner als 2.2.5 ist, dann Redis von mittels pecl installieren:
sudo apt-get install php5-dev sudo apt-get install php-pear sudo pecl install redis
wget https://pecl.php.net/get/redis-2.2.8.tgz tar zxpf redis* cd redis* phpize ./configure make make install
Danach befindet sich die kompilierte Datei in folgenden Pfad:
/usr/lib/php5/20121212/redis.so
In der Datei /var/www/owncloud/config/config.php folgende Zeilen hinzufügen:
'filelocking.enabled' => 'true', 'memcache.local' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array ( 'host' => 'localhost', 'port' => 6379, 'timeout' => 0, 'password' => '', ),
Links
https://doc.owncloud.org/server/8.2/admin_manual/maintenance/migrating.html
Zurück zu Owncloud installieren