Your IP : 216.73.216.209


Current Path : /cpanel_installer/
Upload File :
Current File : //cpanel_installer/InstallerRhel.pm

package InstallerRhel;

#                                      Copyright 2024 WebPros International, LLC
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.

use strict;
use warnings;

use CpanelLogger;

use CpanelMySQL ();

use Installer ();
our @ISA = qw/Installer/;

sub distro_type { return 'rhel' }

sub check_system_support {
    my ($self) = @_;

    $self->SUPER::check_system_support;

    $self->validate_distro_release_rpm;

    my $distro_name  = $self->distro_name;
    my $distro_major = $self->distro_major;

    if ( $distro_name eq 'rhel' ) {
        ( grep { $distro_major == $_ } qw/7/ ) or $self->invalid_system( "cPanel, L.L.C. does not support " . _distro_name($distro_name) . " version $distro_major." );
    }
    elsif ( $distro_name eq 'centos' ) {
        ( grep { $distro_major == $_ } qw/7/ ) or $self->invalid_system( "cPanel, L.L.C. does not support " . _distro_name($distro_name) . " version $distro_major." );
    }
    elsif ( $distro_name eq 'cloudlinux' ) {
        ( grep { $distro_major == $_ } qw/7 8 9/ ) or $self->invalid_system( "cPanel, L.L.C. does not support " . _distro_name($distro_name) . " version $distro_major." );
    }
    elsif ( $distro_name eq 'almalinux' ) {
        ( grep { $distro_major == $_ } qw/8 9/ ) or $self->invalid_system( "cPanel, L.L.C. does not support " . _distro_name($distro_name) . " version $distro_major." );
    }
    elsif ( $distro_name eq 'rocky' ) {
        ( grep { $distro_major == $_ } qw/8 9/ ) or $self->invalid_system( "cPanel, L.L.C. does not support " . _distro_name($distro_name) . " version $distro_major." );
    }
    else {
        return $self->invalid_system( "cPanel, L.L.C. does not support " . _distro_name($distro_name) . " for new installations." );
    }

    $self->validate_cloudlinux_registration;
    $self->validate_rhn_registration;

    return;
}

sub validate_distro_release_rpm {
    my ($self) = @_;

    my $distro_release = '/etc/redhat-release';

    -e $distro_release or $self->invalid_system("The system could not detect a valid release file for this distribution");

    chomp( my $release_rpm = `/bin/rpm -qf $distro_release` );    ## no critic(ProhibitQxAndBackticks)

    $release_rpm or $self->invalid_system("RPMs do not manage release file.");

    return;
}

sub _distro_name {
    my ( $distro, $full ) = @_;

    for my $names (
        [ 'centos',     'CentOS',      'CentOS' ],
        [ 'rhel',       'Red Hat',     'Red Hat Enterprise Linux®' ],
        [ 'cloudlinux', 'CloudLinux',  'CloudLinux™' ],
        [ 'almalinux',  'AlmaLinux',   'AlmaLinux' ],                   # based on how it is written at almalinux.org
        [ 'rocky',      'Rocky Linux', 'Rocky Linux' ],
    ) {
        return $names->[ $full ? 2 : 1 ] if $distro eq $names->[0];
    }
    return $distro;
}

sub validate_cloudlinux_registration {
    my ($self) = @_;

    # Short here if not CloudLinux.
    my $distro_name = $self->distro_name;
    return unless $distro_name eq 'cloudlinux';

    $self->validate_registration(
        {
            distro_name      => _distro_name($distro_name),
            full_distro_name => _distro_name( $distro_name, 1 ),
            register_command => '/usr/sbin/clnreg_ks --force',
        }
    );

    return;
}

sub validate_rhn_registration {
    my ($self) = @_;

    # Short here if not redhat
    my $distro_name = $self->distro_name;
    return unless $distro_name eq 'rhel';

    $self->validate_registration(
        {
            distro_name      => _distro_name($distro_name),
            full_distro_name => _distro_name( $distro_name, 1 ),
            register_command => '/usr/sbin/rhn_register',
        }
    );

    my @channels = `/usr/bin/yum repolist enabled`;    ## no critic(ProhibitQxAndBackticks)
    INFO("Validating that the system subscribed to the optional RHN channel...");

    # optional channel validated.
    return if grep { m/-optional(?:-[0-9]|-rpms|\/7Server)/ } @channels;

    my $optional_channel;
    foreach my $channel (@channels) {
        chomp $channel;

        # On RHEL 6, this line looks like this:
        # rhel-6-server-rpms                   Red Hat Enterprise Linux 6 Server (RPMs)
        # On RHEL 7, it looks like this:
        # rhel-7-server-rpms/7Server/x86_64                       Red Hat Enterprise Linux 7 Server (RPMs)                                  13,357
        next if ( $channel !~ /^[!*]?(rhel-([0-9xi_]+)-server-([0-9]+|rpms))[\s\/]+.*$/i );
        $channel          = $1;
        $optional_channel = $channel;
        $optional_channel =~ s/-server-6/-server-optional-6/;
        $optional_channel =~ s/-server-rpms/-server-optional-rpms/;
    }
    if ( !$optional_channel ) {
        ERROR("The server is not registered with a known Red Hat base channel.");
        ERROR('$> /usr/bin/yum repolist enabled');
        ERROR(`/usr/bin/yum repolist enabled`);    ## no critic(ProhibitQxAndBackticks)
        exit 8;                                    ## no critic(NoExitsFromSubroutines) # has always been like this
    }

    my $distro_major = $self->distro_major;
    ERROR("cPanel & WHM requires you to subscribe to the RHEL $distro_major optional channel, to get all of the needed packages.");
    ERROR("cPanel & WHM will not function without this channel. Check your subscriptions and then rerun the installer.");
    ERROR(" ");
    ERROR("Please run the following command: /usr/sbin/spacewalk-channel --add --channel=$optional_channel");
    ERROR("Or, for newer versions, run the following command: /usr/sbin/subscription-manager attach --auto");
    ERROR(" ");
    ERROR("You can register to the optional channel at http://rhn.redhat.com.");
    FATAL("Terminating...");
    return;
}

sub validate_registration {
    my ( $self, $opts ) = @_;

    INFO("Checking the $opts->{'distro_name'} registration for updates...");
    local $ENV{'TERM'} = 'dumb';
    my $registered = `/usr/bin/yum list < /dev/null 2>&1`;    ## no critic(ProhibitQxAndBackticks)

    if ( $registered =~ m/not register|Please run rhn_register/ms && $registered !~ /is receiving updates/ms ) {
        ERROR("When you use $opts->{'full_distro_name'}, you must register ");
        ERROR("with the $opts->{'distro_name'} Network before you install cPanel & WHM.");
        ERROR("Run the following command to register your server: $opts->{'register_command'} ");
        FATAL("The installation process will now terminate...");
    }
    return;
}

sub check_networking_scripts {
    my ($self) = @_;

    # Ensure network-scripts is installed and configured while networkManager
    # is disabled on CentOS 8 & 9.
    if ( $self->distro_major >= 8 ) {
        $self->check_network_scripts;
    }
    else {

        # Validate NetworkManager is off and uninstalled.
        $self->check_network_manager;
    }

    return;
}

# Install network-scripts package on CentOS 8 before we do the Network Manager check, so if
# a user changes the hostname and removes NM without installing network-scripts manually, the
# server will be able to come back online.
sub check_network_scripts {
    my ($self) = @_;

    return if $self->distro_major >= 9;

    INFO("Configuring networking now...");

    $self->yum_nohang_ssystem(qw{ /usr/bin/yum -y install network-scripts });
    Common::ssystem(qw{systemctl enable network.service});
    Common::ssystem(qw{systemctl start network.service});

    # These will fail if NetworkManager is not installed (i.e. CL8)
    # so we ignore the errors here in case NetworkManager is not installed
    Common::ssystem( qw{systemctl disable NetworkManager}, { ignore_errors => 1 } );
    Common::ssystem( qw{systemctl stop NetworkManager},    { ignore_errors => 1 } );

    return;
}

sub check_network_manager {
    my ($self) = @_;

    INFO("Checking for NetworkManager now...");

    if ( $self->distro_major == 6 ) {
        $self->check_initd_network_manager();
        return;
    }

    $self->check_systemd_network_manager();
    return;
}

sub network_manager_report_status {
    my ( $self, $uninstalled, $running, $startup ) = @_;

    if ($uninstalled) {
        INFO("NetworkManager is not installed.");
    }
    elsif ( $running || $startup ) {
        ERROR("********************* ERROR *********************");
        ERROR("NetworkManager is installed and running, or      ");
        ERROR("configured to startup.                           ");
        ERROR("");
        ERROR("cPanel does not support NetworkManager enabled   ");
        ERROR("systems.  The installation cannot proceed.       ");
        ERROR("");
        ERROR("See https://go.cpanel.net/disablenm for more     ");
        ERROR("information on disabling Network Manager.        ");
        ERROR("********************* ERROR *********************");
        ( $self->force ) ? WARN("Continuing installation due to force flag...") : FATAL("Exiting...");
    }
    else {
        WARN("NetworkManager is installed, but not active.  Consider removing it.");
    }
    return;
}

sub check_initd_network_manager {
    my ($self) = @_;

    my $status      = `service NetworkManager status 2>/dev/null`;
    my $uninstalled = !$status;
    my $running;
    my $startup;

    if ($status) {
        my ( $status_service, $verb, $status_state ) = split( ' ', $status );
        $running = $status_state ne 'stopped';
    }

    my $config = `chkconfig NetworkManager --list 2>/dev/null`;
    if ($config) {
        my ( $config_service, $config_runlevels ) = split( ' ', $config, 2 );
        $startup = $config_runlevels =~ m/:on/;
    }

    $self->network_manager_report_status( $uninstalled, $running, $startup );
    return;
}

sub check_systemd_network_manager {
    my ($self) = @_;

    my $status      = `systemctl --all --no-legend --no-pager list-units NetworkManager.service 2>/dev/null`;
    my $uninstalled = !$status;
    my $running;
    my $startup;

    if ($status) {
        my ( $status_service, $load_state, $active_state, $sub_state, @service_description ) = split( ' ', $status );
        $running = $active_state && $sub_state && $active_state ne 'inactive' && $sub_state ne 'dead';

        # they uninstalled it, but didn't run systemctl daemon-reload
        if ( $load_state eq 'not-found' ) {
            $uninstalled = 1;
        }
    }

    my $config = `systemctl --all --no-legend --no-pager list-unit-files NetworkManager.service 2>/dev/null`;
    if ($config) {
        my ( $config_service, $enabled_state ) = split( ' ', $config );
        $startup = $enabled_state && $enabled_state ne 'disabled' && $enabled_state ne 'masked';
    }

    $self->network_manager_report_status( $uninstalled, $running, $startup );
    return;
}

sub check_system_files {
    my ($self) = @_;
    $self->SUPER::check_system_files;

    _ensure_selinux_disabled();

    # A tiny version of Cpanel::RpmUtils::checkupdatesystem();
    my $out = `/usr/bin/yum info glibc 2>&1` || '';    ## no critic(ProhibitQxAndBackticks)
    if ( $? != 0 ) {
        ERROR("Your operating system's RPM update method (yum) could not locate the glibc package. This is an indication of an improper setup. You must correct this error before you proceed. ");
        DEBUG("Output: $out");
        FATAL("\n\n");
    }

    return;
}

sub _ensure_selinux_disabled {

    # Disable selinux on RHEL systems.
    my $selinux_config_dir  = '/etc/selinux';
    my $selinux_config_file = "$selinux_config_dir/config";

    if ( open my $fh, '<', $selinux_config_file ) {
        local $/;
        my $selinux_config = <$fh>;
        my ($current_setting) = $selinux_config =~ m{^SELINUX=(\w+)$}xms;

        # If selinux config exists and is configured to disabled, do nothing.
        if ( $current_setting eq 'disabled' ) {
            return;
        }
    }

    INFO("Creating SELinux config file: $selinux_config_file");
    mkdir $selinux_config_dir unless -d $selinux_config_dir;
    open my $fh, '>', $selinux_config_file or FATAL("Unable to create $selinux_config_file");
    print {$fh} "SELINUX=disabled\n";
    close $fh;

    return;
}

# This is a peared down version of ensure_rpms_installed because we don't yet have cpanel code.
# We also assume centhat 5/6/7 for this code.
sub install_basic_precursor_packages {
    my ($self) = @_;

    # Disable rpmforge repos
    if ( glob '/etc/yum.repos.d/*rpmforge*' ) {
        WARN('DISABLING rpmforge yum repositories.');
        mkdir( '/etc/yum.repos.d.disabled', 0755 );
        Common::ssystem('mv -fv -- /etc/yum.repos.d/*rpmforge* /etc/yum.repos.d.disabled/ 2>/dev/null');
    }

    $self->setup_update_config();

    # No fastest-mirror package available on CentOS 8
    if ( is_yum_system() ) {
        $self->install_fastest_mirror;
    }

    # Minimal packages needed to use yum.

    INFO("Installing packages needed to download and run the cPanel initial install.");

    # Assure wget/bzip2/gpg are installed for centhat. These packages are needed prior to sysup
    # Password strength functionality relies on cracklib-dicts being installed
    my @packages_to_install = qw/wget bzip2 gnupg2 xz yum nscd psmisc cracklib-dicts crontabs sysstat perl-Net-SSLeay/;

    my $distro_major = $self->distro_major;
    if ( $distro_major >= 8 ) {

        # Install epel-releases manually since the BaseOS repo no longer contains this package
        my $repo = 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-' . $distro_major . '.noarch.rpm';
        $self->yum_nohang_ssystem( '/usr/bin/yum', '-y', 'install', $repo );

        # libssh2 moved to epel. python3 is required for retry_rpm.
        push @packages_to_install, 'python3';
    }
    else {
        # rdate and yum-fastestmirror aren't available on 8, but set as default for everything else
        push( @packages_to_install, 'rdate', 'yum-fastestmirror' );
    }

    # Don't attempt to install kernel-headers on systems with the CentOS Plus kernel headers already installed.
    # We do not need kernel-headers for v70+ since we don't link anything against the kernel anymore
    # if ( !has_kernel_plus_headers() ) {
    #    push @packages_to_install, 'kernel-headers';    # Needed because Cpanel::SysPkgs excludes kernel_version
    #}

    if (@packages_to_install) {
        $self->yum_nohang_ssystem( '/usr/bin/yum', '-y', 'install', @packages_to_install );
    }

    # Make sure all rpms are up to date if we are running
    # an older version that CentOS 7 since we only support
    # Centos 6.5+.
    #
    # Additionally we need Centos 7.4+ to ensure they
    # have the latest version of openssl per
    # CPANEL-25853

    my $distro_version = sprintf( "%d.%d", $self->distro_major, $self->distro_minor );
    if ( $distro_version < 6.5 || ( $distro_major == 7 && $distro_version < 7.4 ) ) {
        $self->yum_nohang_ssystem( '/usr/bin/yum', '-y', 'update' );
    }

    # Reinstate yum exclusions
    unlink '/etc/checkyumdisable';
    Common::ssystem('/usr/local/cpanel/scripts/checkyum') if ( -e '/usr/local/cpanel/scripts/checkyum' );
    return;
}

sub setup_update_config {
    my ($self) = @_;

    # legacy files
    unlink('/var/cpanel/useup2date');
    unlink('/var/cpanel/useyum');
    $self->touch('/var/cpanel/yum_rhn') if $self->distro_name eq 'redhat';

    INFO("The installation process will now ensure that GPG is set up properly before it imports keys.");
    Common::ssystem(qw{/usr/bin/gpg --list-keys});

    INFO("The installation process will now import GPG keys for yum.");
    if ( -e '/usr/share/rhn/RPM-GPG-KEY' ) {
        Common::ssystem( '/usr/bin/gpg', '--import', '/usr/share/rhn/RPM-GPG-KEY' );
        Common::ssystem( '/bin/rpm',     '--import', '/usr/share/rhn/RPM-GPG-KEY' );
    }

    if ( !-e '/etc/yum.conf' && -e '/etc/centos-yum.conf' ) {
        INFO("The system will now set up yum from the /etc/centos-yum.conf file.");
        Common::ssystem(qw{cp -f /etc/centos-yum.conf /etc/yum.conf});
    }
    return;
}

sub yum_nohang_ssystem {
    my ( $self, @cmd ) = @_;

    # some base packages were moved to PowerTools on CentOS 8; e.g. elinks
    my $power_repo = $self->_get_powertools_repoid;
    push @cmd, "--enablerepo=$power_repo" if $power_repo;

    my $failcount = 0;
    my $result    = 1;
    while ($result) {    # While yum is failing.
        $result = Common::ssystem(@cmd);
        last if ( !$result );    # yum came back clean. Stop re-trying

        $failcount++;
        if ( $failcount > 5 ) {
            FATAL("yum failed $failcount times. The installation process cannot continue.");
        }
    }
    return;
}

# see also: Cpanel::SysPkgs::YUM::_get_powertools_repoid
sub _get_powertools_repoid {
    my ($self) = @_;

    return if $self->distro_major <= 7;
    return if $self->distro_major >= 9 && $self->distro_name eq 'cloudlinux';

    return 'cloudlinux-PowerTools' if $self->distro_name eq 'cloudlinux';

    return 'crb' if $self->distro_major >= 9;

    if ( $self->distro_major == 8 && $self->distro_minor >= 3 ) {    # distro_ver >= 8.3
        return 'powertools';
    }

    return 'PowerTools';
}

sub is_yum_system {
    return 'yum' eq name_of_package_manager();
}

my $package_manager;

sub name_of_package_manager {
    return $package_manager if defined $package_manager;

    my $code = Common::ssystem( qw(rpm -q dnf), { 'ignore_errors' => 1 } );
    if ( 0 == $code ) {
        $package_manager = 'dnf';
    }
    else {
        $package_manager = 'yum';
    }

    return $package_manager;
}

# Install fastest mirror plugin for CentOS
sub install_fastest_mirror {
    my ($self) = @_;

    return unless $self->distro_name =~ m/centos|almalinux|rocky/;
    return if has_yum_plugin_fastestmirror();

    INFO("Installing the fastest mirror plugin...");
    Common::ssystem( '/usr/bin/yum', 'clean', 'plugins' );
    Common::ssystem( '/usr/bin/yum', '-y',    'install', 'yum-fastestmirror' );
    Common::ssystem( '/usr/bin/yum', 'clean', 'plugins' );

    # We set the number of threads in bootstrap
    #
    #
    #  We used to support 512MB of ram which caused a problem with a high
    #  maxthreads (FB-51412), however this is no longer an issue
    #  https://documentation.cpanel.net/display/78Docs/Installation+Guide+-+System+Requirements
    #
    return;
}

sub has_yum_plugin_fastestmirror {
    my $rpm_query = `rpm -q --nodigest --nosignature yum-plugin-fastestmirror`;    ## no critic(ProhibitQxAndBackticks)
    return $rpm_query =~ /not installed/ ? 0 : 1;
}

sub remove_distro_software {
    my ($self) = @_;

    my @remove_rpms = qw(
      dovecot
      exim
      mysql
      MySQL
      mysql-max
      MySQL-Max
      mysql-devel
      MySQL-devel
      mysql-client
      MySQL-client
      mysql-ndb-storage
      MySQL-ndb-storage
      mysql-ndb-management
      MySQL-ndb-management
      mysql-ndb-tools
      MySQL-ndb-tools
      mysql-ndb-extra
      MySQL-ndb-extra
      mysql-shared
      MySQL-shared
      mysql-libs
      MySQL-libs
      mysql-bench
      MySQL-bench
      mysql-server
      MySQL-server
      wu-ftpd
      portreserve
      postfix
      sendmail
      smail
      spamassassin
      apache-conf
      mod_perl
      mariadb-libs
      MariaDB-client
      MariaDB-common
      MariaDB-server
      MariaDB-compat
      MariaDB-shared
      pure-ftpd
      proftpd
      bind-chroot
    );

    INFO('Ensuring that prelink is disabled...');

    if ( open( my $fh, '+<', '/etc/sysconfig/prelink' ) ) {
        my @lines = map { my $s = $_; $s =~ s/^(PRELINKING=)yes(.*)$/$1no$2/; $s } <$fh>;
        seek( $fh, 0, 0 );
        print {$fh} @lines;
        truncate( $fh, tell($fh) );
    }

    INFO('Ensuring that conflicting services are not installed...');
    my @rpms_to_remove =
      map  { ( split( m{-}, $_, 2 ) )[1] }                                                                   # split INSTALLED-NAME and take NAME
      grep { rindex( $_, 'INSTALLED-', 0 ) == 0 }                                                            # Only output that starts with INSTALLED- is installed
      split( m{\n}, `rpm -q --nodigest --nosignature --queryformat 'INSTALLED-%{NAME}\n' @remove_rpms` );    ## no critic(ProhibitQxAndBackticks)
    if (@rpms_to_remove) {
        DEBUG(" Removing @rpms_to_remove...");
        Common::ssystem( 'rpm', '-e', '--nodeps', @rpms_to_remove, { ignore_errors => 1 } );
    }

    INFO('Removing conflicting service references from the RPM database (but leaving the services installed)...');
    my @all_pkgs = `rpm -qa --nodigest --nosignature --queryformat '%{name}\n'`;                             ## no critic(ProhibitQxAndBackticks)
    @all_pkgs = grep { $_ !~ m/^(?:cpanel|alt)-/ } @all_pkgs;                                                # Don't worry about cpanel or cloudlinux RPMS.

    unless ( $self->skip_apache ) {
        foreach my $rpm ( grep m/http|php|apache|mod_perl/, @all_pkgs ) {
            next if $rpm =~ m/^(perl|lib)/;                                                                  # ignore things like libnghttp2 and perl-LWP-Protocol-https which we want!!!
            chomp $rpm;
            DEBUG(" Removing $rpm...");
            Common::ssystem( 'rpm', '-e', '--nodeps', $rpm, { ignore_errors => 1 } );
        }
    }

    # CPANEL-30184: Required since the file is not managed by the rpm, and is not removed with it.
    if ( -e '/var/lib/dovecot/ssl-parameters.dat' ) {
        unlink '/var/lib/dovecot/ssl-parameters.dat';
    }

    return;
}

sub verify_mysql_version {
    my ( $self, $cpanel_config ) = @_;

    my $mysql_version = $cpanel_config->{'mysql-version'};

    return unless length $mysql_version;

    # The only supported installable versions are:
    # 5.7, 8.0, 8.4, 10.3, 10.5, 10.6, 10.11 11.4
    # The following will recommend a specific version in error output:
    # 5.5, 5.6, 10.0, 10.1, 10.2
    my $version_filter = qr{^(?:
        5\.[5-7]
        | 8(?:\.[04])
        | 10(?:\.(?:[0-3,5-6]|11))
        | 11(?:\.(?:[4]))
    )$}x;
    unless ( $mysql_version =~ $version_filter ) {
        FATAL('The mysql-version value in /root/cpanel_profile/cpanel.config is either invalid or references an unsupported MySQL/MariaDB version. See https://go.cpanel.net/supported-mysql-mariadb-versions for a list of supported versions.');
    }

    my $lts_version  = $self->lts_version;
    my $distro_major = $self->distro_major;

    my %db_id = CpanelMySQL::get_db_identifiers($mysql_version);

    if ( $self->distro_name eq 'cloudlinux' && $distro_major == 6 && $mysql_version >= 10.5 ) {
        FATAL("cPanel & WHM does not support $db_id{'stylized'} $mysql_version on CloudLinux™ $distro_major. See https://go.cpanel.net/supported-mysql-mariadb-versions for a list of supported versions.");
    }

    my $advice = CpanelMySQL::get_db_version_advice( $mysql_version, $lts_version, $distro_major, $db_id{'plain'} );

    if ( $advice->{ver} && $advice->{action} ) {
        FATAL('The mysql-version value in /root/cpanel_profile/cpanel.config is either invalid or references an unsupported MySQL/MariaDB version. See https://go.cpanel.net/supported-mysql-mariadb-versions for a list of supported versions.');
    }

    return;
}

sub is_python2_named_python {
    return 0 == Common::ssystem( qw(yum info python), { 'ignore_errors' => 1, 'quiet' => 1 } );
}

# These packages are needed for MySQL later in the install
# By installing them now we do not have to wait for
# download
sub background_download_packages_used_during_initial_install {
    my ($self) = @_;

    my @elinks_deps                       = qw(js nss_compat_ossl);
    my @sysup_packages_to_install         = qw{quota expat expat-devel};
    my @ea4_packages_to_install           = qw{elinks libssh2 libssh2-devel libvpx scl-utils perl-libwww-perl krb5-devel perl-Compress-Raw-Bzip2 perl-Compress-Raw-Zlib autoconf automake};
    my @mysql_support_packages_to_install = qw{numactl-libs grep shadow-utils coreutils perl-DBI};

    @ea4_packages_to_install = grep { $_ ne 'elinks' } @ea4_packages_to_install if $self->distro_major >= 9;

    my @packages_to_install = ( @mysql_support_packages_to_install, @sysup_packages_to_install, @ea4_packages_to_install );

    if ( $self->distro_major <= 8 ) {    # python2 is not available starting with 9
        my @python2_packages = qw{python python-devel python-docs python-setuptools };

        if ( is_python2_named_python() ) {
            push @packages_to_install, @python2_packages;
        }
        else {
            push @packages_to_install, map { my $pkg = $_; $pkg =~ s/python/python2/; $pkg } @python2_packages;
        }
    }

    if ( $self->distro_major < 8 ) {
        push @packages_to_install, @elinks_deps;
    }

    my @epel;
    if ( -e "/etc/yum.repos.d/epel.repo" ) {    # for ea4
        @epel = ('--enablerepo=epel');
    }

    return $self->run_in_background( sub { $self->yum_nohang_ssystem( '/usr/bin/yum', @epel, '--downloadonly', '-y', 'install', @packages_to_install ); } );
}

sub pre_checks_while_waiting_for_fix_cpanel_perl {
    my ($self) = @_;

    $self->SUPER::pre_checks_while_waiting_for_fix_cpanel_perl;

    Common::ssystem( '/usr/sbin/setenforce', '0', { ignore_errors => 1 } ) if -e '/usr/sbin/setenforce';

    return;
}

# Attempt to enable module for dnf to specific version
sub enable_dnf_module {
    my ( $self, $module, $version ) = @_;
    if ( !$module || !$version ) {
        WARN("Invalid call to enable_dnf_module(“$module”,“$version“)");
    }
    my $result = Common::ssystem( '/usr/bin/dnf', 'module', 'enable', "$module:$version", '-y' );
    return;
}
1;

Rosenblum TV: Video training, virtual workshops, classes, tutorials
logologologologo
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact

RE-INVENTING THE TELEVISION NEWS BUSINESS*

A revolution in video storytelling

Creating entirely new & cost-effective production methods

From the world leaders in video production training and the creators of Character Driven Storytelling™

*and every other business that uses video

WHAT WE DO

Over the past 35 years, we have designed, built or restructured some of the most powerful news and journalism companies in the world.

We replace the traditional TV news ‘crew’ with one highly trained journalist, working alone with nothing but an iPhone.

No more TV news ‘crews’, no editors and no field producers.

This is television news done the way newspaper journalism is done – one reporter with their electronic pad and pencil.

In doing this, we can cut the cost of production by as much as 75% while increasing ratings and audience engagement.

In the place of conventional TV news ‘packages’ – ie, reporter stand up, interview, b-roll, man on the street, we marry great journalism with Netflix and Hollywood storytelling.

It’s a combination that works.

We have taken most of our clients to #1 in their respective markets.

And it’s not just for news. Any company, any profit, any NGO and anyone else who is online needs to tell their story in compelling yet cost-effective video. We can teach you to do that. Either in person or virtually.

EXAMPLES OF WHAT WE CAN TEACH YOUR STAFF TO PRODUCE

ITAY HOD

Itay Hod, MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2018.

Because he works alone, with only an iPhone, he was able to embed himself with a homeless family.

Here’s the story he produced in a one-day turn.

KIET DO

Kiet Do, an MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2021.

Here is a story he produced, all on his own, with only an iPhone and in a one-day turn.

TAYLOR SCHAUB

Taylor Schaub, an MMJ with Spectrum News 1 in LA, took the 5-Day Intensive Video Storytelling Bootcamp in 2023.

Here is a story he turned in only one day, using only an iPhone. It was the first video story he ever did and it was nominated for an Emmy.

THE BOOTCAMP

How do we convert stations and whole networks to working in this way?

Since 1988, we have run intensive 5-Day Video Storytelling Bootcamps

We have done these all over the world.

These are hands-on bootcamps, and participants learn an entirely new way of creating TV news stories.

-We shoot at a 3:1 ratio or lower, so turnaround times are fast.

-We go directly from camera to timelilne and edit – no written scripts.  We work in the medium of pictures and sound.

-We are entirely character-driven.

-We are driven by pictures and real events.

-We are focused almost entirely on ’the viewer experience’.

Since 1988, more than 70,000 journalists around the world have taken our bootcamps, either in person on virtualy.

Case Studies

CBS Case Study Logos
CBS News

We have started to work with CBS News, bringing our ideas of character-driven storytelling to one of the most successful and biggest networks in the United States. Since beginning to work with them ratings have climbed and more importantly, audience engagement is through the ceiling.

Learn More
NYT Case Study Logos
New York Times Television

We started New York Times Television in 1990 and it was the first paper to be brought into the world of TV. It quickly became one of the most successful non-fiction production companies in the United States. The series and documentaries we produced won many awards including multiple Emmys.

Learn More
BBC Case Study Logos
The BBC

We have been working with the BBC since the year 2000 helping to convert their national news network to our visual storytelling technique. Most recently we have trained teams from their sports, documentaries, and comedy divisions to make character-driven stories using only smartphones.

Learn More
Spectrum Case Study Logos
Spectrum News

For the past five years we have worked with Spectrum News to introduce and train their journalists on visual, character driven storytelling using smartphones helping to create a different kind of local news for their network of 24-Hour News Stations across the United States.

Learn More
UN Case Study Logos
The United Nations

In 2006, we were approached by the United Nations. Rather than rely on news outlets, it would be much easier to train the field operatives to produce their own stories. We spent two years working with the UN, training more than 100 of their staff in bootcamps in Geneva and Nairobi.

Learn More
Star Ledger Case Study Logos
The Newark Star-Ledger

We trained 50 print reporters at the paper to shoot and tell their own stories, in conjunction with their print work. We built a TV newsroom in their existing print newsroom – you could not ask for a better set and they began to live stream their stories in conjunction with their print work.

Learn More
Mcgraw Hill Case Study Logos
Mcgraw Hill

We spent two years with McGraw Hill, training more than 150 of their staffers, making them completely video literate. McGraw/Hill media properties we transit included Business Week, Aviation Week, (what was the name of the architecture magazine), and JD Power and Associates.

Learn More
VOA Case Study Logos
Voice of America

In 1990, we were approached by The Voice of America, the official broadcasting agency for the United States Government. When we met with VOA, they were only a short wave radio broadcaster, but working with them, we took them into television, launching VOA-TV.

Learn More
Oyster Case Study Logos
Oyster Yachts

British based Oyster Yachts makes some of the finest yachts in the world. Like every other company, they had to find a way to feed the never-ending video demands of social media – sites like Instagram and TikTok. We trained the Oyster staff to tell their own stories, using only iPhones.

Learn More
SEPA Case Study Logos
Scottish Environmental Protection Agency

We were approached by SEPA, the Scottish Environmental Protection Agency because they had to continually find a way to ‘feed the media beast’. The result was that SEPA was able to tell their own stories, whenever they wanted, and at almost no additional cost.

Learn More
Image 11-11-22 at 6.25 PM

Michael on Media

Michael Rosenblum has been writing about the media since 1988. His work and ideas have appeared in The Guardian, The Huffington Post, Ilkeston Life and many other publications.

He has been blogging regularly for the past 35 years on this subject. Having taught media studies at Columbia University, NYU and now the University of Oxford, he is considered an expert on this subject.

Continue reading this post or look back at previous posts.

Read More

Do You Have Questions About Learning Video Skills?

If you would like to know more about our courses contact us and one of our training advisors will be happy to call you.

Contact Us

Copyright 2024. All rights reserved.