Kategorie: Allgemein

Manjaro install Mysql log

Installing MariaDB/MySQL system tables in ‚/var/lib/mysql‘ …
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system


Two all-privilege accounts were created.
One is root@localhost, it has no password, but you need to
be system ‚root‘ user to connect. Use, for example, sudo mysql
The second is mysql@localhost, it has no password either, but
you need to be the system ‚mysql‘ user to connect.
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo

See the MariaDB Knowledgebase at https://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd ‚/usr‘ ; /usr/bin/mysqld_safe –datadir=’/var/lib/mysql‘

You can test the MariaDB daemon with mysql-test-run.pl
cd ‚/usr/mysql-test‘ ; perl mysql-test-run.pl

Please report any problems at https://mariadb.org/jira

The latest information about MariaDB is available at https://mariadb.org/.
You can find additional information about the MySQL part at:
https://dev.mysql.com
Consider joining MariaDB’s strong and vibrant community:
https://mariadb.org/get-involved/

Bash legacy

Aktuelle ipv6 grep en und in conferierst einsetzten

#!/bin/bash

identifier="01:208:9bff:fec0:c4f4"

config="/etc/apache2/sites-enabled/005-antosch.conf"
ip6="/root/antoschip6.txt"

antoschip6=$(<"$ip6")

# antoschnow=`ping6 antosch6.dyndns.tv -c 1 | awk 'NR==2 {print substr($4, 0, length($4)-22)}'`
# antoschnow="$antoschnow""$identifier"

antoschnow=`grep -v "^f" /home/antosch/ipv6.txt | sed 's/.\{3\}$//'`

if [ "$antoschip6" != "$antoschnow" ]; then
sed -i s/"$antoschip6"/"$antoschnow"/g "$config"
echo "$antoschnow" > "$ip6"
/etc/init.d/apache2 restart 1> /dev/null
fi

mein ffmpeg VHS => mp4

ffmpeg -i $INPUT -vf "crop=688:552:12:10, yadif=1:-1:0, scale=734:552, hqdn3d, setdar=4/3" -c:v libx264 -crf 16 -r 50 -c:a aac -b:a 192k OUTPUT

ffmpeg -ss 00:00:10 -i $INPUT -frames 1 -vf "select=not(mod(n\,2400)),scale=480:360,tile=4x3" $OUTPUT.png
IFS=$'\n'; for mp3 in $(ls *.png); do ffmpeg -i $mp3 -vf scale=800:-1 -f jpg ${mp3}.jpg; done

Ubuntu redo apt

To clone your system to another system. Or make a backup. In terminal type:

dpkg --get-selections | grep -v deinstall > ubuntu-files

This command makes a file list of all installed packages in your system (and stores it in present working directory). Backup this file in hdd, email, etc…(this file is very small).

In the freshly installed ubuntu system run:

sudo dpkg --set-selections <./ubuntu-files (will set it up and)

apt-get -y update
apt-get dselect-upgrade

This will install only those packages you had installed (with apt-get) in the old system.

                                    (OR)

You could back up all the .deb packages from /var/cache/apt/archives/ and install them manually using:

dpkg -i *.deb

And after that running an update cycle later.

ssl lets encrypt mit plex

von https://forums.plex.tv/t/add-custom-ssl-certs-now-available-for-everyone-how-to/128684/2

I’m not familiar with pkcs#12.

PKCS#12 is an archive file format, in this case used to bundle your private key and certificates.

I however have been using Letsencrypt to get my free signed ssl certs for all my standalone and apache web servers. How can I use does certs in Plex?
Edit: Available cert files from Letsencrypt: cert.pem chain.pem fullchain.pem privkey.pem

You’ll have to create a .pfx file (the PKCS#12 archive) containing both the private key and certificates of your chain. This is done using OpenSSL commands in your terminal:

openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out archive.pfx -name "Name for Archive"

You’ll be prompted for a password, this password has to be filled in the Plex’ ‘Custom certificate encryption key’ field. I’m not sure if you had to password protect your private key upon Let’s Encrypt setup, you might be prompted for that as well.

After you’be obtained the .pfx file, store it on your media server computer (e.g. C:\SSL\archive.pfx). Then, occupy the ‘Custom certificate path’ field with the path to the file (C:\SSL\archive.pfx).

Last but not least, fill in the domain the certificate has been created for (e.g. plex.example.com 13).

A quick tip: in the ‘Remote Access’ setting, manually specify port 443 and update your router to point 443 external to 32400 internal. Then, for ‘Custom server access URLs’, fill in: https://plex.example.com:443 8.

You can now visit your custom SSL secured Plex domain using https://plex.example.com. Plex will do the rest. Try testing the domain outside your network the Plex server is hosted in, it might not work accessing the domain internally.

henkieraniDec ’15

I forgot to mention here:

Last but not least, fill in the domain the certificate has been created for (e.g. plex.example.com 7).
That was ment for the ‘Custom certificate domain’ field.

qnap apache log

This is a quick guide for those needing to debug web apps, such as ownCloud, on QNAP hardware.

von: http://technedigitale.com/archives/407

QNAP systems only come with an Apache error log by default, which only logs apache service errors, not page errors, which make impossible to debug problems on sites. The only way to get more detailed logs is to add a few new config files to Apache, as follows:

  1. Login to the QNAP device through SSH
  2. Enable .htaccess usage on Apache. To do this you need to create a new Apache configuration file:
    vi /etc/config/apache/extra/apache-myconfig.conf

    And add the following commands:

    CustomLog logs/main_log combined
    ErrorLog logs/error_log
    LogLevel info
  3. Reference this new configuration file on Apache main configuration file. To do this, edit Apache configuration file:
    vi /etc/config/apache/apache.conf

    and add the following line at the end of the file:

    Include /etc/config/apache/extra/apache-myconfig.conf

Finally, restart Apache.

 /etc/init.d/Qthttpd.sh restart

Now, this own’t work on QNAP running QTS 4.1.x onwards, as people from QNAP thought it was working far too good, and decided to through a challenge. For some reason, Apache configuration files are reset every time Apache is restarted by Qnap startup scripts. So until I get a stable solution, the workaround is to manually restart Apache:

/usr/local/apache/bin/apachectl restart

The files will be present on /mnt/ext/opt/apache/logs/ .

Please note, all files will be restarted at 0:00, in order not to fill the partion .