TEST NEXTCLD

This commit is contained in:
2026-04-17 22:32:38 +05:00
parent a50b0ab265
commit e765683667
5 changed files with 92 additions and 0 deletions

25
next/README.txt Normal file
View File

@@ -0,0 +1,25 @@
Создайте базу данных и пользователя для Nextcloud:
CREATE USER nextcloud WITH PASSWORD 'P@ssw0rd';
ALTER USER nextcloud WITH PASSWORD 'P@ssw0rd';
CREATE DATABASE nextcloud OWNER nextcloud;
```CREATE DATABASE nextcloud;
CREATE USER nextcloud WITH PASSWORD 'P@ssw0rd';
GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;
/q
su - postgres -s /bin/bash -c "psql -U nextcloud -d nextcloud -h localhost"
cd /var/www/
wget https://download.nextcloud.com/server/releases/nextcloud-33.0.0.zip
unzip -o nextcloud-33.0.0.zip
rm nextcloud-33.0.0.zip
chown -R www-data:www-data /var/www/nextcloud
chmod -R 755 /var/www/nextcloud

BIN
next/nextcloud-33.0.0.zip Normal file

Binary file not shown.

18
next/razvertnext1.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
apt-get install -y apache2 apache2-mod_ssl postgresql16 postgresql16-contrib php8.2 apache2-mod_php 8.2 php8.2-pgsql php8.2-gd php8.2-json php8.2-xml php8.2-mbstring php8.2-zip php8.2-curl php8.2-intl php8.2-bcmath php8.2-gmp php8.2-imagick php8.2-apcu php8.2-pdo php8.2-xml php8.2-openssl php8.2-pcntl php8.2-xmlreader php8.2-ldap wget unzip
a2enmod rewrite headers env dir mime setenvif ssl proxy proxy_fcgi
systemctl restart apache2
php -v
systemctl start postgresql
systemctl status postgresql
ls -la /var/lib/pgsql/data/
su - postgres -s /bin/bash -c "initdb -D /var/lib/pgsql/data"
systemctl start postgresql
systemctl status postgresql
systemctl enable postgresql
su - postgres -s /bin/bash -c "psql"

48
next/razvertnext2.sh Normal file
View File

@@ -0,0 +1,48 @@
#!/bin/bash
cd /var/www/
wget https://download.nextcloud.com/server/releases/nextcloud-33.0.0.zip
unzip -o nextcloud-33.0.0.zip
rm nextcloud-33.0.0.zip
chown -R www-data:www-data /var/www/nextcloud
chmod -R 755 /var/www/nextcloud
mkdir -p /etc/ssl/nextcloud
cd /etc/ssl/nextcloud
openssl genrsa -out ca.key 4096
openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 -out ca.crt -subj "/C=RU/ST=Local/L=Local/O=AU Team/CN=AU Team Root CA"
openssl genrsa -out ncloud.au.team.key 2048
openssl req -new -key ncloud.au.team.key -out ncloud.au.team.csr -subj "/C=RU/ST=Local/L=Local/O=AU Team/CN=ncloud.au.team"
cat <<EOF | sudo tee ncloud.au.team.ext
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = ncloud.au.team
EOF
openssl x509 -req -in ncloud.au.team.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out ncloud.
au.team.crt -days 365 -sha256 -extfile ncloud.au.team.ext
mkdir -p /etc/ssl/nextcloud
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/nextcloud/ncloud.au.team.key -out /etc/ssl/nextcloud/ncloud.au.team.crt
echo "<?php phpinfo(); ?>" > /var/www/html/info.php
apt-get install -y python3-certbot-dns-rfc2136
# tsig-keygen -a HMAC-SHA512 certbot-key

1
next/test.txt Normal file
View File

@@ -0,0 +1 @@
AWAW