Come creare un cloud server con Centos 7 e OwnCloud 7

0

Cloud computing concept with copy space

 

Grazie a dei semplici passaggi è possibile creare un vero e proprio cloud server con Centos 7 e OwnCloud 7 dove archiviare tutti i vostri dati. Ecco come fare.

Installare Centos 7 e lanciare il seguente comando:

yum -y update

Alla fine lanciare:

yum install httpd php php-mysql mariadb-server mariadb sqlite php-dom php-mbstring php-gd php-pdo wget vim

Installati tutti i componenti lanciare:

setsebool -P httpd_unified 1

Abilitate il firewall:

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

Avviate Apache:

systemctl start httpd.service

Avviate MariaDB:

systemctl start mariadb.service

Abilitate l’auto-startup:

systemctl enable httpd.service
systemctl enable mariadb.service

Installare ownCloud

Lanciare il comando:

wget https://download.owncloud.org/community/owncloud-7.0.0.tar.bz2

Estraete il pacchetto tramite:

tar -jxvf owncloud-7.0.0.tar.bz2 -C /var/www/html/

Date i permessi:

chown -R apache.apache /var/www/html/owncloud/

DataBase configuration

configurate il database:

mysql_secure_installation;

Date l’ok Y.

Set root password?[Y/n]New password: databaserootpassword
Re-enter new password: databaserootpassword
Remove anonymous users?[Y/n]Y
Disallow root login remotely?[Y/n]Y
Remove test database and access to it?[Y/n]Y
Reload privilege tables now?[Y/n]

Create il database e l’user ownCloud:

lanciate il comando:

mysql -u root -p

e poi i seguenti comandi:

mysql> create database owncloud;
mysql> create user 'owncloud'@'localhost' identified by'somedatabasepassword'; 
mysql> grant all on owncloud.* to 'owncloud'@'localhost';
mysql> flush privileges;
mysql> quit;

Configurate il server Apache:

Lanciate il comando:

vim /etc/httpd/conf.d/owncloud.conf

Aggiungete le seguenti righe e salvate:

<IfModule mod_alias.c>
Alias /owncloud /var/www/html/owncloud
</IfModule>
<Directory “/var/www/html/owncloud”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

Riavviate tutti i servizi:

systemctl start httpd.service
systemctl start mariadb.service

Configurate OwnCloud

http://your_ip_address/owncloud o http://your_Domain.com/owncloud