APCu (APC User Cache) is an in-memory key value store for PHP which provide better performance. It is a drop in replacement for APC. Show
How to download APCuLatest stable release of APCu (in tgz format) can be downloaded from php.net website : https://pecl.php.net/get/APCu Click on the below URL to check APC user cache documentation on php.net website : http://php.net/manual/en/book.apcu.php Steps to install APCu PHP extensionDo the below steps to install APCu on Ubuntu Server 1. Log into your Ubuntu server as ‘root’ user or login as any user with sudo privileges 2. Run the below command to check whether php APCu is already installed and enabled on the server root@server:~# php -m | grep -i apcu If APCu isn’t installed, the above command won’t return any output. 3. Run the command ‘pecl install apcu’ to install APCu on the server. # pecl install apcu WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update Build process completed successfully
run the command ‘php --ini’ to check the Loaded PHP Configuration File echo “extension=apcu.so” >> /etc/php/7.0/cli/php.ini 5. Now run the command “php -m | grep -i apc” to check whether it is enabled. root@server:~# php -m | grep -i apc This is a short guide to installing ownCloud on a fresh installation of Ubuntu 20.04. Run the following commands in your terminal to complete the installation. This guide can not go into details and has its limits by nature. If you experience issues like with dependencies of PHP or other relevant things like the operating system, web server or database, look at the for more information. Prerequisites and Notes
PreparationSet Your Domain Name
Generate Strong Passwordssec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt Update Your SystemFirst, ensure that all the installed packages are entirely up to date and that PHP is available in the APT repository. To do so, follow the instructions below:
Create the occ Helper ScriptCreate a helper script to simplify running occ commands:
Make the helper script executable:
Install the Required Packages
Install smbclient php ModuleIf you want to connect to external storage via SMB you need to install the smbclient php module. First install the required packages:
Then install smblclient php module using pecl:
Check if it was successfully activated:
This should show the following output:
Install the Recommended PackagesAdditional useful tools helpful for debugging: sec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt0 Configure ApacheCreate a Virtual Host Configurationsec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt1 Enable the Virtual Host Configurationsec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt2 Configure the DatabaseIt’s recommended to execute 6 to secure the mariadb installation and set a strong password for the database user.Ensure transaction-isolation level is set and performance_schema on. sec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt3 It is recommended to run mysqltuner script to analyse database configuration after running with load for several days. Enable the Recommended Apache Modulessec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt4 InstallationDownload ownCloudsec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt5 Install ownCloudRemember to set a strong password for your owncloud admin user and provide the previously set password for the database user as the 7 argument.sec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt6 Configure ownCloud’s Trusted Domainssec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt7 Configure the cron JobsSet your background job mode to cron: sec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt8 Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: sec_admin_pwd=$(openssl rand -base64 18) echo $sec_admin_pwd > /etc/.sec_admin_pwd.txt sec_db_pwd=$(openssl rand -base64 18) echo $sec_db_pwd > /etc/.sec_db_pwd.txt9 If you need to sync your users from an LDAP or Active Directory Server, add this additional Cron job. Every 4 hours this cron job will sync LDAP users in ownCloud and disable the ones who are not available for ownCloud. Additionally, you get a log file in 8 for debugging. 0Configure Caching and File Locking 1Configure Log Rotation 2Finalize the InstallationMake sure the permissions are correct: 3ownCloud is now installed. You can confirm that it is ready to enable HTTPS (for example using Let’s Encrypt) by pointing your web browser to your ownCloud installation. To check if you have installed the correct version of ownCloud and that the occ command is working, execute the following: |