DEV Community

Büşra
Büşra

Posted on

1

Windows WSL2 ile Nextcloud Kurma

Nextcloud, kullanıcıların dosya depolama, senkronizasyon, paylaşım ve işbirliği yapabileceği açık kaynaklı bir bulut depolama platformudur. İster kişisel kullanım için ister kurumsal düzeyde olsun, kullanıcılar Nextcloud'u kendi sunucularında veya barındırılan hizmetlerde kullanarak dosyalarını güvenli bir şekilde yönetebilirler. Güvenlik, esneklik ve genişletilebilirlik gibi özellikleriyle dikkat çeker.

  • Windows 10'da Komut İstemini yönetici olarak çalıştırıyoruz. PowerShell'i yönetici olarak çalıştırıyoruz.
PowerShell
# WSL özelliğini etkinleştiriyoruz
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
# Sanal makine platformunu etkileştiriyoruz
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all
Enter fullscreen mode Exit fullscreen mode

Bilgisayarı yeniden başlatıyoruz. Burada eğer sanal makine içinde sanal makine kuracaksak sanal makinenin CPU ayarlarından 'Virtualize IntelVT-x/EPT or AMD-V/RVI' ayarını etkinleştiriyoruz.

Image description

# Sanallaştırma paltformunu etkinkleştiriyoruz.
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
# wsl2 yi etkinleştiriyoruz
wsl --set-default-version 2
# wsl çekirdek güncellemesini indiriyoruz.
$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile .\wsl_update_x64.msi
# ilerleme tercihni sıfırla
$ProgressPreference = 'Continue'
# indirilen dosyaları yüklüyoruz
.\wsl_update_x64.msi
Enter fullscreen mode Exit fullscreen mode
  • Windows bilgisayarımızdan Microsoft Store girip Debianı indiriyoruz.

Image description

  • Debian sanal makinesini açıp kullanıcı adı ve şifre belirliyoruz.
sudo apt update
sudo apt upgrade -y
sudo apt install unzip wget -y
sudo apt install apache2 mariadb-server mariadb-client -y
sudo apt install php8.2-* -y
sudo service mariadb start
sudo su
mysql_secure_installation
Enter fullscreen mode Exit fullscreen mode

Image description

mysql -u root -p

  • Nextcloud veritabanını oluşturuyoruz
CREATE DATABASE nextclouddb;
GRANT ALL ON nextclouddb.* to 'nextcloud_rw'@'localhost' IDENTIFIED BY 'N3xtCl0ud!';
FLUSH PRIVILEGES;
EXIT;
exit
Enter fullscreen mode Exit fullscreen mode
  • Apache web kökünde Nextcloud'u indirip çıkarmak için aşağıdaki komutlarla devam ediyoruz.
# en son nextcloud sürümünü indiriyoruz
wget -O /tmp/nextcloud.zip https://download.nextcloud.com/server/releases/latest.zip
# indirilen nextcloud versionunu çıkartıyoruz.
sudo unzip -q /tmp/nextcloud.zip -d /var/www
# Yeni nextcloud dizinin sahibini www-data olarak ayarlıyoruz
sudo chown -R www-data:www-data /var/www/nextcloud

Enter fullscreen mode Exit fullscreen mode
  • nextcloud.conf dosyası oluşturuyoruz.

sudo nano /etc/apache2/sites-available/nextcloud.conf

Alias /nextcloud "/var/www/nextcloud/"
<directory /var/www/html/nextcloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted

Dav off

SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</directory>
Enter fullscreen mode Exit fullscreen mode
  • Siteyi etkinleştirmek için ve Apache'yi yeniden başlatmak için aşağıdaki komutlarla devam ediyoruz.
sudo a2ensite nextcloud
sudo a2enmod rewrite headers env dir mime dav
sudo service apache2 restart
Enter fullscreen mode Exit fullscreen mode
  • localhost/nextcloud/ sitesine gidiyoruz

username: nextcloud_rw
password: N3xtCl0ud!
database name: nextclouddb
database host: localhost

Image description

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay