Nextcloud: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Signux (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Signux (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 37: | Zeile 37: | ||
return $templateResponse; | return $templateResponse; | ||
} | } | ||
</pre> | |||
nextcloude 11 hab ich ein wenig anpassen müssen das curl eine port range local benutzt. dazu musste ich die Datei 3rdparty/guzzlehttp/ringphp/src/client/CurlFactory.php wie folgt anpassen: | |||
<pre> | |||
public function __invoke(array $request, $handle = null) | |||
{ | |||
$headers = []; | |||
$options = $this->getDefaultOptions($request, $headers); | |||
// my modifications | |||
$options[CURLOPT_LOCALPORT]=60000; | |||
$options[CURLOPT_LOCALPORTRANGE]=100; | |||
$this->applyMethod($request, $options); | |||
if (isset($request['client'])) { | |||
$this->applyHandlerOptions($request, $options); | |||
} | |||
$this->applyHeaders($request, $options); | |||
unset($options['_headers']); | |||
// Add handler options from the request's configuration options | |||
if (isset($request['client']['curl'])) { | |||
$options = $this->applyCustomCurlOptions( | |||
$request['client']['curl'], | |||
$options | |||
); | |||
} | |||
if (!$handle) { | |||
$handle = curl_init(); | |||
} | |||
$body = $this->getOutputBody($request, $options); | |||
curl_setopt_array($handle, $options); | |||
return [$handle, &$headers, $body]; | |||
} | |||
</pre> | </pre> | ||
Version vom 13. Dezember 2016, 21:21 Uhr
nextcloud installieren emerge -av nextcloud
Datenbank-Nutzer in mariadb anlegen
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; CREATE DATABASE IF NOT EXISTS nextcloud; GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost' IDENTIFIED BY 'password';
Firewall probleme:
nextcloud versucht beim login nach hause zu telefonieren um genau zu sein nach https://apps.owncloud.com um zB neue versionen von apps anzeigen lassen zu können... Das versuch ich zu unterbinden in dem ich an der Methode viewApps() der Klasse settings/Controller/AppSettingsController ein wenig manipuliere.
/**
* @NoCSRFRequired
* @param string $category
* @return TemplateResponse
*/
public function viewApps($category = '') {
$categoryId = $this->getCategory($category);
if ($categoryId === self::CAT_ENABLED) {
// Do not use an arbitrary input string, because we put the category in html
$category = 'enabled';
}
$params = [];
$params['experimentalEnabled'] = $this->config->getSystemValue('appstore.experimental.enabled', false);
$params['category'] = $category;
$params['appstoreEnabled'] = $this->config->getSystemValue('appstoreenabled', true) === true;
$this->navigationManager->setActiveEntry('core_apps');
$templateResponse = new TemplateResponse($this->appName, 'apps', $params, 'user');
$policy = new ContentSecurityPolicy();
// $policy->addAllowedImageDomain('https://apps.owncloud.com');
$templateResponse->setContentSecurityPolicy($policy);
return $templateResponse;
}
nextcloude 11 hab ich ein wenig anpassen müssen das curl eine port range local benutzt. dazu musste ich die Datei 3rdparty/guzzlehttp/ringphp/src/client/CurlFactory.php wie folgt anpassen:
public function __invoke(array $request, $handle = null)
{
$headers = [];
$options = $this->getDefaultOptions($request, $headers);
// my modifications
$options[CURLOPT_LOCALPORT]=60000;
$options[CURLOPT_LOCALPORTRANGE]=100;
$this->applyMethod($request, $options);
if (isset($request['client'])) {
$this->applyHandlerOptions($request, $options);
}
$this->applyHeaders($request, $options);
unset($options['_headers']);
// Add handler options from the request's configuration options
if (isset($request['client']['curl'])) {
$options = $this->applyCustomCurlOptions(
$request['client']['curl'],
$options
);
}
if (!$handle) {
$handle = curl_init();
}
$body = $this->getOutputBody($request, $options);
curl_setopt_array($handle, $options);
return [$handle, &$headers, $body];
}