Mungkin anda sudah tidak asing lagi tentang penyimpanan awan (cloud) seperti Dropbox. google drive atau cloud server yang lain. Nah di linux ada sebuah layanan cloud yang bisa kita pasang di sebuah server linux namanya OwnCloud. OwnCloud OwnCloud adalah merupakan salah satu Content Management System (CMS) sumber terbuka (open source) yang dikhususkan untuk membuat layanan Cloud Storage yang bisa gunakan untuk keperluan pribadi, organisasi, lembaga perusahaan dll.
OwnCloud bisa di gunakan untuk menyimpan file, folder, audio, video dan jenis dokumen yang lain. File yang tersimpan dapat di akses dengan berbagai macam perangkat mobile seperti iOS dan Android, perangkat desktop atau melalui halaman web browser. OwnCloud memiliki media penyimpanan yang tidak terbatas tergantung kemampuan hardisk server.
OwnCloud memiliki fasilitas edit dan preview untuk jenis file PDF, Word, Open Document, Text File dan jenis-jenis file lainnya, sudah ter intregrasi anti virus menggunakan control sharing dengan password atau tanpa password.
Berikut langkah instalasinya
1. Install apache2
apt install apache2
2. Selesai install apache2 kita disable directory listing
sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf
3. Enable apache2 service
4. Install MariaDB
5. Jalankan service MariaDB
6. Jalankan service MariaDB
7. Jalankan perintah secure MariaDB untuk keamanan
9. Install PHP 7.1
10. Edit File apache2 php.ini
11. Membuat Database untuk OwnCloud
12. Download OwnCloud
13. Konfigurasi Apache2
14. aktifkan Module OwnCloud
15. Restart Apache2
16. Konfigurasi enkripsi SSL
17.Tambahkan konfigurasi SSl di VirtualHost
systemctl stop apache2.service
systemctl start apache2.service
systemctl enable apache2.service
4. Install MariaDB
apt-get install mariadb-server mariadb-client
apt-get install mariadb-server mariadb-client
systemctl stop mysql.service
systemctl start mysql.service
systemctl enable mysql.service
7. Jalankan perintah secure MariaDB untuk keamanan
mysql_secure_installation
When prompted, answer the questions below by following the guide.
Enter current password for root (enter for none): Just press the Enter
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
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]: Y
8. Restart MariaDB
systemctl restart mysql.service
9. Install PHP 7.1
apt install php7.1 libapache2-mod-php7.1 php7.1-common libapache2-mod-php7.1 php7.1-mbstring php7.1-xmlrpc php7.1-soap php7.1-apcu php7.1-smbclient php7.1-ldap php7.1-redis php7.1-gd php7.1-xml php7.1-intl php7.1-json php7.1-imagick php7.1-mysql php7.1-cli php7.1-mcrypt php7.1-ldap php7.1-zip php7.1-curl
10. Edit File apache2 php.ini
nano /etc/php/7.1/apache2/php.ini
file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_file_size = 64M
max_execution_time = 360
date.timezone = America/Chicago
sudo mysql -u root -p
CREATE DATABASE owncloud;
CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'new_password_here';
GRANT ALL ON owncloud.* TO 'ownclouduser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
12. Download OwnCloud
cd /tmp && wget https://download.owncloud.org/community/owncloud-10.0.3.zip
unzip owncloud-10.0.3.zip
sudo mv owncloud /var/www/html/owncloud/
sudo chown -R www-data:www-data /var/www/html/owncloud/
sudo chmod -R 755 /var/www/html/owncloud/
13. Konfigurasi Apache2
nano /etc/apache2/sites-available/owncloud.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/owncloud/
ServerName example.com
ServerAlias www.example.com
Alias /owncloud "/var/www/html/owncloud/"
<Directory /var/www/html/owncloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/owncloud
SetEnv HTTP_HOME /var/www/html/owncloud
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
14. aktifkan Module OwnCloud
a2ensite owncloud.conf
a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
systemctl restart apache2.service
16. Konfigurasi enkripsi SSL
apt-get install python-certbot-apache
certbot --apache -m admin@example.com -d example.com -d www.example.com
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: Y
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Congratulations! You have successfully enabled https://example.com and
https://www.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=example.com
https://www.ssllabs.com/ssltest/analyze.html?d=www.example.com
-------------------------------------------------------------------------------
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/example.com/privkey.pem
Your cert will expire on 2018-02-24. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/owncloud/
ServerName example.com
ServerAlias www.example.com
Alias /owncloud "/var/www/html/owncloud/"
<Directory /var/www/html/owncloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/owncloud
SetEnv HTTP_HOME /var/www/html/owncloud
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =example.com [OR]
RewriteCond %{SERVER_NAME} =www.example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
18. Edit File /etc/apache2/sites-available/owncloud-le-ssl.conf.
<IfModule mod_ssl.c>
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/owncloud/
ServerName example.com
ServerAlias www.example.com
Alias /owncloud "/var/www/html/owncloud/"
<Directory /var/www/html/owncloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/owncloud
SetEnv HTTP_HOME /var/www/html/owncloud
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
19. Restart Apache2
systemctl restart apache2.service
20. Buka Web Browser https://namadomain.com
21. Klik Finish Setup
Tags
linux
ga bisa copy. lebay
ReplyDeletemaaf gan, demi menghindari copas ke blog lain. Blog pernah di copas orang tidak bertanggung jawab dan di copy ke blog sama persis.
Deletebukannya kalo gitu blog yang bersangkutan masuk google sandbox ya?
DeleteIni pas code ga keluar ya min tulisannya gimana tuh?
ReplyDeleteCodenya kok gaada ya min
ReplyDeletesudah di perbaiki, akibat pergantian themes blog
Delete