Install NextCloud on Ubuntu 16.04 LTS
İdris koç Eğitmenin Adı Nextcloud 6 Eylül 2018
Install NextCloud on Ubuntu 16.04 LTS
Nextcloud Kullanımı
Cloud kendi kendine barındıran dosya eşitleme ve paylaşım sunucusudur. Tüm dosyalar kontrol altında – kolayca cihazlar arasında senkronizasyon ve paylaşımı görüntülemek için bir platform sağlarken bir web arayüzü üzerinden veya software yazılımı ile rahat ve kolay bir şekilde veri erişimi, yapılır.
Dosya yükleme sınırı yoktur.
Hemen Kullan
Sık kullandığınız öğeleri kolayca sunucunuza aktarıp istediğiniz her yerden ve her zaman bu bilgilere sorunsuz erişin.
Hep Yanınızda!
Tüm dosyalarınıza belirlediğiniz cihazların hepsinden anında ulaşırsınız. Üstelik dilediğiniz zaman güvenlik ayarlarınızı değiştirebilir erişimleri kısıtlayabilirsiniz.
Cloud dosyalara ve diğer verilere (yer imleri gibi) hiçbir ek yazılıma ihtiyaç duyulmaksızın bir web tarayıcısı kullanılarak erişilebilir. Herhangi bir metodla (WEB arayüzü, mobil cihaz veya kişisel bilgisayarınızdan) eriştiğiniz dosyalarınızda yapılan tüm güncellemeler, bir kullanıcının hesabına bağlanmış tüm bilgisayar ve taşınabilir aygıtlara senkronize edilerek gönderilmektedir.
Erişim, Senkronizasyon ve Paylaşım verileriniz, Sizin kontrolünüz Altında!!!
- Mobil cihaz ve Desktop ile senkronize
- Harici Depolama ve Şifreleme
- PDF, resim, metin dosyaları, Word dosyaları vb için düzenleme ve dosya önizleme desteği
- Anti-virüs uygulaması ve taraması
- Yeni kullanıcılar için örnek dosya oluşturma
- Kullanıcı ve gruplar için dosya paylaşma
- Gelişmiş kota yönetimi
- Dosya arama ve sürüm ekleme
Kurulum yapmadan önce Ubuntu 16.04 server hazırlayalım.
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt install php-apcu redis-server php-redis sudo apt install php-zip php-dompdf php-xml php-mbstring php-gd php-curl
Install Apache Web Server
sudo apt-get install apache2 apache2-utils sudo systemctl status apache2 sudo systemctl start apache2 sudo systemctl enable apache2
Install MariaDB
sudo apt-get install mariadb-server mariadb-client sudo systemctl status mysql sudo systemctl start mysql sudo systemctl enable mysql sudo mysql_secure_installation
Install PHP7.2
sudo apt-get update && apt-get upgrade sudo apt-get install python-software-properties sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.2 sudo php -v sudo apt-get install php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml php7.2-fpm sudo apt-get install php-pear php-fpm phpv-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php sudo a2enmod php7.2 sudo systemctl restart apache2 sudo systemctl start php7.2-fpm sudo systemctl status php7.2-fpm
Install NextCloud 13.6
sudo wget https://download.nextcloud.com/server/releases/nextcloud-13.0.6.zip sudo apt install unzip sudo unzip nextcloud-13.0.6.zip sudo cp -r nextcloud /var/www/ sudo chown www-data:www-data /var/www/nextcloud/ -R
Create a Database and User in MariaDB
sudo mysql -u root -p create database nextcloud; create user nextclouduser@localhost identified by 'nextcloud'; grant all privileges on nextcloud.* to nextclouduser@localhost identified by 'nextcloud'; flush privileges;
Enable Binary Logging in MariaDB
sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf Add log-bin = /var/log/mysql/mariadb-bin log-bin-index = /var/log/mysql/mariadb-bin.index binlog_format = mixed
sudo systemctl restart mysql
Create an Apache Virtual Host File for Nextcloud
sudo vim /etc/apache2/sites-available/nextcloud.conf Add <VirtualHost *:80> DocumentRoot /var/www/nextcloud # This appliance has two use cases: # # 1) NAT/Port forward mode: HTTP port is not the default # -> redirect to HTTPS port 4443 RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^([^:]+)(:[0-9]+)?$ RewriteCond %2 "!^$" RewriteCond %{HTTP_HOST} ^([^:]+)(:[0-9]+)?$ RewriteRule (.*) https://%1:4443%{REQUEST_URI} [L] # 2) Bridge mode: HTTP port is default # -> redirect to default HTTPS port (443) RewriteCond %{HTTP_HOST} ^([^:]+)(:[0-9]+)?$ RewriteRule (.*) https://%1%{REQUEST_URI} [L] ErrorLog /var/log/apache2/error.log CustomLog /var/log/apache2/access.log combined </VirtualHost>
sudo systemctl restart apache2
sudo ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf sudo a2enmod rewrite headers env dir mime setenvif ssl
Local sertifika kuralım
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
Aşağıdaki Parametreleri Ekleyelim
sudo vim /etc/apache2/conf-available/ssl-params.conf Add # from https://cipherli.st/ # and https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH SSLProtocol All -SSLv2 -SSLv3 SSLHonorCipherOrder On # Disable preloading HSTS for now. You can use the commented out header line that includes # the "preload" directive if you understand the implications. #Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains" #Header always set X-Frame-Options DENY #Header always set X-Content-Type-Options nosniff # Requires Apache >= 2.4 #SSLCompression off SSLSessionTickets Off #SSLUseStapling on SSLStaplingCache “shmcb:logs/stapling-cache(150000)" SSLOpenSSLConfCmd DHParameters "/etc/ssl/certs/dhparam.pem"
Note : default-ssl.conf kırmızı renkli olanları değiştirelim.
sudo vim /etc/apache2/sites-available/default-ssl.conf Add <IfModule mod_ssl.c> <VirtualHost _default_:443> ServerAdmin admin@linuxislife.org ServerName localhost DocumentRoot /var/www/nextcloud ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on SSLUseStapling on SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 </VirtualHost> </IfModule>
vim /etc/apache2/sites-available/000-default.conf DocumentRoot /var/www/html yerine nextcloud yazalı sudo ufw app list Available applications: Apache Apache Full Apache Secure OpenSSH sudo ufw status Status: inactive sudo ufw allow 'Apache Full' Rules updated Rules updated (v6) sudo ufw delete allow 'Apache' Could not delete non-existent rule Could not delete non-existent rule (v6) sudo ufw status Status: inactive sudo a2enmod ssl sudo a2enmod headers sudo a2ensite default-ssl sudo a2enconf ssl-params sudo apache2ctl configtest AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Syntax OK
sudo systemctl restart apache2
https://localhost
Güvenlik ve kurulum ayarlarını yeni makale ile anlatıyor olucam.
Bizi takip etmeyi unutmayın 🙂




