Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wtlinux_server_setup
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
w4t
wtlinux_server_setup
Commits
af2f3391
Commit
af2f3391
authored
Mar 11, 2025
by
w4t
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtserver 0.27
parent
7c83f68b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
2 deletions
+59
-2
install_owncloud.sh
distros/debian12/install_owncloud.sh
+58
-1
install_webserver.sh
distros/debian12/install_webserver.sh
+1
-1
No files found.
distros/debian12/install_owncloud.sh
View file @
af2f3391
...
...
@@ -61,7 +61,7 @@ InstallNextcloud() {
apt_install php8.2 php8.2-fpm php8.2-cli php8.2-sqlite php8.2-gd php8.2-imap php8.2-curl php-pear curl
\
php8.2-dev memcached php-memcached php8.2-xml php8.2-mbstring php8.2-zip php8.2-apcu
\
php8.2-fpm php8.2-mysql php8.2-xsl php8.2-gmp php8.2-bcmath php8.2-cgi php-gettext libxml2-dev
\
php8.2-
json php8.2-
intl php8.2-imagick php8.2-common php8.2-opcache php8.2-readline php8.2
php8.2-intl php8.2-imagick php8.2-common php8.2-opcache php8.2-readline php8.2
# Enable APC before Nextcloud tools are run
sed
-i
'1i apc.enabled=1\napc.enable_cli=1'
/etc/php/8.2/mods-available/apcu.ini
...
...
@@ -123,6 +123,63 @@ InstallNextcloud() {
else
InstallNextcloudVer
$owncloud_ver
$owncloud_hash
fi
# Configure Nextcloud permissions
cat
>>
./nextcloud_permissions.sh
<<
EOF
#!/bin/bash
ocpath='
$CLOUD_DIR
'
htuser='www-data'
htgroup='www-data'
rootuser='root'
printf "Creating possible missing Directories
\n
"
mkdir -p
\$
ocpath/data
mkdir -p
\$
ocpath/assets
mkdir -p
\$
ocpath/updater
printf "chmod Files and Directories
\n
"
find
\$
{ocpath}/ -type f -print0 | xargs -0 chmod 0640
find
\$
{ocpath}/ -type d -print0 | xargs -0 chmod 0770
printf "Setting directory ownership
\n
"
chown -R
\$
{rootuser}:
\$
{htgroup}
\$
{ocpath}/
chown -R
\$
{htuser}:
\$
{htgroup}
\$
{ocpath}/apps/
chown -R
\$
{htuser}:
\$
{htgroup}
\$
{ocpath}/assets/
chown -R
\$
{htuser}:
\$
{htgroup}
\$
{ocpath}/config/
chown -R
\$
{htuser}:
\$
{htgroup}
\$
{ocpath}/data/
chown -R
\$
{htuser}:
\$
{htgroup}
\$
{ocpath}/themes/
chown -R
\$
{htuser}:
\$
{htgroup}
\$
{ocpath}/updater/
chmod +x
\$
{ocpath}/occ
printf "Setting .htaccess permissions
\n
"
if [ -f
\$
{ocpath}/.htaccess ]; then
chmod 0644
\$
{ocpath}/.htaccess
chown
\$
{rootuser}:
\$
{htgroup}
\$
{ocpath}/.htaccess
fi
if [ -f
\$
{ocpath}/data/.htaccess ]; then
chmod 0644
\$
{ocpath}/data/.htaccess
chown
\$
{rootuser}:
\$
{htgroup}
\$
{ocpath}/data/.htaccess
fi
EOF
chmod
+x ./nextcloud_permissions.sh
#./nextcloud_permissions.sh
# Create initial configuration
instanceid
=
oc
$(
echo
$CFG_HOSTNAME_DOMAIN
|
sha1sum
|
fold
-w
10 |
head
-n
1
)
echo
-n
"Creating Nextcloud settings and database..."
CFG_CLOUDDBNAME
=
nextcloud
CFG_CLOUDDBUSER
=
nextcloud
CFG_CLOUDDBPWD
=
$(
dd
if
=
/dev/urandom
bs
=
1
count
=
64 2>/dev/null |
sha256sum
|
fold
-w
40 |
head
-n
1
)
dbruser
=
root
CFG_CLOUDADMINUSER
=
root
CFG_CLOUDADMINPWD
=
$(
dd
if
=
/dev/urandom
bs
=
1
count
=
64 2>/dev/null |
sha256sum
|
fold
-w
40 |
head
-n
1
)
}
#---------------------------------------------------------------------
...
...
distros/debian12/install_webserver.sh
View file @
af2f3391
...
...
@@ -304,7 +304,7 @@ EOF
echo
-n
-e
"
$IDENTATION_LVL_1
Installing extra PHP and Modules...
\n
"
if
[[
"
$CFG_PHP_VERSION
"
==
*
"none"
*
]]
;
then
echo
-e
"No PHP version selected for installation."
echo
-e
"
$IDENTATION_LVL_2
No PHP version selected for installation."
else
wget
-O
/etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
>
/dev/null 2>&1
echo
"deb https://packages.sury.org/php/
$(
lsb_release
-c
-s
)
main"
>
/etc/apt/sources.list.d/php.list
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment