Showing posts with label Apple. Show all posts
Showing posts with label Apple. Show all posts

Nov 18, 2024

NextCloud Install in Ubuntu Server

NextCloud is an Open Source, Self-Hosted or Cloud Hosted, File Sync and Sharing Platform. It's Secure, Private and Easy to use. Compatible with Windows, Linux, Android and Apple iOS devices.

This is assuming that you already have Ubuntu Server installed, patched and updated.

1. Download the latest version of NextCloud.

sudo wget https://download.nextcloud.com/server/releases/latest.zip


2. Install some required packages.


sudo apt install libmagickcore-6.q16-6-extra php php-apcu php-bcmath php-cli php-common php-curl php-gd php-gmp php-imagick php-intl php-mbstring php-mysql php-zip php-xml -y



3. Install Marid DB Server.

sudo apt install mariadb-server -y


4. Secure Marid DB installation, follow on-screen prompt and instructions.

sudo mysql_secure_installation


5. Configure Maria DB Server.


CREATE DATABASE nextcloud;

SHOW DATABASES;

GRANT ALL PRIVILEGES ON nextcloud.* TO 'ncuser'@'localhost' IDENTIFIED BY 'ncpass';

FLUSH PRIVILEGES;

QUIT;



6. Enable PHP Modules.

sudo phpenmod apcu bcmath gmp imagick intl


7. Install Unzip Apps.

sudo apt install unzip -y


8. Unzip the downloaded NextCloud file.

sudo unzip latest.zip


9. Copy and Rename the extracted NextCloud folder.

sudo cp nextcloud demo.com


10. Move the renamed folder to Apache server path.

sudo mv demo.com /var/www/


11. Grant permissions to NextCloud folder.

sudo chwon -R www-data:www-data /var/www/demo.com


12. Create Apache configuration file for NextCloud.


<VirtualHost *:80>
   ServerAdmin webmaster@local.com
   ServerName demo.com
   DocumentRoot /var/www/demo.com

   <Directory /var/www/demo.com>
     Options MultiViews FollowSymlinks
     AllowOverride All
     Order allow,deny
     Allow from all
   </Directory>

   ErrorLog /var/log/apache2/demo.com/error.log
   TransferLog /var/log/apache2/demo.com/access.log

  <IfModule mod_headers.c>
     Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
   </IfModule>

</VirtualHost>



13. Configure and modify PHP file. Modify the value according to your requirements.


memory_limit = 512M

upload_max_filesize = 512M

max_execution_time = 360

post_max_size = 512M

date.timezone = Asia/Kuala_Lumpur

opcache.enable = 1

opcache.interned_strings_buffer = 16

opcache.max_accelerated_files = 10000

opcache.memory_consumption = 128

opcache.save_comments = 1

opcache.revalidate_freq = 1



14. Enabled Apache modules for NextCloud use.

sudo a2enmod dir env headers mime rewrite ssl


15. Enable APCU module in PHP.

sudo nano /etc/php/8.3/mods-available/apcu.ini

add the following line :-

apc.enable_cli = 1


16. Open your favorite browser, such as Google Chrome browser. And type the URL of NextCloud server (eg. http://demo.com). At the main screen, you need to configure the NextCloud Database (eg. nextcloud) created earlier including its username (eg. ncuser) & password (eg. ncpass). You also need to create the First Administrator account with a valid email address too.


17. NextCloud screen will auto refresh upon successful connection to the database, now login with the new administrator account created in earlier step.


18. Secure NextCloud with Let's Encrypt SSL.

sudo certbot --apache


19. Fix missing Indices in NextCloud.

sudo chmod +x /var/www/demo.com/occ

sudo /var/www/demo.com/occ db:add-missing-indices

sudo chmod -x /var/www/demo.com/occ


20. Change permissions of NextCloud config file.

sudo chmod 660 /var/www/demo.com/config/config.php

sudo chown root:www-data /var/www/demo.com/config/config.php


21. Modify NextCloud configuration file.

sudo nano /var/www/demo.com/config/config.php

Modify the following lines according to you needs :-


'memcache.local' => '\OC\Memcache\APCu',

'default_phone_region' => 'MY',

'maintenance_window_start' => 1,

'filelocking.enabled' => true,

'memcache.locking' => '\OC\MemCache\APCu',



22. Restart Apache server.

sudo systemctl restart apache2


23. Configure Crontab.

sudo crontab -u www-data -e

Add the following line :-

00 * * * 1 php -f /var/www/demo.com/cron.php



OPTIONAL STEPS

24. Remove Skeleton Files and Folders when User account is created.

sudo rm -R /var/www/demo.com/core/skeleton/Templates


25. Remove Work Flow Engine, to prevent User from installing WorkFlow.


sudo /var/www/demo.com/occ config:app:set workflowengine user_scope_disabled --value yes



26. Install "Redis" as MemCache for NextCloud.

sudo apt install redis php-redis -y

sudo systemctl enable redis

sudo systemctl start redis

sudo nano /var/www/demo.com/config/config.php


'memcache.local' => '\OC\Memcache\Redis',

'memcache.locking' => '\OC\Memcache\Redis',

'redis' => array(
     'host' => '/var/run/redis/redis.sock'.
     'port' => 0,
     'timemout' => 0.0,
     ),


sudo nano /etc/redis/redis.conf


unixsocket /var/run/redis/redis.sock

unixsocketperm 660


sudo usermod -aG redis www-data

sudo systemctl restart redis


27. If Redis is distributed, add following line into NextCloud config file :-

'memcache.distributed' => '\OC\Memcache\MemCached',


28. To clear all NextCloud log entries.

sudo -u www-data truncate /var/www/demo.com/data/nextcloud.log --size=0



!!! HAPPY COMPUTING !!!


Jan 8, 2024

Apple iPad 1 : Install Kodi Player

I still have my iPad 1 and its still working but sadly most Apps now required newer iOS version. Which the iPad 1 only able to run on iOS v.5.1.1 (that's the max I can upgrade).

Even with Jailbreak, some Apps doesn't work as it should (well..... what do you expect from a JB Apps anyway).

It so happens that I have plans to setup my own media streaming server and so happens that Kodi Player is the best choice around. For Kodi to run on my old iPad 1, there some steps I need to do first :-

1. Ensure that iPad 1 is already updated to iOS v.5.1.1

2. Install the following Apps from Cydia :-
     a) Terminal for iOS
     b) iFile


* In my case where HTTPS doesn't work, just replace it with HTTP.

4. When prompted, save the file into "Local" folder OR in my case I just open it with "iFile Apps".

5. Next, is to select "Installer" option, this will take some time so please wait for it.

6. Once done, you will notice the "Kodi" icon is not displayed on the "Home Screen", not to worry...

7. Open "Terminal for iOS" App, and type the following command :-
     a) uicache
     b) killall springboard -9

8. Now close all open Apps and the Kodi icon should be displayed on the "Home Screen".

9. Proceed to configure the Kodi as you want.


!!! HAPPY COMPUTING !!!

May 30, 2023

Apple iPad 1 : Re-purpose old iPad1

 Re-purpose old iPad1 and continue to use it on daily basis. Due to Apple Store no longer provide older App's version, we need to JailBreak it in order to download old version.

Pre-requisites :-

  1. Download Absinthe JailBreak --> https://www.iphoneheat.com/2012/05/absinthe-2-download/
  2. Extract the downloaded zip file.
  3. Download and install Apple iTunes --> https://www.apple.com/my/itunes/
  4. Download and install 3uTools --> http://www.3u.com/

JailBreak Steps :-
  1. Run --> Absinthe for iOS 5.1.1
  2. Plugin your iPad1 to the computer and wait for it to be detected by Absinthe.
  3. Click --> JailBreak          {ensure your iPad1 data is backup prior to this}
  4. The iPad1 will auto restart itself upon completion.
  5. Open --> Cydia
  6. Tap --> Complete Upgrade
  7. Download and Install new certificate, open --> Safari --> http://cydia.invoxiplaygames.uk/certificates
  8. Tap --> ISRG Root X1 CA (Let's Encrypt)
  9. Tap --> Install
  10. Tap again --> Install

Add Repo into Cydia's Sources :-
  1. Open --> Cydia
  2. Goto --> Sources
  3. Tap --> Edit
  4. Tap --> Add
  5. Add the following Repo:
    • http://repo.hackyouriphone.org
    • http://cydia.akemi.ai
    • http://cydia.invoxiplaygames.uk

Install the following packages :-
  1. AppSync Unified
  2. Checkmate, Store!
  3. Activator (optional)
Remove non-working Repo --> ultrasn0w (repo666.ultrasn0w.com)


Use 3uTools to install any applications that you have to the iPad1.




!!! HAPPY COMPUTING !!!