Maybe
Or you can restore it manually
Maybe
Or you can restore it manually
Manually I have no idea how to do it
I can help you with that
first you need to run this script, it installs all the services and packages needed for owncloud to work
to create a skript, simply open a file with a editor, for example nano and paste the contend, save and make it executalbe.
for example:
nano script1.sh
chmod +x script1.sh
#!/bin/sh
echo "Updating & Upgrading"
apt update && apt upgrade -y
echo "Installing Modules"
apt install -y apache2 mariadb-server \
libapache2-mod-php7.0 php7.0-ldap \
php7.0-gd php7.0-mysql php7.0-curl \
php7.0-intl php7.0-mcrypt php-imagick \
php7.0-zip php7.0-xml php7.0-mbstring \
php-apcu ssh php-apcu php-redis redis-server \
wget nano bzip2 sudo inetutils-ping rsync
echo "Creating ownCloud.conf"
FILE="/etc/apache2/sites-available/owncloud.conf"
/bin/cat <<EOM >$FILE
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>
EOM
echo "Creating Symlink"
ln -s /etc/apache2/sites-available/owncloud.conf \
/etc/apache2/sites-enabled/owncloud.conf
echo "Enabling a2mod Modules"
a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
a2enmod setenvif
service apache2 restart
Then you can run this script to install owncloud
Community Script
#!/bin/bash
clear
echo -e "\n Community Installation"
wget https://download.owncloud.org/community/owncloud-9.1.6.tar.bz2
echo -e "\n Extracting Community Edition"
tar -xjf owncloud-9.1.6.tar.bz2
echo -e "\n Moving ownCloud"
mv owncloud /var/www
echo -e "\n Creating owncloud.conf"
FILE="/etc/apache2/sites-available/owncloud.conf"
/bin/cat <<EOM >$FILE
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>
EOM
echo -e "\n Changing ownership of owncloud"
chown -R www-data:www-data /var/www/owncloud/
echo -e "\n Creating database"
service mysql start
mysql -u root -e "CREATE DATABASE IF NOT EXISTS owncloud; \
GRANT ALL PRIVILEGES ON owncloud.* TO admin@localhost IDENTIFIED BY 'password'";
cd /var/www/owncloud
sudo -u www-data php occ maintenance:install \
--database "mysql" --database-name "owncloud" \
--database-user "admin" --database-pass "password" \
--admin-user "admin" --admin-pass "password"
cd /
FILE="services.sh"
/bin/cat <<EOM >$FILE
#!/bin/bash
service apache2 start
service mysql start
EOM
chmod +x services.sh
echo "ServerName localhost" >> /etc/apache2/apache2.conf
./services.sh
echo -e "\n Setup is finished"
if I install php5 and all related packages, it tells me that it can not fix some dependencies and stop the installation, install php7 directly?
Just take my scripts. Debian9 works with php7
I install this command? but i don’t use mariadb for database… i use mysql
mariadb-server is recomended for owncloud
you can try my setup, and then switch to your database
I have installed the LAMP server (with php7 and mariadb-server) now how do I proceed to install mycloud?
You can use my scripts, they install all the things needed for owncloud and owncloud itself
I managed to install owncloud, typing the IP I see the login screen (which I did not do) now I have to copy the scrpts you posted?
No, the scripts were for installing owncloud. If you already done this, you don’t need the scripts. Does ownCloud work now?
I understood that I should have used it to complete installation … version 9
Sorry then I had not make myself clear.
I use those scripts to install ownCloud on my system.
Should I repeat the installation following your script?
First figure out if your installation is working, if yes, you don’t need to reinstall. If not, you can reinstall.
As I said by typing my IP / owncloud, I see the login screen (I did not log in though)
That’s good, you can login to check if everything is working properly
Accessed, version: 9.0.10
PS at the moment the data folder has not yet been moved to the external HD, the files are still present in the owncloud source folder … and this time I did not give the command: sudo chown -R www-data: www-data / var / www /
good good, now you can try to update. Do you know how?