|
|
| Line 1: |
Line 1: |
| − | The location of the configuration files depend on the specific distribution, but is usually subdirectories of, or files in <tt>'''/etc'''</tt>, <tt>'''/usr/etc'''</tt>, <tt>'''/usr/local/etc'''</tt>. The files are set up by installation but can be updated later. Applying the configuration change will then be a matter of restarting the corresponding daemon. The main Slackware configuration files are :
| + | {{RightTOC}} |
| − | <br/>
| |
| | | | |
| − | == Init configuration == | + | == What is OwnCloud ? == |
| | | | |
| − | {| {{thead}}
| + | [http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems. The installation procedure is described on the [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ owncloud install documentation]. |
| − | |-
| + | |
| − | ! {{chead}} width="200" | File
| + | == Installing OwnCloud == |
| − | ! {{chead}} | Content
| + | |
| − | |-
| + | OwnCloud is available as a PHP application relying on various databases. See the OwnCloud documentation for details. We will be using MySQL. [https://owncloud.com/download-server download] tarball then untar and install. |
| − | | <tt>'''/etc/inittab'''</tt>||contains the default runlevel (3=multi-user, 4=graphical). On a live system, <tt>'''telinit n'''</tt> affords changing the level interactively.
| + | |
| − | |-
| + | # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2 |
| − | | <tt>'''/etc/fstab'''</tt>||contains descriptions on the filesystems used on this computer, including the device, the mount point, the filesystem type and the opening options. Use <tt>'''man fstab'''</tt>, copy, and try !
| + | # chown -R apache:apache owncloud |
| − | |-
| + | # cd /var/www/htdocs |
| − | | <tt>'''/etc/http'''</tt>||Directory containing the Apache configuration files such as httpd.conf.
| + | # ln -s /usr/local/owncloud owncloud |
| − | |-
| + | # chown -R apache:apache owncloud |
| − | | <tt>'''/etc/lilo.conf'''</tt>||used by lilo to generate a boot sector on the device or on the MBR (master boot record). If on the device and using the Windows bootloader, don't forget to copy the boot sector on a disquette so as to be able to use it from Windows.
| + | |
| − | |-
| + | == Creating the occ helper script == |
| − | | <tt>'''/etc/mail'''</tt>||Directory containing the Sendmail configuration files such as sendmail.mc and sendmail.cf. Spamassassin configuration also goes here as a subdirectory.
| + | |
| − | |-
| + | This is the owncloud administration command. |
| − | | <tt>'''/etc/mail/aliases'''</tt>||File containing a list of users that do not exist on the server and whose mail is redirected to existing users. After modifying this file the command <tt>'''newaliases'''</tt> must be ran.
| |
| − | # redirect news
| |
| − | usenet: news
| |
| − | |-
| |
| − | | <tt>'''/etc/ntp.conf'''</tt>||Configuration for the network time protocol. Add ntp servers for your region as below. After an update, restart using <tt>'''/etc/rc.d/rc.ntpd restart'''</tt>.
| |
| − | # NTP server (list one or more) to synchronize with:
| |
| − | server 0.fr.pool.ntp.org
| |
| − | server 1.fr.pool.ntp.org
| |
| − | server 2.fr.pool.ntp.org
| |
| − | server 3.fr.pool.ntp.org | |
| − | |-
| |
| − | | <tt>'''/etc/profile'''</tt>||don't forget to update the paths:
| |
| − | MANPATH=/usr/local/share/man:/usr/local/man:/usr/man
| |
| − | |-
| |
| − | | <tt>'''/etc/profile.d'''</tt>||the files contained in this directory are executed at login when executable. To remove the "Game of fortune" on user login :
| |
| − | chmod a-x /etc/profile.d/bsd-games-login-fortune.* | |
| − | |-
| |
| − | | <tt>'''/etc/ld.so.conf'''</tt>||list of additional libraries. Needs <tt>'''/sbin/ldconfig'''</tt> after adding new libraries. Add <tt>'''/usr/local/lib64'''</tt> here.
| |
| − | |-
| |
| − | | <tt>'''.bashrc'''</tt>||Specify <tt>'''. /etc/profile'''</tt> on a line of itself to use in <tt>'''konsole'''</tt> the same environment as in the command line. This will afford <tt>'''colorls'''</tt> to work in new <tt>'''konsole'''</tt> tabs.
| |
| − | |}
| |
| − | <br clear=all>
| |
| | | | |
| − | == The /etc/rc.d directory == | + | # 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 |
| | | | |
| − | The <tt>'''/etc/rc.d'''</tt> directory contains the scripts used to initialize the system services at the end of the boot. To use a specific script at startup, make it user-executable. To stop using it, remove the execution rights. Depending on the situation, scripts are called with the <tt>'''start'''</tt>, <tt>'''stop'''</tt>, or <tt>'''restart'''</tt> parameter.
| + | == Creating the owncloud database == |
| − | <br/>
| |
| | | | |
| − | == Network configuration ==
| + | This creation can be effected in phpmyadmin creating the owncloud@local user and database. |
| | | | |
| − | The network configuration is done during system installation but it is possible to change it later by editing the files and restarting the right daemon:
| + | Alternatively the owncloud documentation also provides this script : |
| | | | |
| − | {| {{thead}}
| + | mysql -u root -e \ |
| − | |-
| + | "CREATE DATABASE IF NOT EXISTS owncloud; \ |
| − | ! {{chead}} width="200" | File
| + | CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY 'password'; \ |
| − | ! {{chead}} | Content
| + | GRANT ALL PRIVILEGES ON *.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \ |
| − | |-
| + | FLUSH PRIVILEGES;" |
| − | | <tt>'''/etc/rc.d/rc.inet1.conf'''</tt>||configuration of the network. For Xen the standard configuration uses a bridge. A bridge gathers several physical network interfaces. The bridge is configured with an IP address while the physical network interfaces are left unconfigured. After an update, restart using <tt>'''/etc/rc.d/rc.inet1 restart'''</tt>.
| |
| − | # Config information for eth0:
| |
| − | IPADDR[0]=""
| |
| − | NETMASK[0]=""
| |
| − | USE_DHCP[0]=""
| |
| − | DHCP_HOSTNAME[0]=""
| |
| − | . . .
| |
| − | # Example of how to configure a bridge:
| |
| − | # Note the added "BRNICS" variable which contains a space-separated list
| |
| − | # of the physical network interfaces you want to add to the bridge.
| |
| − | IFNAME[0]="br0"
| |
| − | BRNICS[0]="eth0"
| |
| − | IPADDR[0]="192.168.0.1"
| |
| − | NETMASK[0]="255.255.255.0"
| |
| − | USE_DHCP[0]=""
| |
| − | DHCP_HOSTNAME[0]=""
| |
| − | |-
| |
| − | | <tt>'''/etc/rc.d/rc.networkmanager'''</tt>||is a script to allow network automatic configuration. To configure a static IP :
| |
| | | | |
| − | # nmcli connection show
| + | == setting up the owncloud database == |
| − | NAME UUID TYPE DEVICE
| |
| − | Wired connection 1 cffa785e-0425-3777-b670-092c79328a1f 802-3-ethernet eth0
| |
| − |
| |
| − | # nmcli connection modify 'Wired connection 1' connection.autoconnect yes ipv4.method manual ipv4.address 192.168.53.2/24 ipv4.gateway 192.168.53.254 ipv4.dns 127.0.0.1
| |
| − | # reboot
| |
| − | |-
| |
| − | | <tt>'''/etc/rc.d/rc.ipforward'''</tt>||is a script to allow forwarding of packets between the interfaces. This is useful for a computer with several interfaces, for instance a firewall. To allow forwarding, just make the script executable.
| |
| − | |-
| |
| − | | <tt>'''/etc/ssh/sshd_config'''</tt>||ssh server configuration. '''PermitRootLogin yes''' affords login as root. To authorize X11Forwarding use '''X11Forwarding yes'''. After an update, restart using '''/etc/rc.d/rc.sshd restart'''.
| |
| − | |-
| |
| − | | <tt>'''/etc/ssh/ssh_config'''</tt>||ssh client configuration. To authorize X11Forwarding use '''ForwardX11 yes''' and '''ForwardX11Trusted yes''' to avoid a warning using '''ssh''' and get better security.
| |
| − | |-
| |
| − | | <tt>'''/etc/hosts'''</tt>||contains the addresses of the local hosts that bind cannot resolve, as they are in a private addressing plan. It is also possible to specify here addresses that will be chosen in lieu of their official address.
| |
| − | |-
| |
| − | | <tt>'''/etc/rc.d/rc.bind'''</tt>||setting this script as user-executable will afford running the local computer to be its own DNS.
| |
| − | |-
| |
| − | | <tt>'''/etc/named.conf'''</tt>||uncomment the query-source directive to suppress the port-unreachable packets on '''lo'''.
| |
| − | |-
| |
| − | | <tt>'''/etc/resolv.conf'''</tt>||if using local bind, which is recommended, append a line with <tt>'''nameserver 127.0.0.1'''</tt>.
| |
| − | |-
| |
| − | | <tt>'''/etc/udev/rules.d/70-persistent-net.rules'''</tt>||affords changing which interface is eth0.
| |
| − | |}
| |
| − | <br clear=all>
| |
| | | | |
| − | <u>Note</u> : In case of network issue, it can be a good idea to check the configuration using <tt>'''ifconfig -a'''</tt>, <tt>'''netstat -f inet -rn'''</tt>, and <tt>'''route'''</tt>. The routes are kept from one boot to the other and it may become necessary to delete the existing routes using <tt>'''route flush'''</tt>, then reboot.
| + | occ maintenance:install \ |
| | + | --database "mysql" \ |
| | + | --database-name "owncloud" \ |
| | + | --database-user "owncloud" \ |
| | + | --database-pass "password" \ |
| | + | --data-dir "/var/www/owncloud/data" \ |
| | + | --admin-user "admin" \ |
| | + | --admin-pass "admin" |
| | | | |
| − | <br/> | + | <br clear=all> |
| | | | |
| − | {{pFoot|[[Linux basics]]|[[Main Page]]|[[IPTables]]}} | + | {{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}} |
OwnCloud is available as a PHP application relying on various databases. See the OwnCloud documentation for details. We will be using MySQL. download tarball then untar and install.
This is the owncloud administration command.
This creation can be effected in phpmyadmin creating the owncloud@local user and database.