Tuesday, February 8, 2022

How To Deploy Nextcloud On Rocky Linux 8

 in This Tutorial you will Learn " How To install Nextcloud On Rocky Linux"
Nextcloud is open-source software, first developed in 2016, that allows you to run a personal cloud storage service.
Homepage - https://nextcloud.com/
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/os-releases ; getconf LONG_BIT ; hostname ; hostname -I ; sestatus

dnf makecache ; dnf groupinstall "Development Tools" -y ; dnf module enable php:7.4 -y ; dnf install httpd httpd-tools mariadb-server mariadb php php-cli php-mysqlnd php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-curl php-opcache php-bcmath php-fpm php-common php-json php-zlib php-gmp php-apcu php-openssl php-pdo php-intl php-json php-zip -y

systemctl enable httpd mariadb php-fpm ; systemctl start httpd mariadb php-fpm
mysql_secure_installation

mysql -u root -p
create database db;
create user `dbuser`@`localhost` IDENTIFIED BY 'dbpassword';
grant all on db.* TO `dbuser`@`localhost`;
flush privileges;
exit

cd /var/www/html/ ; wget https://download.nextcloud.com/server/releases/nextcloud-23.0.0.zip
unzip nextcloud-23.0.0.zip
chown -R $USER:$USER /var/www/html/nextcloud/ ; chmod -R 777 /var/www/html/nextcloud/
mkdir -p /var/www/html/nextcloud/data ; chown apache:apache -R /var/www/html/nextcloud/data
nano /etc/httpd/conf.d/yourdomain.com.conf
<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/html/nextcloud/
    <Directory /var/www/html/nextcloud/>
        Options -Indexes +FollowSymLinks
        AllowOverride All
    </Directory>
    ErrorLog /var/log/httpd/yourdomain.com-error.log
    CustomLog /var/log/httpd/yourdomain.com-access.log combined
</VirtualHost>

echo "192.168.1.60 www.yourdomain.com" >> /etc/hosts
firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload  
mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf_backup
systemctl restart httpd ; systemctl status httpd
www.yourdomain.com
__________________________________________________________________________________________


No comments:

Post a Comment