/tg_owncloud

customised cloud with registration

Primary LanguageCSS

Owncloud customised cloud with registration

Installation process

  1. allow root login: nano /etc/ssh/sshd_config (comment PermitRootLogin)
  2. /etc/init.d/ssh restart
  3. apt-get update
  4. apt-get upgrade
  5. apt-get install apache2 php5 php5-common php5-gd php5-intl php5-mcrypt php5-cli php5-ldap php5-sqlite curl libcurl3 libcurl4-openssl-dev php5-curl php-apc php5-mysql ffmpeg
  6. apt-get install mysql-client mysql-server
  7. mysql_secure_installation
  8. mysql -u root -p
  9. create database owncloud;
  10. create user 'owncloud'@'localhost' IDENTIFIED BY '***';
  11. GRANT ALL ON owncloud.* to 'owncloud'@'localhost';
  12. quit
  13. apt-get install ntp ntpdate
  14. nano /etc/ntp.conf (allservers set to -> server 0.ru.pool.ntp.org iburst dynamic)
  15. ntpdate -bs 0.ru.pool.ntp.org
  16. nano /etc/apache2/sites-enabled/000-default (set AllowOverride All in <Directory /var/www/>)
  17. service apache2 restart
  18. nano /etc/php5/apache2/php.ini (mysql.default_socket -> /var/run/mysqld/mysqld.sock;mysql.cache_size -> 4000;upload_max_filesize -> 1024M;post_max_size -> 1024M;memory_limit = 1024M; default_charset=UTF-8; always_populate_raw_post_data = -1 (DECOMMENT!!!) )
  19. /etc/init.d/apache2 stop; /etc/init.d/apache2 start;
  20. cd /var/www/html/
  21. wget https://download.owncloud.org/community/owncloud-8.0.3.tar.bz2
  22. tar -xvf owncloud-8.0.3.tar.bz2
  23. rm owncloud-8.0.3.tar.bz2
  24. rm index.html
  25. mv owncloud/* ./
  26. rm -r owncloud/
  27. chown -R www-data:www-data /var/www/html/
  28. rm owncloud-8.0.3.tar.bz2
  29. rm index.html
  30. mv owncloud/* ./ mv owncloud/.htaccess ./; mv owncloud/.user.ini ./
  31. rm -r owncloud/
  32. mv html/data/ ./data
  33. chown -R www-data:www-data data/
  34. chown -R www-data:www-data html/config/
  35. chown -R www-data:www-data html/apps/
  36. on http://ip/ set admin user and db connection settings

SNAPSHOTED!!!


SSL config

  1. nano /var/www/owncloud/config/config.php ('forcessl' => true, 'default_language' => 'ru')

Git copy paste

  1. apt-get install git

  2. curl -sL https://deb.nodesourse.com/setup | bash -

  3. apt-get install nodejs

  4. apt-get install build-essential

  5. cd /var/www/

  6. tar -zcvf oc_backup.tar.gz owncloud/

  7. git clone this repo tmp

  8. cp -r -i -u tmp/* owncloud/

  9. cd /var/www/

  10. mkdir tmpdir

  11. chown -R www-data:www-data tmpdir/

  12. cd owncloud/config/node

  13. npm install request

  14. configure https for apache: http://help.ubuntu.ru/wiki/apache_%D0%B8_https

  15. add Documents Plugin

  16. apt-get install clamav clamav-daemon

  17. freshclam

  18. /etc/init.d/clamav-daemon start

  19. crontab -e (-> 47 * * * * /usr/bin/freshclam --quiet)

  20. cd /var/www/owncloud/apps && wget https://apps.owncloud.com/CONTENT/content-files/157439-files_antivirus.tar.gz

  21. tar zxvf 157439-files_antivirus.tar.gz

  22. Enable and setup antivirus in web interface

  23. crontab -e (-> * */2 * * * clamscan -r --remove /var/www/owncloud/data)