User:Sfiggins/RH-TACACS with LDAP Backend
From Labrats.us
Jump to navigationJump to searchInstall and Setup New CentOS 7 Server
Create base Centos 7 server, as documented below
New CentOS 7 Server Setup Commands
Edit /etc/ssh/sshd_config to enable X11 forwarding
edit /etc/ssh/sshd_config and replace:
X11Forwarding no X11UseLocalhost yes
with:
X11Forwarding yes X11UseLocalhost no
And add:
AddressFamily inet
Restart sshd
# /etc/init.d/sshd restart
Setup CPAN
Instal GCC
# yum install gcc Loaded plugins: product-id, rhnplugin, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package gcc.x86_64 0:4.4.7-16.el6 will be installed --> Processing Dependency: libgomp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64 --> Processing Dependency: cpp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64 --> Processing Dependency: libgcc >= 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64 --> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-16.el6.x86_64 --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.7-16.el6.x86_64 --> Running transaction check ---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed --> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 --> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 ---> Package cpp.x86_64 0:4.4.7-16.el6 will be installed --> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-16.el6.x86_64 ---> Package glibc-devel.x86_64 0:2.12-1.166.el6_7.1 will be installed --> Processing Dependency: glibc-headers = 2.12-1.166.el6_7.1 for package: glibc-devel-2.12-1.166.el6_7.1.x86_64 --> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.166.el6_7.1.x86_64 ---> Package libgcc.x86_64 0:4.4.6-3.el6 will be updated ---> Package libgcc.x86_64 0:4.4.7-16.el6 will be an update ---> Package libgomp.x86_64 0:4.4.6-3.el6 will be updated ---> Package libgomp.x86_64 0:4.4.7-16.el6 will be an update --> Running transaction check ---> Package glibc-headers.x86_64 0:2.12-1.166.el6_7.1 will be installed --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.166.el6_7.1.x86_64 --> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.166.el6_7.1.x86_64 ---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed ---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed --> Running transaction check ---> Package kernel-headers.x86_64 0:2.6.32-573.1.1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================ Package Arch Version Repository Size ============================================================================================================================ Installing: gcc x86_64 4.4.7-16.el6 twtc-rhel-i386_64-server-6 10 M Installing for dependencies: cloog-ppl x86_64 0.15.7-1.2.el6 twtc-rhel-i386_64-server-6 93 k cpp x86_64 4.4.7-16.el6 twtc-rhel-i386_64-server-6 3.7 M glibc-devel x86_64 2.12-1.166.el6_7.1 twtc-rhel-i386_64-server-6 985 k glibc-headers x86_64 2.12-1.166.el6_7.1 twtc-rhel-i386_64-server-6 614 k kernel-headers x86_64 2.6.32-573.1.1.el6 twtc-rhel-i386_64-server-6 3.9 M mpfr x86_64 2.4.1-6.el6 twtc-rhel-i386_64-server-6 156 k ppl x86_64 0.10.2-11.el6 twtc-rhel-i386_64-server-6 1.3 M Updating for dependencies: libgcc x86_64 4.4.7-16.el6 twtc-rhel-i386_64-server-6 103 k libgomp x86_64 4.4.7-16.el6 twtc-rhel-i386_64-server-6 134 k Transaction Summary ============================================================================================================================ Install 8 Package(s) Upgrade 2 Package(s) Total download size: 21 M Is this ok [y/N]: y Downloading Packages: (1/10): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm | 93 kB 00:00 (2/10): cpp-4.4.7-16.el6.x86_64.rpm | 3.7 MB 00:00 (3/10): gcc-4.4.7-16.el6.x86_64.rpm | 10 MB 00:00 (4/10): glibc-devel-2.12-1.166.el6_7.1.x86_64.rpm | 985 kB 00:00 (5/10): glibc-headers-2.12-1.166.el6_7.1.x86_64.rpm | 614 kB 00:00 (6/10): kernel-headers-2.6.32-573.1.1.el6.x86_64.rpm | 3.9 MB 00:00 (7/10): libgcc-4.4.7-16.el6.x86_64.rpm | 103 kB 00:00 (8/10): libgomp-4.4.7-16.el6.x86_64.rpm | 134 kB 00:00 (9/10): mpfr-2.4.1-6.el6.x86_64.rpm | 156 kB 00:00 (10/10): ppl-0.10.2-11.el6.x86_64.rpm | 1.3 MB 00:00 ---------------------------------------------------------------------------------------------------------------------------- Total 9.0 MB/s | 21 MB 00:02 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : libgcc-4.4.7-16.el6.x86_64 1/12 Installing : ppl-0.10.2-11.el6.x86_64 2/12 Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 3/12 Installing : kernel-headers-2.6.32-573.1.1.el6.x86_64 4/12 Installing : glibc-headers-2.12-1.166.el6_7.1.x86_64 5/12 Installing : glibc-devel-2.12-1.166.el6_7.1.x86_64 6/12 Installing : mpfr-2.4.1-6.el6.x86_64 7/12 Installing : cpp-4.4.7-16.el6.x86_64 8/12 Updating : libgomp-4.4.7-16.el6.x86_64 9/12 Installing : gcc-4.4.7-16.el6.x86_64 10/12 Cleanup : libgcc-4.4.6-3.el6.x86_64 11/12 Cleanup : libgomp-4.4.6-3.el6.x86_64 12/12 Installed: gcc.x86_64 0:4.4.7-16.el6 Dependency Installed: cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-16.el6 glibc-devel.x86_64 0:2.12-1.166.el6_7.1 glibc-headers.x86_64 0:2.12-1.166.el6_7.1 kernel-headers.x86_64 0:2.6.32-573.1.1.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6 Dependency Updated: libgcc.x86_64 0:4.4.7-16.el6 libgomp.x86_64 0:4.4.7-16.el6 Complete!
Install CPAN
# yum install cpan Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.cs.uwp.edu * extras: mirror.cs.uwp.edu * updates: sjc.edge.kernel.org Resolving Dependencies --> Running transaction check ---> Package perl-CPAN.noarch 0:1.9800-293.el7 will be installed --> Processing Dependency: perl(local::lib) for package: perl-CPAN-1.9800-293.el7.noarch --> Processing Dependency: perl(ExtUtils::MakeMaker) for package: perl-CPAN-1.9800-293.el7.noarch --> Processing Dependency: perl(Digest::SHA) for package: perl-CPAN-1.9800-293.el7.noarch --> Running transaction check ---> Package perl-Digest-SHA.x86_64 1:5.85-4.el7 will be installed --> Processing Dependency: perl(Digest::base) for package: 1:perl-Digest-SHA-5.85-4.el7.x86_64 ---> Package perl-ExtUtils-MakeMaker.noarch 0:6.68-3.el7 will be installed --> Processing Dependency: perl(Test::Harness) for package: perl-ExtUtils-MakeMaker-6.68-3.el7.noarch --> Processing Dependency: perl(ExtUtils::Packlist) for package: perl-ExtUtils-MakeMaker-6.68-3.el7.noarch --> Processing Dependency: perl(ExtUtils::Manifest) for package: perl-ExtUtils-MakeMaker-6.68-3.el7.noarch --> Processing Dependency: perl(ExtUtils::Installed) for package: perl-ExtUtils-MakeMaker-6.68-3.el7.noarch --> Processing Dependency: perl(ExtUtils::Install) for package: perl-ExtUtils-MakeMaker-6.68-3.el7.noarch ---> Package perl-local-lib.noarch 0:1.008010-4.el7 will be installed --> Running transaction check ---> Package perl-Digest.noarch 0:1.17-245.el7 will be installed ---> Package perl-ExtUtils-Install.noarch 0:1.58-293.el7 will be installed --> Processing Dependency: perl-devel for package: perl-ExtUtils-Install-1.58-293.el7.noarch ---> Package perl-ExtUtils-Manifest.noarch 0:1.61-244.el7 will be installed ---> Package perl-Test-Harness.noarch 0:3.28-3.el7 will be installed --> Running transaction check ---> Package perl-devel.x86_64 4:5.16.3-293.el7 will be installed --> Processing Dependency: systemtap-sdt-devel for package: 4:perl-devel-5.16.3-293.el7.x86_64 --> Processing Dependency: perl(ExtUtils::ParseXS) for package: 4:perl-devel-5.16.3-293.el7.x86_64 --> Processing Dependency: libdb-devel for package: 4:perl-devel-5.16.3-293.el7.x86_64 --> Processing Dependency: gdbm-devel for package: 4:perl-devel-5.16.3-293.el7.x86_64 --> Running transaction check ---> Package gdbm-devel.x86_64 0:1.10-8.el7 will be installed ---> Package libdb-devel.x86_64 0:5.3.21-24.el7 will be installed --> Processing Dependency: libdb(x86-64) = 5.3.21-24.el7 for package: libdb-devel-5.3.21-24.el7.x86_64 ---> Package perl-ExtUtils-ParseXS.noarch 1:3.18-3.el7 will be installed ---> Package systemtap-sdt-devel.x86_64 0:3.3-3.el7 will be installed --> Processing Dependency: pyparsing for package: systemtap-sdt-devel-3.3-3.el7.x86_64 --> Running transaction check ---> Package libdb.x86_64 0:5.3.21-17.el7_0.1 will be updated --> Processing Dependency: libdb(x86-64) = 5.3.21-17.el7_0.1 for package: libdb-utils-5.3.21-17.el7_0.1.x86_64 ---> Package libdb.x86_64 0:5.3.21-24.el7 will be an update ---> Package pyparsing.noarch 0:1.5.6-9.el7 will be installed --> Running transaction check ---> Package libdb-utils.x86_64 0:5.3.21-17.el7_0.1 will be updated ---> Package libdb-utils.x86_64 0:5.3.21-24.el7 will be an update --> Finished Dependency Resolution Dependencies Resolved =================================================================================================== Package Arch Version Repository Size =================================================================================================== Installing: perl-CPAN noarch 1.9800-293.el7 base 293 k Installing for dependencies: gdbm-devel x86_64 1.10-8.el7 base 47 k libdb-devel x86_64 5.3.21-24.el7 base 38 k perl-Digest noarch 1.17-245.el7 base 23 k perl-Digest-SHA x86_64 1:5.85-4.el7 base 58 k perl-ExtUtils-Install noarch 1.58-293.el7 base 74 k perl-ExtUtils-MakeMaker noarch 6.68-3.el7 base 275 k perl-ExtUtils-Manifest noarch 1.61-244.el7 base 31 k perl-ExtUtils-ParseXS noarch 1:3.18-3.el7 base 77 k perl-Test-Harness noarch 3.28-3.el7 base 302 k perl-devel x86_64 4:5.16.3-293.el7 base 453 k perl-local-lib noarch 1.008010-4.el7 base 64 k pyparsing noarch 1.5.6-9.el7 base 94 k systemtap-sdt-devel x86_64 3.3-3.el7 base 74 k Updating for dependencies: libdb x86_64 5.3.21-24.el7 base 720 k libdb-utils x86_64 5.3.21-24.el7 base 132 k Transaction Summary =================================================================================================== Install 1 Package (+13 Dependent packages) Upgrade ( 2 Dependent packages) Total download size: 2.7 M Is this ok [y/d/N]: y Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/16): gdbm-devel-1.10-8.el7.x86_64.rpm | 47 kB 00:00:00 (2/16): libdb-devel-5.3.21-24.el7.x86_64.rpm | 38 kB 00:00:00 (3/16): libdb-5.3.21-24.el7.x86_64.rpm | 720 kB 00:00:00 (4/16): libdb-utils-5.3.21-24.el7.x86_64.rpm | 132 kB 00:00:00 (5/16): perl-CPAN-1.9800-293.el7.noarch.rpm | 293 kB 00:00:00 (6/16): perl-Digest-1.17-245.el7.noarch.rpm | 23 kB 00:00:00 (7/16): perl-Digest-SHA-5.85-4.el7.x86_64.rpm | 58 kB 00:00:00 (8/16): perl-ExtUtils-Install-1.58-293.el7.noarch.rpm | 74 kB 00:00:00 (9/16): perl-ExtUtils-MakeMaker-6.68-3.el7.noarch.rpm | 275 kB 00:00:00 (10/16): perl-ExtUtils-Manifest-1.61-244.el7.noarch.rpm | 31 kB 00:00:00 (11/16): perl-ExtUtils-ParseXS-3.18-3.el7.noarch.rpm | 77 kB 00:00:00 (12/16): perl-Test-Harness-3.28-3.el7.noarch.rpm | 302 kB 00:00:00 (13/16): perl-devel-5.16.3-293.el7.x86_64.rpm | 453 kB 00:00:00 (14/16): perl-local-lib-1.008010-4.el7.noarch.rpm | 64 kB 00:00:00 (15/16): systemtap-sdt-devel-3.3-3.el7.x86_64.rpm | 74 kB 00:00:00 (16/16): pyparsing-1.5.6-9.el7.noarch.rpm | 94 kB 00:00:00 --------------------------------------------------------------------------------------------------- Total 2.9 MB/s | 2.7 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : libdb-5.3.21-24.el7.x86_64 1/18 Installing : libdb-devel-5.3.21-24.el7.x86_64 2/18 Installing : pyparsing-1.5.6-9.el7.noarch 3/18 Installing : systemtap-sdt-devel-3.3-3.el7.x86_64 4/18 Installing : perl-Digest-1.17-245.el7.noarch 5/18 Installing : 1:perl-Digest-SHA-5.85-4.el7.x86_64 6/18 Installing : perl-ExtUtils-Manifest-1.61-244.el7.noarch 7/18 Installing : perl-Test-Harness-3.28-3.el7.noarch 8/18 Installing : perl-local-lib-1.008010-4.el7.noarch 9/18 Installing : gdbm-devel-1.10-8.el7.x86_64 10/18 Installing : 1:perl-ExtUtils-ParseXS-3.18-3.el7.noarch 11/18 Installing : perl-ExtUtils-MakeMaker-6.68-3.el7.noarch 12/18 Installing : perl-ExtUtils-Install-1.58-293.el7.noarch 13/18 Installing : 4:perl-devel-5.16.3-293.el7.x86_64 14/18 Installing : perl-CPAN-1.9800-293.el7.noarch 15/18 Updating : libdb-utils-5.3.21-24.el7.x86_64 16/18 Cleanup : libdb-utils-5.3.21-17.el7_0.1.x86_64 17/18 Cleanup : libdb-5.3.21-17.el7_0.1.x86_64 18/18 Verifying : libdb-5.3.21-24.el7.x86_64 1/18 Verifying : gdbm-devel-1.10-8.el7.x86_64 2/18 Verifying : 1:perl-ExtUtils-ParseXS-3.18-3.el7.noarch 3/18 Verifying : perl-local-lib-1.008010-4.el7.noarch 4/18 Verifying : perl-CPAN-1.9800-293.el7.noarch 5/18 Verifying : perl-Test-Harness-3.28-3.el7.noarch 6/18 Verifying : 1:perl-Digest-SHA-5.85-4.el7.x86_64 7/18 Verifying : perl-ExtUtils-Install-1.58-293.el7.noarch 8/18 Verifying : perl-ExtUtils-Manifest-1.61-244.el7.noarch 9/18 Verifying : libdb-utils-5.3.21-24.el7.x86_64 10/18 Verifying : perl-Digest-1.17-245.el7.noarch 11/18 Verifying : pyparsing-1.5.6-9.el7.noarch 12/18 Verifying : libdb-devel-5.3.21-24.el7.x86_64 13/18 Verifying : perl-ExtUtils-MakeMaker-6.68-3.el7.noarch 14/18 Verifying : systemtap-sdt-devel-3.3-3.el7.x86_64 15/18 Verifying : 4:perl-devel-5.16.3-293.el7.x86_64 16/18 Verifying : libdb-utils-5.3.21-17.el7_0.1.x86_64 17/18 Verifying : libdb-5.3.21-17.el7_0.1.x86_64 18/18 Installed: perl-CPAN.noarch 0:1.9800-293.el7 Dependency Installed: gdbm-devel.x86_64 0:1.10-8.el7 libdb-devel.x86_64 0:5.3.21-24.el7 perl-Digest.noarch 0:1.17-245.el7 perl-Digest-SHA.x86_64 1:5.85-4.el7 perl-ExtUtils-Install.noarch 0:1.58-293.el7 perl-ExtUtils-MakeMaker.noarch 0:6.68-3.el7 perl-ExtUtils-Manifest.noarch 0:1.61-244.el7 perl-ExtUtils-ParseXS.noarch 1:3.18-3.el7 perl-Test-Harness.noarch 0:3.28-3.el7 perl-devel.x86_64 4:5.16.3-293.el7 perl-local-lib.noarch 0:1.008010-4.el7 pyparsing.noarch 0:1.5.6-9.el7 systemtap-sdt-devel.x86_64 0:3.3-3.el7 Dependency Updated: libdb.x86_64 0:5.3.21-24.el7 libdb-utils.x86_64 0:5.3.21-24.el7 Complete!
Auto Configure CPAN
When you first run CPAN, it will offer to automatically configure. Go ahead and let it do this, and we will fix it later.
Change some defaults
# cpan Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.9402) Enter 'h' for help. cpan[1]> o conf urllist urllist Type 'o conf' to view all configuration items cpan[4]> o conf commit commit: wrote '/root/.cpan/CPAN/MyConfig.pm'
# perl -npe 's/root\/.cpan/var\/spool\/cpan/g' -i /root/.cpan/CPAN/MyConfig.pm # mkdir -p /var/spool/cpan
Update /etc/sysconfig/iptables
Add to /etc/sysconfig/iptables:
# Permit cpan.twtelecom.net has address 216.136.95.32 -A TWTC-SERVICE-OUT --out-interface eth0 -m tcp -p tcp --dport 80 --destination 216.136.95.32/32 -j NEWSTATE
Install Perl Modules (via yum)
Install the perm modules that are possible via yum
# yum install perl-Array-Compare perl-Capture-Tiny perl-DBD-MySQL perl-DBI perl-MIME-Lite perl-Net-DNS perl-Time-Piece
Install Perl Modules (via CPAN)
Install the following modules via CPAN:
Date::Calendar Date::Calendar::Profiles Date::Parse IO::Select Net::LDAP::Constant Net::LDAP::Control::Paged Net::LDAP::Entry Net::LDAPS Net::LDAP::Util
Command looks like this:
# cpan Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v2.10) Enter 'h' for help. cpan[1]> install Date::Calendar Date::Calendar::Profiles Date::Parse IO::Select MIME::Lite Net::LDAP::Constant Net::LDAP::Control::Paged Net::LDAP::Entry Net::LDAPS Net::LDAP::Util
Follow through the install process, hitting a million "Y".