Difference between revisions of "NewLinuxInfo"
Line 137: | Line 137: | ||
<h1>'''MariaDB'''</h1> | <h1>'''MariaDB'''</h1> | ||
<br /> | <br /> | ||
− | The long time "free" SQL server and client that used to be included in all standard Linux server installations server, MySQL, has been acquired by Oracle, and they've "commercialized" it, so that it is no longer "officially" free. This caused a bunch of long time developers to create what has become the "defacto" MySQL replacement, and uses the exact same MySQL commands that we have become accustomed to throughout the years. | + | The long time "free" SQL server and client that used to be included in all standard Linux server installations server, MySQL, has been acquired by Oracle, and they've "commercialized" it, so that it is no longer "officially" free. This caused a bunch of long time developers to create what has become the "defacto" MySQL replacement, and uses the exact same MySQL commands and syntax that we have become accustomed to throughout the years. |
<br /><br /> | <br /><br /> | ||
This is how I installed MariaDB on my new Fedora Linux 24, the latest and greatest! In one command, I've installed both the server and client, along with all of their dependencies! Here's how I did it: | This is how I installed MariaDB on my new Fedora Linux 24, the latest and greatest! In one command, I've installed both the server and client, along with all of their dependencies! Here's how I did it: |
Revision as of 10:49, 11 September 2016
Guides, Info & Tips on New Modern Linux Server Administration
Modern Server Administration of Critical Systems
This information pertains to very modern recent relases of Redhat based distributions, including the latest releases of CentOS and Fedora, which has had most of these service upgrades and replacements for the last few years now!
systemctl
The first such service upgrade actually replaced most, if not all of the service init.d startup & shutdown scripts with a very different way of managing the startup, status and shutdown of services, such as the Apache webserver, the CUPS print server, the secure shell, aka the SSH server, and all of the other services that used to be controlled by shell scripts located in the /etc/init.d/ directory. This directory still exists so that in the event that an old legacy service needs to still be managed by the init.d shell scripts, due to the service not yet having the required setup to be managed by the replacement of all of those scripts:
For instance, here is an example of systemctl being used to query the Secure Shell Server(SSH):
[root@fc24 ~]# systemctl status sshd.service ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor pres Active: active (running) since Sun 2016-09-11 01:12:21 PDT; 1h 20min ago Docs: man:sshd(8) man:sshd_config(5) Process: 791 ExecStart=/usr/sbin/sshd $OPTIONS (code=exited, status=0/SUCCE Main PID: 810 (sshd) Tasks: 1 (limit: 512) CGroup: /system.slice/sshd.service └─810 /usr/sbin/sshd Sep 11 01:12:20 fc24.dawgland.com systemd[1]: Starting OpenSSH server daemon. Sep 11 01:12:21 fc24.dawgland.com systemd[1]: sshd.service: PID file /var/run Sep 11 01:12:21 fc24.dawgland.com sshd[810]: Server listening on 0.0.0.0 port Sep 11 01:12:21 fc24.dawgland.com systemd[1]: Started OpenSSH server daemon. lines 1-15/15 (END)
This is what is looks like after stopping the SSH server:
[root@fc24 ~]# systemctl stop sshd.service [root@fc24 ~]# systemctl status sshd.service ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor pres Active: inactive (dead) since Sun 2016-09-11 02:38:55 PDT; 10s ago Docs: man:sshd(8) man:sshd_config(5) Process: 791 ExecStart=/usr/sbin/sshd $OPTIONS (code=exited, status=0/SUCCE Main PID: 810 (code=exited, status=0/SUCCESS) Sep 11 01:12:20 fc24.dawgland.com systemd[1]: Starting OpenSSH server daemon. Sep 11 01:12:21 fc24.dawgland.com systemd[1]: sshd.service: PID file /var/run Sep 11 01:12:21 fc24.dawgland.com sshd[810]: Server listening on 0.0.0.0 port Sep 11 01:12:21 fc24.dawgland.com systemd[1]: Started OpenSSH server daemon. Sep 11 02:38:55 fc24.dawgland.com systemd[1]: Stopping OpenSSH server daemon. Sep 11 02:38:55 fc24.dawgland.com systemd[1]: Stopped OpenSSH server daemon. lines 1-14/14 (END)
And this is the command to start it back up, and because there is no output after starting it, I've also included the output of the status once again after starting the Secure Shell Server back up:
[root@fc24 ~]# systemctl start sshd.service [root@fc24 ~]# systemctl status sshd.service ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor pres Active: active (running) since Sun 2016-09-11 02:42:38 PDT; 9s ago Docs: man:sshd(8) man:sshd_config(5) Process: 2801 ExecStart=/usr/sbin/sshd $OPTIONS (code=exited, status=0/SUCC Main PID: 2803 (sshd) Tasks: 1 (limit: 512) CGroup: /system.slice/sshd.service └─2803 /usr/sbin/sshd Sep 11 02:42:38 fc24.dawgland.com systemd[1]: Starting OpenSSH server daemon. Sep 11 02:42:38 fc24.dawgland.com systemd[1]: sshd.service: PID file /var/run Sep 11 02:42:38 fc24.dawgland.com sshd[2803]: Server listening on 0.0.0.0 por Sep 11 02:42:38 fc24.dawgland.com systemd[1]: Started OpenSSH server daemon. lines 1-15/15 (END)
dnf
Another BIG change to a "more modern" way of managing all of the software packages on your Linux machine,
is the dnf command that is a direct drop-in replacement for yum, the old, tried and true RPM package manager that for going on 20 years has been the main interface to manage Linux software installations, taking into account all of the required dependencies, as well as uninstalling, more commonly referred to "removing" software packages.
Here is an example of how to use dnf to first search for, and then install over the internet, Blender, a very powerful tool to create your own custom animation, simulations and movies:
[root@fc24 ~]# dnf search blender Last metadata expiration check: 2:29:11 ago on Sun Sep 11 00:31:02 2016. =========================== N/S Matched: blender ============================ blender.x86_64 : 3D modeling, animation, rendering and post-production
After searching for and finding the package I want to install, I then use dnf, NOT YUM!, to perform the dependency checking, downloading of the package along with the required dependencies, install all of the packages, and then perform what is called the "Cleanup" portion of the process.
This is how to use dnf to download, install, and then clean up any left over junk:
[root@fc24 ~]# dnf install blender Last metadata expiration check: 2:30:45 ago on Sun Sep 11 00:31:02 2016. Dependencies resolved. ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: Field3D x86_64 1.7.2-1.fc24 updates 519 k OpenColorIO x86_64 1.0.9-11.fc24 fedora 439 k OpenImageIO x86_64 1.6.16-1.fc24 updates 1.7 M blender x86_64 1:2.77a-1.fc24 updates 29 M boost-locale x86_64 1.60.0-7.fc24 updates 279 k boost-program-options x86_64 1.60.0-7.fc24 updates 166 k boost-regex x86_64 1.60.0-7.fc24 updates 300 k fftw-libs-double x86_64 3.3.4-7.fc24 fedora 805 k fonts-blender noarch 1:2.77a-1.fc24 updates 4.7 M google-droid-sans-fonts noarch 20120715-10.fc24 fedora 2.5 M hdf5 x86_64 1.8.16-3.fc24 fedora 1.7 M jack-audio-connection-kit x86_64 1.9.10-5.fc24 fedora 555 k jemalloc x86_64 4.2.1-1.fc24 updates 182 k libffado x86_64 2.2.1-8.fc24 fedora 690 k libspnav x86_64 0.2.3-3.fc24 fedora 17 k libxml++ x86_64 2.40.1-2.fc24 fedora 89 k pugixml x86_64 1.7-2.fc24 fedora 92 k python3-numpy x86_64 1:1.11.0-4.fc24 fedora 3.0 M tinyxml x86_64 2.6.2-11.fc24 fedora 54 k yaml-cpp03 x86_64 0.3.0-9.fc24 fedora 151 k Transaction Summary ============================================================================= Install 20 Packages Total download size: 47 M Installed size: 178 M Is this ok [y/N]: y
MariaDB
The long time "free" SQL server and client that used to be included in all standard Linux server installations server, MySQL, has been acquired by Oracle, and they've "commercialized" it, so that it is no longer "officially" free. This caused a bunch of long time developers to create what has become the "defacto" MySQL replacement, and uses the exact same MySQL commands and syntax that we have become accustomed to throughout the years.
This is how I installed MariaDB on my new Fedora Linux 24, the latest and greatest! In one command, I've installed both the server and client, along with all of their dependencies! Here's how I did it:
[root@fc24 ~]# dnf install mariadb-server mariadb Last metadata expiration check: 3:08:41 ago on Sun Sep 11 00:31:02 2016. Dependencies resolved.=================================================================
Package Arch Version Repository Size=================================================================
Installing: mariadb x86_64 3:10.1.16-1.fc24 updates 6.3 M mariadb-common x86_64 3:10.1.16-1.fc24 updates 66 k mariadb-config x86_64 3:10.1.16-1.fc24 updates 29 k mariadb-errmsg x86_64 3:10.1.16-1.fc24 updates 203 k mariadb-libs x86_64 3:10.1.16-1.fc24 updates 654 k mariadb-server x86_64 3:10.1.16-1.fc24 updates 19 M perl-DBD-MySQL x86_64 4.036-1.fc24 updates 146 k perl-DBI x86_64 1.634-3.fc24 fedora 729 k perl-Math-BigInt noarch 1.9997.15-2.fc24 fedora 178 k perl-Math-Complex noarch 1.59-362.fc24 updates 95 k perl-Storable x86_64 1:2.53-348.fc24 updates 84 k Transaction Summary=================================================================
Install 11 Packages Total download size: 28 M Installed size: 140 M Is this ok [y/N]:y