Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Go to the directory of the server
- cd ..
- #installation the apache2,php7.0,nano,unzip and mariaDB
- apt install apache2 php7.0 nano unzip mariadb-server -y
- # verification of the installation
- apt policy apache2 php7.0 mariadb-server
- #update all
- apt update && apt upgrade -y && apt full-upgrade -y && apt autoremove -y
- #install all php modules needed for NextCloud operation
- apt install -y php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip -y
- #activation of Apache2 module needed
- a2enmod rewrite headers env dir mime && a2enmod setenvif
- #application of apache2 changes
- systemctl restart apache2
- #installation of NextCloud itself
- cd .. && cd /tmp/ && wget https://download.nextcloud.com/server/releases/nextcloud-15.0.9.zip
- #setting up NextCloud in the right directory
- unzip nextcloud-13.0.5.zip -d /var/www/html
- #reparting in the directory of the site to access the nextcloud
- cd && cd ../var/www/ && mv html/nextcloud/* html/
- #give access to Apache2 on NextCloud
- chown -R www-data:www-data /var/www/html/
- # securing the installation of the MariaDB database
- mysql_secure_installation
- Enter your root session password
- Press "Y" and "Enter" and write the password you wish
- Press the enter key again and retype your password one last time
- Press "y" and "Inputs" 4 times
- #lancer MariaDB
- mysql -u root -p
- Enter the password previously entered
- # creates the database
- CREATE DATABASE nextcloud;
- # creates the user
- CREATE USER '<le nom d'utilisateur de votre choix>'@'localhost' IDENTIFIED BY '<le mot de passe de votre choix>';
- # given access to the user's database
- GRANT ALL PRIVILEGES ON <database name previously chosen>. * TO '<previously chosen user>' @ 'localhost';
- #apply the settings and quit
- FLUSH PRIVILEGES;
- QUIT;
- Now go to your internet browser and type in the search bar the ip of your server.
- In the first text fields, write a username and password of your choice. This will be the administrator account.
- At the bottom of the page in the first field write the username of the previously written database
- Tracking the user's password and the user's name
- Then click on finish the installation
- how to move your nextcloud data to a new location.
- The steps used in the are below:
- #Stop apache2
- sudo service apache2 stop
- #Create New Folder
- mkdir /mnt/nextcloud_data
- #Edit config file in default location
- sudo nano /var/www/html/config/config.php
- #Change default location to new location on the config file
- 'datadirectory' => ' /var/www/html/data', to 'datadirectory' => '/mnt/nextcloud_data',
- #Move the data folder to new location
- sudo mv /var/www/html/data /mnt/nextcloud_data
- **********************************************************************
- if required change permissions
- sudo chown -R www-data:www-data /mnt/nextcloud_data
- **********************************************************************
- #Restart apache2
- sudo service apache2 start
- #update nextcloud from ssh
- /usr/sbin/service apache2 stop
- #Delete the NextCloud Folder on /var/www/html
- sudo -u www-data php /var/www/html/updater/updater.phar
- /usr/sbin/service apache2 start
- #Changeing HTTP Port
- Edit /etc/apache2/ports.conf
- a. Change the port numbers as required or add new
- Edit /etc/apache2/sites-available/yournextcloud.conf
- a. Change 80/443 there to the ports in <VirtualHost *:80> (or 443) to what you specified in 1a.
- Restart Apache: sudo service apache2 restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement