Ubuntu 配置NextCloud

Ubuntu 配置NextCloudphp

安裝經常使用軟件:html

1: SSH    sudo apt-get install openssh-servermysql

    ssh啓用root登錄:vi /etc/ssh/sshd_config  註釋掉#PermitRootLogin prohibit-password   下面添加PermitRootLogin yes      sql

2: 默認啓動界面更改: sudo systemctl set-difault multi-user.target  /   graphical.target數據庫

3:啓用root用戶 sudo passwd -u rootapache

4: vim      sudo apt-get instal vimjson

安裝Apacheubuntu

    sudo apt-get install apache2vim

安裝Mysql瀏覽器

    sudo apt-get install mysql-server mysql-client

    測試:mysql -uroot -p    查看狀態:service mysql status

    建立nextcloud數據庫: create database nextcloud set utf8;

安裝PHP模塊

    sudo apt-get install libapache2-mod-php

    sudo apt-get install php-mysql    

    sudo apt install -y php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip

    重啓服務:service apache2 restart    service mysql restart

    測試Apache可否解析PHP:

            vim /var/www/html/phpinfo.php

            文件中寫:<?php echo phpinfo();?>

            瀏覽器訪問:http://ubuntu地址/phpinfo.php,出現PHP

修改權限    sudo chmod 777 /var/www

安裝phpMyAdmin    sudo apt-get install phpmyadmin

        建立phpmyadmin快捷:ln -s /usr/share/phpmyadmin /var/www/html

        啓用Apache mo_rewrite模塊: a2enmod rewrite

        重啓服務: service php7.0-fpm restart    service apache2 restart

        測試,瀏覽器訪問: http://ip/phpmyadmin

安裝NextCloud

    cd /var/www/html

    wget https://download.nextcloud.com/server/releases/nextcloud-13.0.3.zip

    unzip nextcloud-13.0.3.zip

    設置 nextcloud 的目錄權限:sudo chown -R www-data:www-data /var/www/html/nextcloud/

    瀏覽器上輸入http://服務器IP/nextcloud後就會出現next cloud配置界面了。

Nextcloud OCC命令行工具

shijiaofa-test:/var/www/html/nextcloud #sudo -u www-data php occ -v

若出現上圖權限問題 ,設置 nextcloud 的目錄權限:sudo chown -R www-data:www-data /var/www/html/nextcloud/

相關文章
相關標籤/搜索