Difference between pages "OwnCloud" and "PhpMyAdmin"

From Wikislax
(Difference between pages)
Jump to: navigation, search
(setting up the owncloud database)
 
(Installing PhpMyAdmin)
 
Line 1: Line 1:
 
{{RightTOC}}
 
{{RightTOC}}
  
== What is OwnCloud ? ==
+
== What is PhpMyAdmin ? ==
  
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.
+
[http://www.phpmyadmin.net/home_page PhpMyAdmin] is a PHP application that affords managing [[MySQL]] databases.
  
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.
+
== Installing PhpMyAdmin ==
  
It is adapted below for Slackware 15.0.
+
[http://www.phpmyadmin.net/home_page/downloads.php Download] and install for example in a subdirectory of the Apache DocumentRoot or under /usr/local using a symbolic link. The files must be readable by the user running apache.
  
== Installing OwnCloud ==
+
  # tar -C /usr/local -xvf phpMyAdmin-x.y.z.t-english.tar.gz
 
 
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.
 
 
 
  # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2
 
# chown -R apache:apache owncloud
 
 
  # cd /var/www/htdocs
 
  # cd /var/www/htdocs
  # ln -s /usr/local/owncloud owncloud
+
  # ln -s /usr/local/phpMyAdmin-x.y.z.t-english phpmyadmin
# chown -R apache:apache owncloud
+
  # cd phpmyadmin
 
+
  # cp config.sample.inc.php config.inc.php
== Creating the occ helper script ==
+
  # cd ..
 
+
  # chown -R apache:apache phpmyadmin
occ is an OwnCloud administration command.
 
 
 
# FILE="/usr/local/bin/occ"
 
# cat <<EOM >$FILE
 
> #! /bin/bash
 
> cd /usr/local/owncloud
 
> sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ "\$@"
 
> EOM
 
# chmod u+x $FILE
 
 
 
== Creating the OwnCloud database ==
 
 
 
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :
 
 
 
# mysql -u root -e \
 
  "CREATE DATABASE IF NOT EXISTS owncloud; \
 
  CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY '<b><i>password</i></b>'; \
 
  GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \
 
  FLUSH PRIVILEGES;"
 
# mysql -u root -e \
 
  "CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY '<b><i>password</i></b>'; \
 
  GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1'; \
 
  FLUSH PRIVILEGES;"
 
  #
 
 
 
It is also possible to create user owncloud@localhost and database from phpmyadmin.
 
 
 
== setting up the owncloud database ==
 
 
 
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.
 
 
 
  # occ maintenance:install \
 
    --database "mysql" \
 
    --database-name "owncloud" \
 
    --database-user "owncloud" \
 
    --database-pass "<b><i>password</i></b>" \
 
    --data-dir "/var/www/htdocs/owncloud/data" \
 
    --admin-user "admin" \
 
    --admin-pass "<b><i>password</i></b>"
 
ownCloud was successfully installed
 
#
 
 
 
== Configure ownCloud’s Trusted Domains ==
 
 
 
# my_ip=$(hostname -I|cut -f1 -d ' ')
 
# occ config:system:set trusted_domains 1 --value="$my_ip"
 
System config value trusted_domains => 1 set to string '''<i>x.y.z.t</i>'''
 
# occ config:system:set trusted_domains 2 --value="$HOSTNAME"
 
System config value trusted_domains => 2 set to string '''<i>your.domain.tld</i>'''
 
  #
 
 
 
== Configure the cron jobs ==
 
 
 
Set your background job mode to cron:
 
 
 
  # occ background:cron
 
Set mode for background jobs to 'cron'
 
#
 
 
 
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==
 
 
 
# echo "MIN HOUR DAY MONTH DAYOFWEEK COMMAND" >> /var/spool/cron/crontabs/apache
 
# echo "*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron" >> /var/spool/cron/crontabs/apache
 
# echo "0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks" >> /var/spool/cron/crontabs/apache
 
# chgrp apache /var/spool/cron/crontabs/apache
 
#
 
  
== Configure Log Rotation ==
+
Edit '''config.inc.php''' to give a value (any string of '''max 46 characters''') to '''$cfg['blowfish_secret'] = <nowiki>''</nowiki>;''' that is used when '''$cfg['Servers'][$i]['auth_type'] = 'cookie';'''. Also add the lines '''$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock'; & $cfg['Servers'][$i]['connect_type'] = 'socket';'''. After that it should be possible to open page http://localhost/phpmyadmin using your browser.
  
  # FILE="/etc/logrotate.d/owncloud"
+
  $cfg['blowfish_secret'] = 'mysecret'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
  # cat <<EOM >$FILE
+
/*
  /var/www/htdocs/owncloud/data/owncloud.log {
+
  * Servers configuration
  size 10M
+
  */
  rotate 12
+
  $i = 0;
  copytruncate
+
  /*
  missingok
+
  * First server
  compress
+
  */
  compresscmd /bin/gzip
+
$i++;
  }
+
/* Authentication type */
  EOM
+
$cfg['Servers'][$i]['auth_type'] = 'cookie';
#
+
/* Server parameters */
 +
  $cfg['Servers'][$i]['host'] = 'localhost';
 +
  $cfg['Servers'][$i]['DisableIS'] = true; # BUG PHPMYADMIN 5.2.3
 +
  $cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
 +
  $cfg['Servers'][$i]['connect_type'] = 'socket';
 +
  $cfg['Servers'][$i]['compress'] = false;
 +
  /* Select mysqli if your server has it */
 +
  $cfg['Servers'][$i]['extension'] = 'mysql';
 +
  $cfg['Servers'][$i]['AllowNoPassword'] = false;
  
<br clear=all>
+
<br/>
  
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}
+
{{pFoot|[[PHP]]|[[Main Page]]|[[MediaWiki]]}}

Latest revision as of 00:19, 22 March 2026

What is PhpMyAdmin ?

PhpMyAdmin is a PHP application that affords managing MySQL databases.

Installing PhpMyAdmin

Download and install for example in a subdirectory of the Apache DocumentRoot or under /usr/local using a symbolic link. The files must be readable by the user running apache.

# tar -C /usr/local -xvf phpMyAdmin-x.y.z.t-english.tar.gz
# cd /var/www/htdocs
# ln -s /usr/local/phpMyAdmin-x.y.z.t-english phpmyadmin
# cd phpmyadmin
# cp config.sample.inc.php config.inc.php
# cd ..
# chown -R apache:apache phpmyadmin

Edit config.inc.php to give a value (any string of max 46 characters) to $cfg['blowfish_secret'] = ''; that is used when $cfg['Servers'][$i]['auth_type'] = 'cookie';. Also add the lines $cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock'; & $cfg['Servers'][$i]['connect_type'] = 'socket';. After that it should be possible to open page http://localhost/phpmyadmin using your browser.

$cfg['blowfish_secret'] = 'mysecret'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
 * Servers configuration
 */
$i = 0;
/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['DisableIS'] = true; # BUG PHPMYADMIN 5.2.3
$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;


PHP Main Page MediaWiki