26/2/2017

MariaDB, waar is /var/log/messages ?

Filed under: — cybrarian @ 11:22 pm

Op een recent geïnstalleerde Linux server installeer ik mariadb, en zoek ik hoe de database te starten en hoe te kijken of ze gestart is. Ze heet waarschijnlijk niet meer “mysql”? Of toch? En Apache?

MySQL / MariaDB

MariaDB na installatie starten:

systemctl start mysql

Check of ze gestart is:
cat /var/log/messages ? Zo was het vroeger.
Sinds de overgang naar systemctl is ook de systeemlog gewijzigd naar journalctl. Dat commanda op zich opent een nogal heel grote tekst-log-file waarin je zonder filteren niet veel bent.

Uitleg en opties:
man journalctl

journalctl -u myqsl

Elke lijn begint met de tijd, hostname, en de bron van de loglijn; er uit met q van quit.
Feb 26 23:00:39 myhost mysql-systemd-helper[3186]:
(ik heb die hieronder vervangen door _ om het wat overzichtelijker te houden)

Starting MySQL server…
_ Creating MySQL privilege database…
_ Installing MariaDB/MySQL system tables in ‘/var/lib/mysql’ …
_ 170226 23:00:40 [Note] /usr/sbin/mysqld (mysqld 10.0.29-MariaDB) starting as process 3225 _ OK
_ Filling help tables…
_ 170226 23:00:51 [Note] /usr/sbin/mysqld (mysqld 10.0.29-MariaDB) starting as process 3252 …
_ OK
_ PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
_ To do so, start the server, then issue the following commands:
_ ‘/usr/bin/mysqladmin’ -u root password ‘new-password’
_ ‘/usr/bin/mysqladmin’ -u root -h myhost password ‘new-password’
_ Alternatively you can run:
_ ‘/usr/bin/mysql_secure_installation’
_ which will also give you the option of removing the test
_ databases and anonymous user created by default. This is
_ strongly recommended for production servers.
_ See the MariaDB Knowledgebase at http://mariadb.com/kb or the
_ MySQL manual for more instructions.
_ You can start the MariaDB daemon with:
_ rcmysql start
_ You can test the MariaDB daemon with mariadb-test package
_ Please report any problems at http://mariadb.org/jira
_ The latest information about MariaDB is available at http://mariadb.org/.
_ You can find additional information about the MySQL part at:
_ http://dev.mysql.com
_ Consider joining MariaDB’s strong and vibrant community:
_ https://mariadb.org/get-involved/
_ Waiting for MySQL to start
_ 170226 23:00:54 [Note] /usr/sbin/mysqld (mysqld 10.0.29-MariaDB) starting as process 3289 …
_ MySQL is alive
Feb 26 23:00:55 myhost systemd[1]: Started MySQL server.

Check eigen mariadb server log:
cat /var/log/mysql/mysqld.log

En dan nog steeds het veilig in gebruik stellen van mariadb/mysql:
mysql_secure_installation

Apache

ps: Hetzelfde geldt voor apache, moest dat de volgende vraag zijn:

systemctl start apache

En eigenlijk is het apache2 natuurlijk, dus vind je het in de logs als:

journalctl -u apache2

Na installatie van phpMyAdmin apache stoppen en terug starten:

systemctl stop apache
systemctl start apache

of
systemctl restart apache2

OpenSuse upgrade naar Tumbleweed (vanuit Leap 42.2)

Filed under: — cybrarian @ 9:20 pm

Hoewel ik er niet specifiek documentatie over vond, heb ik de algemene documentatie gebruikt (zoals voor upgrade naar Tumbleweed vanuit Leap 42.1).

Deze keer ging het echt heel vlot: naar root gebruiker gaan, een blik op de harde schijven, en de commando’s om de oude repo’s uit te schakelen, de nieuwe toe te voegen, en de upgrade uit te voeren.

kort samengevat (voor knip en plak):
su
mkdir /etc/zypp/repos.d/old
mv /etc/zypp/repos.d/*.repo /etc/zypp/repos.d/old
zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/oss
zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/non-oss
zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/debug repo-debug
zypper ar -f -c http://download.opensuse.org/update/tumbleweed/ repo-update
zypper ar -f -d -c http://download.opensuse.org/tumbleweed/repo/src-oss
zypper ar -f -d -c http://download.opensuse.org/tumbleweed/repo/src-non-oss
zypper dup

Hele console log:

su
Password:
linux-u6ln:~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 74.5G 0 disk
├─sda1 8:1 0 2G 0 part [SWAP]
├─sda2 8:2 0 29.2G 0 part /usr/local
└─sda3 8:3 0 43.3G 0 part /home
sr0 11:0 1 1024M 0 rom
linux-u6ln:~ # mkdir /etc/zypp/repos.d/old
linux-u6ln:~ # mv /etc/zypp/repos.d/*.repo /etc/zypp/repos.d/old
linux-u6ln:~ # zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/oss repo-ossAdding repository 'repo-oss' .....................................................[done]
Repository 'repo-oss' successfully added
Enabled : Yes
Autorefresh : Yes
GPG Check : Yes
Priority : 99
URI : http://download.opensuse.org/tumbleweed/repo/oss

linux-u6ln:~ # zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/non-oss repo-non-oss
Adding repository 'repo-non-oss' .................................................[done]
Repository 'repo-non-oss' successfully added
Enabled : Yes
Autorefresh : Yes
GPG Check : Yes
Priority : 99
URI : http://download.opensuse.org/tumbleweed/repo/non-oss

linux-u6ln:~ # zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/debug repo-debug
Adding repository 'repo-debug' ...................................................[done]
Repository 'repo-debug' successfully added
Enabled : Yes
Autorefresh : Yes
GPG Check : Yes
Priority : 99
URI : http://download.opensuse.org/tumbleweed/repo/debug

linux-u6ln:~ # zypper ar -f -c http://download.opensuse.org/update/tumbleweed/ repo-update
Adding repository 'repo-update' ..................................................[done]
Repository 'repo-update' successfully added
Enabled : Yes
Autorefresh : Yes
GPG Check : Yes
Priority : 99
URI : http://download.opensuse.org/update/tumbleweed/

linux-u6ln:~ # zypper ar -f -d -c http://download.opensuse.org/tumbleweed/repo/src-oss repo-src-oss
Adding repository 'repo-src-oss' .................................................[done]
Repository 'repo-src-oss' successfully added
Enabled : No
Autorefresh : Yes
GPG Check : Yes
Priority : 99
URI : http://download.opensuse.org/tumbleweed/repo/src-oss

linux-u6ln:~ # zypper ar -f -d -c http://download.opensuse.org/tumbleweed/repo/src-non-oss repo-src-non-oss
Adding repository 'repo-src-non-oss' .............................................[done]
Repository 'repo-src-non-oss' successfully added
Enabled : No
Autorefresh : Yes
GPG Check : Yes
Priority : 99
URI : http://download.opensuse.org/tumbleweed/repo/src-non-oss

linux-u6ln:~ # zypper lr -u
# | Alias | Name | Enabled | GPG Check | Refresh | URI
--+------------------+------------------+---------+-----------+---------+---------------------------------------------------------
1 | repo-debug | repo-debug | Yes | ( p) Yes | Yes | http://download.opensuse.org/tumbleweed/repo/debug
2 | repo-non-oss | repo-non-oss | Yes | ( p) Yes | Yes | http://download.opensuse.org/tumbleweed/repo/non-oss
3 | repo-oss | repo-oss | Yes | ( p) Yes | Yes | http://download.opensuse.org/tumbleweed/repo/oss
4 | repo-src-non-oss | repo-src-non-oss | No | ---- | Yes | http://download.opensuse.org/tumbleweed/repo/src-non-oss
5 | repo-src-oss | repo-src-oss | No | ---- | Yes | http://download.opensuse.org/tumbleweed/repo/src-oss
6 | repo-update | repo-update | Yes | ( p) Yes | Yes | http://download.opensuse.org/update/tumbleweed/

linux-u6ln:~ # zypper dup
linux-u6ln:~ # shutdown -r now

Powered by WordPress