Loading...

Follow MacLochlainns Weblog on Feedspot


Valid
or
Continue with Google
Continue with Facebook
MacLochlainns Weblog by Maclochlainn - 1w ago

While trying to use the Ruby gem utility to install the MongoDB gem, I encountered an error on a new Fedora 27 instance. This is the error message:

Fetching: bson-4.3.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing mongo:
        ERROR: Failed to build gem native extension.

    current directory: /usr/local/share/gems/gems/bson-4.3.0/ext/bson
/usr/bin/ruby -r ./siteconf20180517-49401-1htl7zc.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /usr/local/share/gems/gems/bson-4.3.0 for inspection.
Results logged to /usr/local/lib64/gems/ruby/bson-4.3.0/gem_make.out
[student@localhost ~]$ ruby --version
ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]

There wasn’t much on the error but I checked the Ruby installation and ruby-devel package wasn’t installed by default. That’s odd since I choose to install the development components on the workstation.

Not a problem, I simply ran the yum utility as root through a sudoer user to install the ruby-devel package:

yum install -y ruby-devel

You should see a successful installation log like:

Display ruby-devel Package Log File

Last metadata expiration check: 2:44:39 ago on Thu 17 May 2018 11:01:10 AM MDT.
Dependencies resolved.
================================================================================================
 Package                Arch               Version                    Repository           Size
================================================================================================
Installing:
 ruby-devel             x86_64             2.4.3-87.fc27              updates             119 k

Transaction Summary
================================================================================================
Install  1 Package

Total download size: 119 k
Installed size: 283 k
Downloading Packages:
ruby-devel-2.4.3-87.fc27.x86_64.rpm                             269 kB/s | 119 kB     00:00    
------------------------------------------------------------------------------------------------
Total                                                           118 kB/s | 119 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                        1/1 
  Installing       : ruby-devel-2.4.3-87.fc27.x86_64                                        1/1 
  Verifying        : ruby-devel-2.4.3-87.fc27.x86_64                                        1/1 

Installed:
  ruby-devel.x86_64 2.4.3-87.fc27                                                               

Complete!

As I suspected, it fixed the problem immediately when I ran gem utility to install the mongo gem. The syntax to install the mongo gem is:

gem install mongo

The console output should be:

Building native extensions.  This could take a while...
Successfully installed bson-4.3.0
Fetching: mongo-2.5.3.gem (100%)
Successfully installed mongo-2.5.3
Parsing documentation for bson-4.3.0
Installing ri documentation for bson-4.3.0
Parsing documentation for mongo-2.5.3
Installing ri documentation for mongo-2.5.3
Done installing documentation for bson, mongo after 3 seconds
2 gems installed

As always, I hope this helps somebody looking for a straightforward example and solution.

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
MacLochlainns Weblog by Maclochlainn - 1w ago

The last time that I installed Cassandra was on a version of Fedora 20. So, I new the first thing to check was the installation of Java. You can check the Java installation with two statements on a fresh installation of Fedora 27. You need to check the Java runtime and then the Java Software Development Kit before installing, starting, and using Cassandra.

Installing Prerequisites

You check the Java runtime with this command:

java -version

It should return:

openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)

You check the Java Software Development Kit (JSDK) with this command:

javac -version

It should return:

javac 1.8.0_171

After verifying the Java and JSDK installation, you can install the Cassandra packages with the following yum command as the root user or a user with sudoer privileges:

yum install -y *cassandra*

You should see a successful installation log like:

Display Cassandra Log File

Last metadata expiration check: 2:01:07 ago on Wed 16 May 2018 09:48:04 PM MDT.
Dependencies resolved.
================================================================================================
 Package                          Arch      Version                            Repository  Size
================================================================================================
Installing:
 cassandra                        x86_64    3.11.1-4.fc27                      updates    175 k
 cassandra-java-driver            noarch    3.1.4-2.fc27                       fedora     1.0 M
 cassandra-java-driver-extras     noarch    3.1.4-2.fc27                       fedora      60 k
 cassandra-java-driver-javadoc    noarch    3.1.4-2.fc27                       fedora     675 k
 cassandra-java-driver-mapping    noarch    3.1.4-2.fc27                       fedora      87 k
 cassandra-java-driver-parent     noarch    3.1.4-2.fc27                       fedora      15 k
 cassandra-java-driver-tests      noarch    3.1.4-2.fc27                       fedora      21 k
 cassandra-javadoc                x86_64    3.11.1-4.fc27                      updates    3.3 M
 cassandra-parent                 x86_64    3.11.1-4.fc27                      updates     17 k
 cassandra-server                 x86_64    3.11.1-4.fc27                      updates    179 k
 python-cassandra-driver-doc      x86_64    3.13.0-1.fc27                      updates     64 k
 python2-cassandra-driver         x86_64    3.13.0-1.fc27                      updates    2.6 M
 python3-cassandra-driver         x86_64    3.13.0-1.fc27                      updates    2.8 M
Installing dependencies:
 airline                          noarch    0.7-6.fc27                         fedora      89 k
 antlr3-java                      noarch    1:3.5.2-16.fc27                    fedora     173 k
 apache-commons-configuration     noarch    1.10-10.fc27                       fedora     358 k
 avalon-framework                 noarch    4.3-18.fc27                        fedora      89 k
 avalon-logkit                    noarch    2.1-28.fc27                        fedora      85 k
 bean-validation-api              noarch    1.1.0-8.fc27                       fedora      61 k
 caffeine                         noarch    2.3.5-3.fc27                       fedora     724 k
 cassandra-java-libs              x86_64    3.11.1-4.fc27                      updates    5.3 M
 cassandra-python2-cqlshlib       x86_64    3.11.1-4.fc27                      updates    631 k
 classmate                        noarch    1.3.1-3.fc27                       fedora      72 k
 compress-lzf                     noarch    1.0.3-7.fc27                       fedora      86 k
 concurrentlinkedhashmap-lru      noarch    1.4.2-5.fc27                       fedora      59 k
 dain-snappy                      noarch    0.4-4.fc27                         fedora      67 k
 ecj                              noarch    1:4.7.1-1.fc27                     fedora     2.2 M
 fastutil                         noarch    7.0.7-4.fc27                       fedora      14 M
 felix-framework                  noarch    5.6.0-3.fc27                       fedora     672 k
 findbugs                         noarch    3.0.1-11.fc27                      fedora     4.5 M
 findbugs-bcel                    noarch    6.0-0.9.20140707svn1547656.fc27    fedora     572 k
 fontbox                          noarch    1.8.13-1.fc26                      fedora     228 k
 fop                              noarch    2.0-7.fc27                         fedora     4.5 M
 hibernate-validator              noarch    5.2.4-3.fc27                       fedora     632 k
 high-scale-lib                   noarch    1.1.4-9.fc27                       fedora     105 k
 jBCrypt                          noarch    0.4-5.fc27                         fedora      22 k
 jFormatString                    noarch    0-0.26.20131227gitf159b88.fc27     fedora      38 k
 jackson                          noarch    1.9.11-12.fc27                     fedora     1.0 M
 jamm                             noarch    0.3.1-5.fc27                       fedora      35 k
 jboss-logging                    noarch    3.3.0-3.fc27                       fedora      73 k
 jcip-annotations                 noarch    1-21.20060626.fc27                 fedora      13 k
 jna                              x86_64    4.4.0-7.fc27                       fedora     237 k
 joda-time                        noarch    2.9.3-4.tzdata2016c.fc27           fedora     522 k
 jsr-311                          noarch    1.1.1-14.fc27                      fedora      50 k
 log4j-over-slf4j                 noarch    1.7.25-4.fc27                      updates     36 k
 logback                          noarch    1.1.7-3.fc27                       fedora     3.0 M
 lz4-java                         x86_64    1.3.0-8.fc27                       fedora     151 k
 maven-archiver                   noarch    3.1.1-3.fc27                       fedora      38 k
 maven-common-artifact-filters    noarch    3.0.1-3.fc27                       fedora      60 k
 maven-compiler-plugin            noarch    3.6.1-3.fc27                       fedora      67 k
 maven-doxia-core                 noarch    1.7-5.fc27                         fedora     166 k
 maven-doxia-logging-api          noarch    1.7-5.fc27                         fedora      30 k
 maven-doxia-module-apt           noarch    1.7-5.fc27                         fedora      63 k
 maven-doxia-module-fml           noarch    1.7-5.fc27                         fedora      51 k
 maven-doxia-module-fo            noarch    1.7-5.fc27                         fedora      72 k
 maven-doxia-module-markdown      noarch    1.7-5.fc27                         fedora      29 k
 maven-doxia-module-xdoc          noarch    1.7-5.fc27                         fedora      50 k
 maven-doxia-module-xhtml         noarch    1.7-5.fc27                         fedora      31 k
 maven-doxia-sink-api             noarch    1.7-5.fc27                         fedora      25 k
 maven-doxia-sitetools            noarch    1.7.4-4.fc27                       fedora     186 k
 maven-failsafe-plugin            noarch    2.19.1-8.fc27                      fedora      65 k
 maven-javadoc-plugin             noarch    2.10.4-4.fc27                      fedora     222 k
 maven-plugin-annotations         noarch    3.5-3.fc27                         fedora      26 k
 maven-reporting-api              noarch    1:3.0-12.fc27                      fedora      23 k
 maven-shared-incremental         noarch    1.1-13.fc27                        fedora      26 k
 maven-surefire                   noarch    2.19.1-8.fc27                      fedora     496 k
 maven-surefire-plugin            noarch    2.19.1-8.fc27                      fedora      40 k
 metrics                          noarch    3.1.2-5.fc27                       fedora     109 k
 metrics-jvm                      noarch    3.1.2-5.fc27                       fedora      45 k
 metrics-reporter-config          noarch    3.2.2-2.fc27                       fedora      57 k
 objectweb-asm3                   noarch    3.3.1-15.fc27                      fedora     397 k
 ohc                              noarch    0.6.1-1.fc27                       fedora     147 k
 parboiled                        noarch    1.1.6-12.fc27                      fedora     281 k
 pegdown                          noarch    1.4.2-11.fc27                      fedora      85 k
 plexus-archiver                  noarch    3.4-3.fc27                         fedora     179 k
 plexus-compiler                  noarch    2.8.1-5.fc27                       fedora      69 k
 plexus-component-api             noarch    1.0-0.23.alpha15.fc27              fedora      31 k
 plexus-i18n                      noarch    1.0-0.10.b10.4.fc27                fedora      23 k
 plexus-interactivity-api         noarch    1.0-0.24.alpha6.fc27               fedora      19 k
 plexus-io                        noarch    2.7.1-3.fc27                       fedora      88 k
 python-blist                     x86_64    1.3.6-12.fc27                      fedora      66 k
 python-scales                    noarch    1.0.5-10.fc27                      fedora      68 k
 python2-futures                  noarch    3.1.1-2.fc27                       fedora      32 k
 python2-simplejson               x86_64    3.10.0-5.fc27                      fedora     278 k
 python3-blist                    x86_64    1.3.6-12.fc27                      fedora      66 k
 python3-scales                   noarch    1.0.5-10.fc27                      fedora      70 k
 python3-simplejson               x86_64    3.10.0-5.fc27                      fedora     278 k
 sigar                            x86_64    1.6.5-0.20.git58097d9.fc27         fedora      76 k
 sigar-java                       x86_64    1.6.5-0.20.git58097d9.fc27         fedora     391 k
 snappy-java                      x86_64    1.1.2.4-8.fc27                     fedora      80 k
 sonatype-oss-parent              noarch    7-13.fc27                          fedora      15 k
 stream-lib                       noarch    2.6.0-8.fc27                       fedora     161 k
 xmlunit                          noarch    1.6-6.fc27                         fedora     365 k

Transaction Summary
================================================================================================
Install  93 Packages

Total download size: 56 M
Installed size: 172 M
Downloading Packages:
(1/93): cassandra-java-driver-extras-3.1.4-2.fc27.noarch.rpm    199 kB/s |  60 kB     00:00    
(2/93): cassandra-java-driver-mapping-3.1.4-2.fc27.noarch.rpm   531 kB/s |  87 kB     00:00    
(3/93): cassandra-java-driver-parent-3.1.4-2.fc27.noarch.rpm    308 kB/s |  15 kB     00:00    
(4/93): cassandra-java-driver-tests-3.1.4-2.fc27.noarch.rpm     397 kB/s |  21 kB     00:00    
(5/93): metrics-3.1.2-5.fc27.noarch.rpm                         1.1 MB/s | 109 kB     00:00    
(6/93): cassandra-java-driver-javadoc-3.1.4-2.fc27.noarch.rpm   864 kB/s | 675 kB     00:00    
(7/93): cassandra-java-driver-3.1.4-2.fc27.noarch.rpm           1.2 MB/s | 1.0 MB     00:00    
(8/93): maven-failsafe-plugin-2.19.1-8.fc27.noarch.rpm          957 kB/s |  65 kB     00:00    
(9/93): maven-compiler-plugin-3.6.1-3.fc27.noarch.rpm           369 kB/s |  67 kB     00:00    
(10/93): sonatype-oss-parent-7-13.fc27.noarch.rpm               170 kB/s |  15 kB     00:00    
(11/93): maven-surefire-plugin-2.19.1-8.fc27.noarch.rpm         309 kB/s |  40 kB     00:00    
(12/93): maven-javadoc-plugin-2.10.4-4.fc27.noarch.rpm          1.0 MB/s | 222 kB     00:00    
(13/93): maven-shared-incremental-1.1-13.fc27.noarch.rpm        236 kB/s |  26 kB     00:00    
(14/93): plexus-compiler-2.8.1-5.fc27.noarch.rpm                760 kB/s |  69 kB     00:00    
(15/93): maven-plugin-annotations-3.5-3.fc27.noarch.rpm         287 kB/s |  26 kB     00:00    
(16/93): maven-archiver-3.1.1-3.fc27.noarch.rpm                 662 kB/s |  38 kB     00:00    
(17/93): felix-framework-5.6.0-3.fc27.noarch.rpm                1.8 MB/s | 672 kB     00:00    
(18/93): maven-common-artifact-filters-3.0.1-3.fc27.noarch.rpm  656 kB/s |  60 kB     00:00    
(19/93): maven-doxia-sink-api-1.7-5.fc27.noarch.rpm             296 kB/s |  25 kB     00:00    
(20/93): maven-surefire-2.19.1-8.fc27.noarch.rpm                2.0 MB/s | 496 kB     00:00    
(21/93): maven-reporting-api-3.0-12.fc27.noarch.rpm             363 kB/s |  23 kB     00:00    
(22/93): maven-doxia-sitetools-1.7.4-4.fc27.noarch.rpm          1.1 MB/s | 186 kB     00:00    
(23/93): plexus-archiver-3.4-3.fc27.noarch.rpm                  1.2 MB/s | 179 kB     00:00    
(24/93): plexus-interactivity-api-1.0-0.24.alpha6.fc27.noarch.r 163 kB/s |  19 kB     00:00    
(25/93): maven-doxia-logging-api-1.7-5.fc27.noarch.rpm          273 kB/s |  30 kB     00:00    
(26/93): maven-doxia-core-1.7-5.fc27.noarch.rpm                 1.8 MB/s | 166 kB     00:00    
(27/93): maven-doxia-module-apt-1.7-5.fc27.noarch.rpm           623 kB/s |  63 kB     00:00    
(28/93): maven-doxia-module-fml-1.7-5.fc27.noarch.rpm           742 kB/s |  51 kB     00:00    
(29/93): maven-doxia-module-fo-1.7-5.fc27.noarch.rpm            770 kB/s |  72 kB     00:00    
(30/93): maven-doxia-module-markdown-1.7-5.fc27.noarch.rpm      341 kB/s |  29 kB     00:00    
(31/93): maven-doxia-module-xdoc-1.7-5.fc27.noarch.rpm          469 kB/s |  50 kB     00:00    
(32/93): maven-doxia-module-xhtml-1.7-5.fc27.noarch.rpm         290 kB/s |  31 kB     00:00    
(33/93): plexus-i18n-1.0-0.10.b10.4.fc27.noarch.rpm             161 kB/s |  23 kB     00:00    
(34/93): plexus-io-2.7.1-3.fc27.noarch.rpm                      899 kB/s |  88 kB     00:00    
(35/93): dain-snappy-0.4-4.fc27.noarch.rpm                      445 kB/s |  67 kB     00:00    
(36/93): plexus-component-api-1.0-0.23.alpha15.fc27.noarch.rpm  322 kB/s |  31 kB     00:00    
(37/93): apache-commons-configuration-1.10-10.fc27.noarch.rpm   1.9 MB/s | 358 kB     00:00    
(38/93): xmlunit-1.6-6.fc27.noarch.rpm                          1.6 MB/s | 365 kB     00:00    
(39/93): pegdown-1.4.2-11.fc27.noarch.rpm                       1.2 MB/s |  85 kB     00:00    
(40/93): avalon-framework-4.3-18.fc27.noarch.rpm                770 kB/s |  89 kB     00:00    
(41/93): fontbox-1.8.13-1.fc26.noarch.rpm                       1.2 MB/s | 228 kB     00:00    
(42/93): parboiled-1.1.6-12.fc27.noarch.rpm                     1.6 MB/s | 281 kB     00:00    
(43/93): avalon-logkit-2.1-28.fc27.noarch.rpm                   1.2 MB/s |  85 kB     00:00    
(44/93): fop-2.0-7.fc27.noarch.rpm                              4.8 MB/s | 4.5 MB     00:00    
(45/93): cassandra-3.11.1-4.fc27.x86_64.rpm                     290 kB/s | 175 kB     00:00    
(46/93): airline-0.7-6.fc27.noarch.rpm                          917 kB/s |  89 kB     00:00    
(47/93): antlr3-java-3.5.2-16.fc27.noarch.rpm                   1.4 MB/s | 173 kB     00:00    
(48/93): caffeine-2.3.5-3.fc27.noarch.rpm                       5.6 MB/s | 724 kB     00:00    
(49/93): compress-lzf-1.0.3-7.fc27.noarch.rpm                   899 kB/s |  86 kB     00:00    
(50/93): concurrentlinkedhashmap-lru-1.4.2-5.fc27.noarch.rpm    734 kB/s |  59 kB     00:00    
(51/93): cassandra-java-libs-3.11.1-4.fc27.x86_64.rpm           4.2 MB/s | 5.3 MB     00:01    
(52/93): cassandra-python2-cqlshlib-3.11.1-4.fc27.x86_64.rpm    708 kB/s | 631 kB     00:00    
(53/93): ecj-4.7.1-1.fc27.noarch.rpm                            6.8 MB/s | 2.2 MB     00:00    
(54/93): jBCrypt-0.4-5.fc27.noarch.rpm                          306 kB/s |  22 kB     00:00    
(55/93): high-scale-lib-1.1.4-9.fc27.noarch.rpm                 437 kB/s | 105 kB     00:00    
(56/93): jamm-0.3.1-5.fc27.noarch.rpm                           586 kB/s |  35 kB     00:00    
(57/93): jackson-1.9.11-12.fc27.noarch.rpm                      7.9 MB/s | 1.0 MB     00:00    
(58/93): joda-time-2.9.3-4.tzdata2016c.fc27.noarch.rpm          3.6 MB/s | 522 kB     00:00    
(59/93): lz4-java-1.3.0-8.fc27.x86_64.rpm                       2.1 MB/s | 151 kB     00:00    
(60/93): metrics-jvm-3.1.2-5.fc27.noarch.rpm                    742 kB/s |  45 kB     00:00    
(61/93): logback-1.1.7-3.fc27.noarch.rpm                         10 MB/s | 3.0 MB     00:00    
(62/93): metrics-reporter-config-3.2.2-2.fc27.noarch.rpm        512 kB/s |  57 kB     00:00    
(63/93): ohc-0.6.1-1.fc27.noarch.rpm                            1.4 MB/s | 147 kB     00:00    
(64/93): snappy-java-1.1.2.4-8.fc27.x86_64.rpm                  1.2 MB/s |  80 kB     00:00    
(65/93): sigar-java-1.6.5-0.20.git58097d9.fc27.x86_64.rpm       3.1 MB/s | 391 kB     00:00    
(66/93): stream-lib-2.6.0-8.fc27.noarch.rpm                     1.8 MB/s | 161 kB     00:00    
(67/93): jsr-311-1.1.1-14.fc27.noarch.rpm                       815 kB/s |  50 kB     00:00    
(68/93): objectweb-asm3-3.3.1-15.fc27.noarch.rpm                5.3 MB/s | 397 kB     00:00    
(69/93): jna-4.4.0-7.fc27.x86_64.rpm                            306 kB/s | 237 kB     00:00    
(70/93): hibernate-validator-5.2.4-3.fc27.noarch.rpm            6.3 MB/s | 632 kB     00:00    
(71/93): findbugs-bcel-6.0-0.9.20140707svn1547656.fc27.noarch.r 7.3 MB/s | 572 kB     00:00    
(72/93): jFormatString-0-0.26.20131227gitf159b88.fc27.noarch.rp 805 kB/s |  38 kB     00:00    
(73/93): jcip-annotations-1-21.20060626.fc27.noarch.rpm         277 kB/s |  13 kB     00:00    
(74/93): findbugs-3.0.1-11.fc27.noarch.rpm                      6.7 MB/s | 4.5 MB     00:00    
(75/93): bean-validation-api-1.1.0-8.fc27.noarch.rpm            1.2 MB/s |  61 kB     00:00    
(76/93): cassandra-server-3.11.1-4.fc27.x86_64.rpm              728 kB/s | 179 kB     00:00    
(77/93): classmate-1.3.1-3.fc27.noarch.rpm                      1.4 MB/s |  72 kB     00:00    
(78/93): jboss-logging-3.3.0-3.fc27.noarch.rpm                  1.3 MB/s |  73 kB     00:00    
(79/93): sigar-1.6.5-0.20.git58097d9.fc27.x86_64.rpm            1.5 MB/s |  76 kB     00:00    
(80/93): cassandra-parent-3.11.1-4.fc27.x86_64.rpm              130 kB/s |  17 kB     00:00    
(81/93): python-cassandra-driver-doc-3.13.0-1.fc27.x86_64.rpm   245 kB/s |  64 kB     00:00    
(82/93): python2-cassandra-driver-3.13.0-1.fc27.x86_64.rpm      3.3 MB/s | 2.6 MB     00:00    
(83/93): python-blist-1.3.6-12.fc27.x86_64.rpm                  306 kB/s |  66 kB     00:00    
(84/93): cassandra-javadoc-3.11.1-4.fc27.x86_64.rpm             2.1 MB/s | 3.3 MB     00:01    
(85/93): python-scales-1.0.5-10.fc27.noarch.rpm                 183 kB/s |  68 kB     00:00    
(86/93): python2-futures-3.1.1-2.fc27.noarch.rpm                 89 kB/s |  32 kB     00:00    
(87/93): python2-simplejson-3.10.0-5.fc27.x86_64.rpm            742 kB/s | 278 kB     00:00    
(88/93): python3-blist-1.3.6-12.fc27.x86_64.rpm                 705 kB/s |  66 kB     00:00    
(89/93): python3-scales-1.0.5-10.fc27.noarch.rpm                707 kB/s |  70 kB     00:00    
(90/93): python3-simplejson-3.10.0-5.fc27.x86_64.rpm            1.4 MB/s | 278 kB     00:00    
(91/93): log4j-over-slf4j-1.7.25-4.fc27.noarch.rpm              148 kB/s |  36 kB     00:00    
(92/93): python3-cassandra-driver-3.13.0-1.fc27.x86_64.rpm      2.4 MB/s | 2.8 MB     00:01    
(93/93): fastutil-7.0.7-4.fc27.noarch.rpm                       2.2 MB/s |  14 MB     00:06    
------------------------------------------------------------------------------------------------
Total                                                           4.4 MB/s |  56 MB     00:12     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                        1/1 
  Installing       : maven-doxia-logging-api-1.7-5.fc27.noarch                             1/93 
  Installing       : maven-doxia-sink-api-1.7-5.fc27.noarch                                2/93 
  Installing       : metrics-3.1.2-5.fc27.noarch                                           3/93 
  Installing       : cassandra-java-driver-3.1.4-2.fc27.noarch                             4/93 
  Installing       : maven-plugin-annotations-3.5-3.fc27.noarch                            5/93 
  Installing       : metrics-jvm-3.1.2-5.fc27.noarch                                       6/93 
  Installing       : maven-reporting-api-1:3.0-12.fc27.noarch                              7/93 
  Installing       : joda-time-2.9.3-4.tzdata2016c.fc27.noarch                             8/93 
  Installing       : jna-4.4.0-7.fc27.x86_64                                               9/93 
  Installing       : maven-common-artifact-filters-3.0.1-3.fc27.noarch                    10/93 
  Installing       : maven-surefire-2.19.1-8.fc27.noarch                                  11/93 
  Installing       : maven-failsafe-plugin-2.19.1-8.fc27.noarch                           12/93 
  Installing       : maven-surefire-plugin-2.19.1-8.fc27.noarch                           13/93 
  Installing       : ohc-0.6.1-1.fc27.noarch                                              14/93 
  Installing       : cassandra-java-driver-extras-3.1.4-2.fc27.noarch                     15/93 
  Installing       : cassandra-java-driver-mapping-3.1.4-2.fc27.noarch                    16/93 
  Installing       : log4j-over-slf4j-1.7.25-4.fc27.noarch                                17/93 
  Installing       : python3-simplejson-3.10.0-5.fc27.x86_64                              18/93 
  Installing       : python3-scales-1.0.5-10.fc27.noarch                                  19/93 
  Installing       : python3-blist-1.3.6-12.fc27.x86_64                                   20/93 
  Installing       : python2-simplejson-3.10.0-5.fc27.x86_64                              21/93 
  Installing       : python-scales-1.0.5-10.fc27.noarch                                   22/93 
  Installing       : python2-futures-3.1.1-2.fc27.noarch                                  23/93 
  Installing       : python-blist-1.3.6-12.fc27.x86_64                                    24/93 
  Installing       : python2-cassandra-driver-3.13.0-1.fc27.x86_64                        25/93 
  Installing       : cassandra-python2-cqlshlib-3.11.1-4.fc27.x86_64                      26/93 
  Installing       : sigar-1.6.5-0.20.git58097d9.fc27.x86_64                              27/93 
  Running scriptlet: sigar-1.6.5-0.20.git58097d9.fc27.x86_64                              27/93 
  Installing       : jboss-logging-3.3.0-3.fc27.noarch                                    28/93 
  Installing       : classmate-1.3.1-3.fc27.noarch                                        29/93 
  Installing       : bean-validation-api-1.1.0-8.fc27.noarch                              30/93 
  Installing       : hibernate-validator-5.2.4-3.fc27.noarch                              31/93 
  Installing       : metrics-reporter-config-3.2.2-2.fc27.noarch                          32/93 
  Installing       : jcip-annotations-1-21.20060626.fc27.noarch                           33/93 
  Installing       : jFormatString-0-0.26.20131227gitf159b88.fc27.noarch                  34/93 
  Installing       : findbugs-bcel-6.0-0.9.20140707svn1547656.fc27.noarch                 35/93 
  Installing       : findbugs-3.0.1-11.fc27.noarch                                        36/93 
  Installing       : airline-0.7-6.fc27.noarch                                            37/93 
  Installing       : fastutil-7.0.7-4.fc27.noarch                                         38/93 
  Installing       : stream-lib-2.6.0-8.fc27.noarch                                       39/93 
  Installing       : objectweb-asm3-3.3.1-15.fc27.noarch                                  40/93 
  Installing       : jsr-311-1.1.1-14.fc27.noarch                                         41/93 
  Installing       : jackson-1.9.11-12.fc27.noarch                                        42/93 
  Installing       : snappy-java-1.1.2.4-8.fc27.x86_64                                    43/93 
  Installing       : sigar-java-1.6.5-0.20.git58097d9.fc27.x86_64                         44/93 
  Installing       : lz4-java-1.3.0-8.fc27.x86_64                                         45/93 
  Installing       : logback-1.1.7-3.fc27.noarch                       ..
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
MacLochlainns Weblog by Maclochlainn - 1w ago

I was very pleased to see MongoDB 3.4 in the repo for Fedora 27; however, I was quite frankly severely disappointed by the lack of concrete installation steps in the MongoDB in Action, Second Edition. The installation is straightforward as long as you remember that you don’t simply install a mongodb package. You need to install the mongodb and mongodb-server packages as well as some dependents.

As the root user, you can use yum to install them like this:

yum install -y mongo*

After installing the correct packages, you can start the MongoDB Daemon as a service using the root account or a sudoer account:

service mongod start

Finally, you can connect to the MongoDB client, like so:

mongo

Inside the mongo shell, you can check the MongoDB version with the following command:

db.version()

It should print:

3.4.11

Or, you can check the statistics of a new empty instance:

db.stats()


A fresh installation of MongoDB 3.4.11 on Fedora 27 should return:

{
        "db" : "test",
        "collections" : 0,
        "views" : 0,
        "objects" : 0,
        "avgObjSize" : 0,
        "dataSize" : 0,
        "storageSize" : 0,
        "numExtents" : 0,
        "indexes" : 0,
        "indexSize" : 0,
        "fileSize" : 0,
        "ok" : 1
}

As always, I hope this helps.

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
MacLochlainns Weblog by Maclochlainn - 1w ago

While updating my class image to Fedora 27, I noticed that it installed the Akonadi Server. The documentation on the Akonadi server lacked some straightforward documentation. It also offered a bundled set of software that limited how to approach MySQL development.

So, I removed all those packages with the following syntax:

dnf remove `rpm -qa | grep akonadi`

After removing those Akonadi packages, I installed the MySQL Community Edition from the Fedora repo with this syntax:

yum install -y community-mysql*

Having installed MySQL Community Edition, I started the service with this command:

sudo service mysql start

Then, I ran the mysql_secure_installation script to secure the installation:

mysql_secure_installation

The script set the root user’s password, remove the anonymous user, disallow remote root login, and remove the test databases. Then, I verified connecting to the MySQL database with the following syntax:

mysql -uroot -ppassword

I enabled the MySQL Service to start with each reboot of the Fedora instance. I used the following command:

systemctl enable mysqld.service

It creates the following link:

ln -s '/etc/systemd/system/multi-user.target.wants/mysqld.service' '/usr/lib/systemd/system/mysqld.service'

Now, I need to install and configure Apache, PHP, and upgrade Oracle Database 11g XE’s APEX 4 to 5.

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Somebody asked: How do you run a script file from PostgreSQL’s psql prompt? I created two files to answer the question. Here are the two files:

Static File

SELECT 'Hello World!';

Dynamic File

SELECT 'Hello ['||current_user||']!';

It’s a simple solution, you put a \i or \include before the script file name, like:

\i helloworld.sql

It outputs:

   ?column?   
--------------
 Hello World!

or

\include hellowhom.sql

It outputs:

     ?column?     
------------------
 Hello [student]!

I hope this helps those trying to call SQL script files from an interactive psql session.

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
MacLochlainns Weblog by Maclochlainn - 2w ago

After you have installed PostgeSQL on Fedora and initialized the database, you have several steps to configure a new instance. This blog post shows you how to create all the implementation pieces for a student database.

Connect as the postgres user from a sudoer user. It requires you to connect as the root user before you connect as the postgres user.

sudo sh

As the root user, you don’t need a password to connect as the postgres user:

su - postgres

As the postgres user, you own the PostgreSQL database and can connect to the database like the following:

[postgres@localhost ~]$ psql
psql (9.6.8)
Type "help" for help.

postgres=#

After you connect as the privileged postgres user, you can check the default data location with the following command:

postgres=# show data_directory;

It will return:

   data_directory    
---------------------
 /var/lib/pgsql/data
(1 row)

The following steps create tablespace, database, role, and user:

  1. Create Tablespace

You can create a video_db tablespace with the following syntax:

CREATE TABLESPACE video_db
  OWNER postgres
  LOCATION '/var/lib/pgsql/data';

This will return the following:

WARNING:  tablespace location should not be inside the data directory
CREATE TABLESPACE

The warning only lets you know that you really shouldn’t create table spaces in the default data directory. You can query whether you successfully create the video_db tablespace with the following:

SELECT * FROM pg_tablespace;

It should return the following:

  spcname   | spcowner | spcacl | spcoptions 
------------+----------+--------+------------
 pg_default |       10 |        | 
 pg_global  |       10 |        | 
 video_db   |       10 |        | 
(3 rows)
  1. Create a Database

You can create a videodb database with the following syntax:

CREATE DATABASE videodb
  WITH OWNER = postgres
       ENCODING = 'UTF8'
       TABLESPACE = video_db
       LC_COLLATE = 'en_US.UTF-8'
       LC_CTYPE = 'en_US.UTF-8'
       CONNECTION LIMIT = -1;

Then, you can assign comment to the database with the following syntax:

COMMENT ON DATABASE videodb IS 'Video Database';
  1. Create a Role, Grant, and User

In this section you create a dba role, grant privileges on a videodb database to a role, and create a user with the role that you created previously with the following three statements. There are three steps in this sections.

  • The first step creates a dba role:

    CREATE ROLE dba WITH SUPERUSER;
    
  • The second step grants all privileges on a videodb database to a dba role:

    GRANT ALL PRIVILEGES ON DATABASE videodb TO dba;
    
  • The third step creates a student user with the dba role:

    CREATE USER student
      WITH ROLE dba
           PASSWORD 'student';
    
  1. Connect to the videodb as the student user

You connect to the videodb database as the student user with the following command:

sql -d videodb -U student;

After connecting to the videodb database, you can query the current database, like

SELECT current_database();

It should return the following:

 current_database 
------------------
 videodb
(1 row)

This has shown you how to create a videodb database, dba role, and student user.

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

The following shows you the install of PostgreSQL 9.6 on Fedora 27. You either use the sudoer privileges as a user in the sudoer group, or by using the su command to become the root user:

sudo yum install -y postgres*

It should display the following installation:

Last metadata expiration check: 2:22:55 ago on Sat 12 May 2018 02:48:53 PM MDT.
Package postgresql-libs-9.6.8-1.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
================================================================================================
 Package                               Arch         Version                 Repository     Size
================================================================================================
Installing:
 postgresql                            x86_64       9.6.8-1.fc27            updates       1.4 M
 postgresql-contrib                    x86_64       9.6.8-1.fc27            updates       746 k
 postgresql-dbi-link                   noarch       2.0.0-16.fc27           fedora        617 k
 postgresql-docs                       x86_64       9.6.8-1.fc27            updates        11 M
 postgresql-ip4r                       x86_64       2.0.2-14.fc27           fedora         68 k
 postgresql-jdbc                       noarch       9.4.1212-4.fc27         fedora        494 k
 postgresql-jdbc-javadoc               noarch       9.4.1212-4.fc27         fedora        396 k
 postgresql-jdbc-parent-poms           noarch       9.4.1212-4.fc27         fedora         25 k
 postgresql-odbc                       x86_64       09.06.0410-1.fc27       fedora        386 k
 postgresql-odbc-tests                 x86_64       09.06.0410-1.fc27       fedora        100 k
 postgresql-pgpool-II-devel            x86_64       3.6.5-3.fc27            fedora         26 k
 postgresql-pgpool-II-extensions       x86_64       3.6.5-3.fc27            fedora         26 k
 postgresql-pgpoolAdmin                noarch       3.6.1-2.fc27            fedora        890 k
 postgresql-plperl                     x86_64       9.6.8-1.fc27            updates        97 k
 postgresql-plpython                   x86_64       9.6.8-1.fc27            updates       111 k
 postgresql-plpython3                  x86_64       9.6.8-1.fc27            updates       110 k
 postgresql-plruby                     x86_64       0.5.4-15.fc27           fedora        105 k
 postgresql-plruby-doc                 x86_64       0.5.4-15.fc27           fedora         22 k
 postgresql-pltcl                      x86_64       9.6.8-1.fc27            updates        77 k
 postgresql-static                     x86_64       9.6.8-1.fc27            updates        80 k
 postgresql-upgrade                    x86_64       9.6.8-1.fc27            updates       3.1 M
 postgresql_autodoc                    noarch       1.41-8.fc27             fedora         31 k
Installing dependencies:
 libmemcached-libs                     x86_64       1.0.18-10.fc27          fedora        134 k
 nginx-filesystem                      noarch       1:1.12.1-1.fc27         fedora         20 k
 perl-DBD-Pg                           x86_64       3.7.0-1.fc27            fedora        212 k
 perl-HTML-Template                    noarch       2.97-3.fc27             fedora         79 k
 perl-YAML                             noarch       1.23-4.fc27             fedora         91 k
 php                                   x86_64       7.1.17-1.fc27           updates       2.8 M
 php-cli                               x86_64       7.1.17-1.fc27           updates       4.2 M
 php-common                            x86_64       7.1.17-1.fc27           updates       1.0 M
 php-json                              x86_64       7.1.17-1.fc27           updates        73 k
 php-pdo                               x86_64       7.1.17-1.fc27           updates       138 k
 php-pgsql                             x86_64       7.1.17-1.fc27           updates       135 k
 postgresql-devel                      x86_64       9.6.8-1.fc27            updates       1.2 M
 postgresql-pgpool-II                  x86_64       3.6.5-3.fc27            fedora        571 k
 postgresql-server                     x86_64       9.6.8-1.fc27            updates       4.7 M
 postgresql-test                       x86_64       9.6.8-1.fc27            updates       1.5 M
 tcl-pgtcl                             x86_64       2.1.1-6.fc27            fedora         99 k
 unixODBC-devel                        x86_64       2.3.5-2.fc27            updates        62 k
 uuid                                  x86_64       1.6.2-39.fc27           fedora         61 k
Installing weak dependencies:
 php-fpm                               x86_64       7.1.17-1.fc27           updates       1.5 M

Transaction Summary
================================================================================================
Install  41 Packages

Total download size: 38 M
Installed size: 130 M
Downloading Packages:
(1/41): postgresql-ip4r-2.0.2-14.fc27.x86_64.rpm                128 kB/s |  68 kB     00:00    
(2/41): postgresql-jdbc-9.4.1212-4.fc27.noarch.rpm              650 kB/s | 494 kB     00:00    
(3/41): postgresql-dbi-link-2.0.0-16.fc27.noarch.rpm            803 kB/s | 617 kB     00:00    
(4/41): postgresql-jdbc-javadoc-9.4.1212-4.fc27.noarch.rpm      1.3 MB/s | 396 kB     00:00    
(5/41): postgresql-jdbc-parent-poms-9.4.1212-4.fc27.noarch.rpm  219 kB/s |  25 kB     00:00    
(6/41): postgresql-odbc-tests-09.06.0410-1.fc27.x86_64.rpm      679 kB/s | 100 kB     00:00    
(7/41): postgresql-pgpool-II-extensions-3.6.5-3.fc27.x86_64.rpm 206 kB/s |  26 kB     00:00    
(8/41): postgresql-plruby-0.5.4-15.fc27.x86_64.rpm              840 kB/s | 105 kB     00:00    
(9/41): postgresql-plruby-doc-0.5.4-15.fc27.x86_64.rpm          241 kB/s |  22 kB     00:00    
(10/41): postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch.rpm         3.5 MB/s | 890 kB     00:00    
(11/41): postgresql_autodoc-1.41-8.fc27.noarch.rpm              336 kB/s |  31 kB     00:00    
(12/41): perl-YAML-1.23-4.fc27.noarch.rpm                       616 kB/s |  91 kB     00:00    
(13/41): postgresql-pgpool-II-3.6.5-3.fc27.x86_64.rpm           5.4 MB/s | 571 kB     00:00    
(14/41): perl-DBD-Pg-3.7.0-1.fc27.x86_64.rpm                    1.4 MB/s | 212 kB     00:00    
(15/41): perl-HTML-Template-2.97-3.fc27.noarch.rpm              774 kB/s |  79 kB     00:00    
(16/41): libmemcached-libs-1.0.18-10.fc27.x86_64.rpm            1.5 MB/s | 134 kB     00:00    
(17/41): postgresql-contrib-9.6.8-1.fc27.x86_64.rpm             807 kB/s | 746 kB     00:00    
(18/41): postgresql-upgrade-9.6.8-1.fc27.x86_64.rpm             2.7 MB/s | 3.1 MB     00:01    
(19/41): postgresql-9.6.8-1.fc27.x86_64.rpm                     4.5 MB/s | 1.4 MB     00:00    
(20/41): postgresql-server-9.6.8-1.fc27.x86_64.rpm              3.5 MB/s | 4.7 MB     00:01    
(21/41): postgresql-test-9.6.8-1.fc27.x86_64.rpm                6.4 MB/s | 1.5 MB     00:00    
(22/41): postgresql-pltcl-9.6.8-1.fc27.x86_64.rpm               324 kB/s |  77 kB     00:00    
(23/41): postgresql-plpython3-9.6.8-1.fc27.x86_64.rpm           693 kB/s | 110 kB     00:00    
(24/41): postgresql-plpython-9.6.8-1.fc27.x86_64.rpm            519 kB/s | 111 kB     00:00    
(25/41): postgresql-plperl-9.6.8-1.fc27.x86_64.rpm              515 kB/s |  97 kB     00:00    
(26/41): uuid-1.6.2-39.fc27.x86_64.rpm                          197 kB/s |  61 kB     00:00    
(27/41): postgresql-devel-9.6.8-1.fc27.x86_64.rpm               6.0 MB/s | 1.2 MB     00:00    
(28/41): postgresql-static-9.6.8-1.fc27.x86_64.rpm              608 kB/s |  80 kB     00:00    
(29/41): tcl-pgtcl-2.1.1-6.fc27.x86_64.rpm                      450 kB/s |  99 kB     00:00    
(30/41): postgresql-pgpool-II-devel-3.6.5-3.fc27.x86_64.rpm     295 kB/s |  26 kB     00:00    
(31/41): postgresql-docs-9.6.8-1.fc27.x86_64.rpm                 18 MB/s |  11 MB     00:00    
(32/41): php-7.1.17-1.fc27.x86_64.rpm                           8.5 MB/s | 2.8 MB     00:00    
(33/41): php-cli-7.1.17-1.fc27.x86_64.rpm                        13 MB/s | 4.2 MB     00:00    
(34/41): postgresql-odbc-09.06.0410-1.fc27.x86_64.rpm           662 kB/s | 386 kB     00:00    
(35/41): php-common-7.1.17-1.fc27.x86_64.rpm                    4.6 MB/s | 1.0 MB     00:00    
(36/41): php-json-7.1.17-1.fc27.x86_64.rpm                      409 kB/s |  73 kB     00:00    
(37/41): php-pgsql-7.1.17-1.fc27.x86_64.rpm                     607 kB/s | 135 kB     00:00    
(38/41): php-pdo-7.1.17-1.fc27.x86_64.rpm                       1.0 MB/s | 138 kB     00:00    
(39/41): unixODBC-devel-2.3.5-2.fc27.x86_64.rpm                 316 kB/s |  62 kB     00:00    
(40/41): nginx-filesystem-1.12.1-1.fc27.noarch.rpm              214 kB/s |  20 kB     00:00    
(41/41): php-fpm-7.1.17-1.fc27.x86_64.rpm                       4.1 MB/s | 1.5 MB     00:00    
------------------------------------------------------------------------------------------------
Total                                                           7.1 MB/s |  38 MB     00:05     
warning: /var/cache/dnf/fedora-cba4cf65782eccda/packages/postgresql-dbi-link-2.0.0-16.fc27.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f5282ee4: NOKEY
Importing GPG key 0xF5282EE4:
 Userid     : "Fedora 27 (27) "
 Fingerprint: 860E 19B0 AFA8 00A1 7518 81A6 F55E 7430 F528 2EE4
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-27-x86_64
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                        1/1 
  Installing       : php-json-7.1.17-1.fc27.x86_64                                         1/41 
  Installing       : php-common-7.1.17-1.fc27.x86_64                                       2/41 
  Installing       : postgresql-9.6.8-1.fc27.x86_64                                        3/41 
  Running scriptlet: postgresql-server-9.6.8-1.fc27.x86_64                                 4/41 
  Installing       : postgresql-server-9.6.8-1.fc27.x86_64                                 4/41 
  Running scriptlet: postgresql-server-9.6.8-1.fc27.x86_64                                 4/41 
  Installing       : postgresql-devel-9.6.8-1.fc27.x86_64                                  5/41 
  Installing       : postgresql-test-9.6.8-1.fc27.x86_64                                   6/41 
  Installing       : postgresql-plruby-0.5.4-15.fc27.x86_64                                7/41 
  Installing       : php-cli-7.1.17-1.fc27.x86_64                                          8/41 
  Installing       : php-7.1.17-1.fc27.x86_64                                              9/41 
  Installing       : php-pdo-7.1.17-1.fc27.x86_64                                         10/41 
  Installing       : php-pgsql-7.1.17-1.fc27.x86_64                                       11/41 
  Running scriptlet: nginx-filesystem-1:1.12.1-1.fc27.noarch                              12/41 
  Installing       : nginx-filesystem-1:1.12.1-1.fc27.noarch                              12/41 
  Installing       : unixODBC-devel-2.3.5-2.fc27.x86_64                                   13/41 
  Installing       : postgresql-odbc-09.06.0410-1.fc27.x86_64                             14/41 
  Running scriptlet: postgresql-odbc-09.06.0410-1.fc27.x86_64                             14/41 
  Installing       : tcl-pgtcl-2.1.1-6.fc27.x86_64                                        15/41 
  Installing       : uuid-1.6.2-39.fc27.x86_64                                            16/41 
  Running scriptlet: uuid-1.6.2-39.fc27.x86_64                                            16/41 
  Installing       : libmemcached-libs-1.0.18-10.fc27.x86_64                              17/41 
  Running scriptlet: libmemcached-libs-1.0.18-10.fc27.x86_64                              17/41 
  Installing       : postgresql-pgpool-II-3.6.5-3.fc27.x86_64                             18/41 
  Running scriptlet: postgresql-pgpool-II-3.6.5-3.fc27.x86_64                             18/41 
  Installing       : perl-HTML-Template-2.97-3.fc27.noarch                                19/41 
  Installing       : perl-DBD-Pg-3.7.0-1.fc27.x86_64                                      20/41 
  Installing       : perl-YAML-1.23-4.fc27.noarch                                         21/41 
  Installing       : postgresql-dbi-link-2.0.0-16.fc27.noarch                             22/41 
  Installing       : postgresql_autodoc-1.41-8.fc27.noarch                                23/41 
  Installing       : postgresql-pgpool-II-extensions-3.6.5-3.fc27.x86_64                  24/41 
  Installing       : postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch                           25/41 
  Running scriptlet: postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch                           25/41 
httpd.service is not active, cannot reload.
warning: %post(postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package postgresql-pgpoolAdmin
Non-fatal POSTIN scriptlet failure in rpm package postgresql-pgpoolAdmin
  Installing       : postgresql-pgpool-II-devel-3.6.5-3.fc27.x86_64                       26/41 
  Installing       : postgresql-contrib-9.6.8-1.fc27.x86_64                               27/41 
  Installing       : postgresql-pltcl-9.6.8-1.fc27.x86_64                                 28/41 
  Installing       : postgresql-odbc-tests-09.06.0410-1.fc27.x86_64                       29/41 
  Installing       : php-fpm-7.1.17-1.fc27.x86_64                                         30/41 
  Running scriptlet: php-fpm-7.1.17-1.fc27.x86_64                                         30/41 
  Installing       : postgresql-plruby-doc-0.5.4-15.fc27.x86_64                           31/41 
  Installing       : postgresql-static-9.6.8-1.fc27.x86_64                                32/41 
  Installing       : postgresql-ip4r-2.0.2-14.fc27.x86_64                                 33/41 
  Installing       : postgresql-upgrade-9.6.8-1.fc27.x86_64                               34/41 
  Installing       : postgresql-plpython3-9.6.8-1.fc27.x86_64                             35/41 
  Installing       : postgresql-plpython-9.6.8-1.fc27.x86_64                              36/41 
  Installing       : postgresql-plperl-9.6.8-1.fc27.x86_64                                37/41 
  Installing       : postgresql-docs-9.6.8-1.fc27.x86_64                                  38/41 
  Installing       : postgresql-jdbc-parent-poms-9.4.1212-4.fc27.noarch                   39/41 
  Installing       : postgresql-jdbc-javadoc-9.4.1212-4.fc27.noarch                       40/41 
  Installing       : postgresql-jdbc-9.4.1212-4.fc27.noarch                               41/41 
  Running scriptlet: postgresql-jdbc-9.4.1212-4.fc27.noarch                               41/41 
Running as unit: run-r4842574cdaba436d90aabf16c83a6041.service
  Verifying        : postgresql-dbi-link-2.0.0-16.fc27.noarch                              1/41 
  Verifying        : postgresql-ip4r-2.0.2-14.fc27.x86_64                                  2/41 
  Verifying        : postgresql-jdbc-9.4.1212-4.fc27.noarch                                3/41 
  Verifying        : postgresql-jdbc-javadoc-9.4.1212-4.fc27.noarch                        4/41 
  Verifying        : postgresql-jdbc-parent-poms-9.4.1212-4.fc27.noarch                    5/41 
  Verifying        : postgresql-odbc-tests-09.06.0410-1.fc27.x86_64                        6/41 
  Verifying        : postgresql-pgpool-II-extensions-3.6.5-3.fc27.x86_64                   7/41 
  Verifying        : postgresql-pgpoolAdmin-3.6.1-2.fc27.noarch                            8/41 
  Verifying        : postgresql-plruby-0.5.4-15.fc27.x86_64                                9/41 
  Verifying        : postgresql-plruby-doc-0.5.4-15.fc27.x86_64                           10/41 
  Verifying        : postgresql_autodoc-1.41-8.fc27.noarch                                11/41 
  Verifying        : perl-YAML-1.23-4.fc27.noarch                                         12/41 
  Verifying        : postgresql-pgpool-II-3.6.5-3.fc27.x86_64                             13/41 
  Verifying        : perl-DBD-Pg-3.7.0-1.fc27.x86_64                                      14/41 
  Verifying        : perl-HTML-Template-2.97-3.fc27.noarch                                15/41 
  Verifying        : libmemcached-libs-1.0.18-10.fc27.x86_64                              16/41 
  Verifying        : postgresql-upgrade-9.6.8-1.fc27.x86_64                               17/41 
  Verifying        : postgresql-server-9.6.8-1.fc27.x86_64                                18/41 
  Verifying        : postgresql-contrib-9.6.8-1.fc27.x86_64                               19/41 
  Verifying        : postgresql-9.6.8-1.fc27.x86_64                                       20/41 
  Verifying        : postgresql-test-9.6.8-1.fc27.x86_64                                  21/41 
  Verifying        : postgresql-pltcl-9.6.8-1.fc27.x86_64                                 22/41 
  Verifying        : postgresql-plpython3-9.6.8-1.fc27.x86_64                             23/41 
  Verifying        : postgresql-plpython-9.6.8-1.fc27.x86_64                              24/41 
  Verifying        : postgresql-plperl-9.6.8-1.fc27.x86_64                                25/41 
  Verifying        : uuid-1.6.2-39.fc27.x86_64                                            26/41 
  Verifying        : postgresql-docs-9.6.8-1.fc27.x86_64                                  27/41 
  Verifying        : postgresql-devel-9.6.8-1.fc27.x86_64                                 28/41 
  Verifying        : tcl-pgtcl-2.1.1-6.fc27.x86_64                                        29/41 
  Verifying        : postgresql-static-9.6.8-1.fc27.x86_64                                30/41 
  Verifying        : postgresql-odbc-09.06.0410-1.fc27.x86_64                             31/41 
  Verifying        : postgresql-pgpool-II-devel-3.6.5-3.fc27.x86_64                       32/41 
  Verifying        : php-7.1.17-1.fc27.x86_64                                             33/41 
  Verifying        : php-cli-7.1.17-1.fc27.x86_64                                         34/41 
  Verifying        : php-common-7.1.17-1.fc27.x86_64                                      35/41 
  Verifying        : php-json-7.1.17-1.fc27.x86_64                                        36/41 
  Verifying        : php-pgsql-7.1.17-1.fc27.x86_64                                       37/41 
  Verifying        : php-pdo-7.1.17-1.fc27.x86_64                                         38/41 
  Verifying        : unixODBC-devel-2.3.5-2.fc27.x86_64                                   39/41 
  Verifying        : php-fpm-7.1.17-1.fc27.x86_64                                         40/41 
  Verifying        : nginx-filesystem-1:1.12.1-1.fc27.noarch                              41/41 

Installed:
  postgresql.x86_64 9.6.8-1.fc27                                                                
  postgresql-contrib.x86_64 9.6.8-1.fc27                                                        
  postgresql-dbi-link.noarch 2.0.0-16.fc27                                                      
  postgresql-docs.x86_64 9.6.8-1.fc27                                                           
  postgresql-ip4r.x86_64 2.0.2-14.fc27                                                          
  postgresql-jdbc.noarch 9.4.1212-4.fc27                                                        
  postgresql-jdbc-javadoc.noarch 9.4.1212-4.fc27                                                
  postgresql-jdbc-parent-poms.noarch 9.4.1212-4.fc27                                            
  postgresql-odbc.x86_64 09.06.0410-1.fc27                                                      
  postgresql-odbc-tests.x86_64 09.06.0410-1.fc27                                                
  postgresql-pgpool-II-devel.x86_64 3.6.5-3.fc27                                                
  postgresql-pgpool-II-extensions.x86_64 3.6.5-3.fc27                                           
  postgresql-pgpoolAdmin.noarch 3.6.1-2.fc27                                                    
  postgresql-plperl.x86_64 9.6.8-1.fc27                                                         
  postgresql-plpython.x86_64 9.6.8-1.fc27                                                       
  postgresql-plpython3.x86_64 9.6.8-1.fc27                                                      
  postgresql-plruby.x86_64 0.5.4-15.fc27                                                        
  postgresql-plruby-doc.x86_64 0.5.4-15.fc27                                                    
  postgresql-pltcl.x86_64 9.6.8-1.fc27                                                          
  postgresql-static.x86_64 9.6.8-1.fc27                                                         
  postgresql-upgrade.x86_64 9.6.8-1.fc27                                                        
  postgresql_autodoc.noarch 1.41-8.fc27                                                         
  php-fpm.x86_64 7.1.17-1.fc27                                                                  
  libmemcached-libs.x86_64 1.0.18-10.fc27                                                       
  nginx-filesystem.noarch 1:1.12.1-1.fc27                                                       
  perl-DBD-Pg.x86_64 3.7.0-1.fc27                                                               
  perl-HTML-Template.noarch 2.97-3.fc27                                                         
  perl-YAML.noarch 1.23-4.fc27                                                                  
  php.x86_64 7.1.17-1.fc27                                                                      
  php-cli.x86_64 7.1.17-1.fc27                                                                  
  php-common.x86_64 7.1.17-1.fc27                                                               
  php-json.x86_64 7.1.17-1.fc27                                                                 
  php-pdo.x86_64 7.1.17-1.fc27                                                                  
  php-pgsql.x86_64 7.1.17-1.fc27                                                                
  postgresql-devel.x86_64 9.6.8-1.fc27                                                          
  postgresql-pgpool-II.x86_64 3.6.5-3.fc27                                                      
  postgresql-server.x86_64 9.6.8-1.fc27                                                         
  postgresql-test.x86_64 9.6.8-1.fc27                                                           
  tcl-pgtcl.x86_64 2.1.1-6.fc27                                                                 
  unixODBC-devel.x86_64 2.3.5-2.fc27                                                            
  uuid.x86_64 1.6.2-39.fc27                                                                     

Complete!

While I started the PostgreSQL instance with the following:

service postgresql initdb

It gave me the following warning:

Hint: the preferred way to do this is now "/usr/bin/postgresql-setup --initdb --unit postgresql"
 * Initializing database in '/var/lib/pgsql/data'
 * Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log

So, you should use the following to initialize the PostgreSQL database:

/usr/bin/postgresql-setup --initdb --unit postgresql

As always, I hope this helps those looking for the hidden configuration script.

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
MacLochlainns Weblog by Maclochlainn - 1M ago

As one of my students pointed out, Fedora doesn’t install a GUI user management tool installed by default. That’s true. It’s easy to install. You can install it as the root user, like:

yum install -y system-config-users

It should generate a screen console output like this when successfully installed:

Loaded plugins: langpacks, refresh-packagekit
http://yum.postgresql.org/9.3/fedora/fedora-20-x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
Resolving Dependencies
--> Running transaction check
---> Package system-config-users.noarch 0:1.3.6-1.fc20 will be installed
--> Processing Dependency: libuser-python >= 0.56 for package: system-config-users-1.3.6-1.fc20.noarch
--> Processing Dependency: python-pwquality for package: system-config-users-1.3.6-1.fc20.noarch
--> Running transaction check
---> Package libuser-python.x86_64 0:0.60-3.fc20 will be installed
---> Package python-pwquality.x86_64 0:1.2.3-1.fc20 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                   Arch         Version             Repository     Size
================================================================================
Installing:
 system-config-users       noarch       1.3.6-1.fc20        updates       332 k
Installing for dependencies:
 libuser-python            x86_64       0.60-3.fc20         fedora         51 k
 python-pwquality          x86_64       1.2.3-1.fc20        fedora         11 k

Transaction Summary
================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 395 k
Installed size: 1.9 M
Downloading packages:
(1/3): libuser-python-0.60-3.fc20.x86_64.rpm                |  51 kB  00:00     
(2/3): python-pwquality-1.2.3-1.fc20.x86_64.rpm             |  11 kB  00:00     
(3/3): system-config-users-1.3.6-1.fc20.noarch.rpm          | 332 kB  00:00     
--------------------------------------------------------------------------------
Total                                              212 kB/s | 395 kB  00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
  Installing : python-pwquality-1.2.3-1.fc20.x86_64                         1/3 
  Installing : libuser-python-0.60-3.fc20.x86_64                            2/3 
  Installing : system-config-users-1.3.6-1.fc20.noarch                      3/3 
  Verifying  : system-config-users-1.3.6-1.fc20.noarch                      1/3 
  Verifying  : libuser-python-0.60-3.fc20.x86_64                            2/3 
  Verifying  : python-pwquality-1.2.3-1.fc20.x86_64                         3/3 

Installed:
  system-config-users.noarch 0:1.3.6-1.fc20                                     

Dependency Installed:
  libuser-python.x86_64 0:0.60-3.fc20   python-pwquality.x86_64 0:1.2.3-1.fc20  

Complete!

You can verify the GUI user management tool is present with the following command:

which system-config-users

It should return this:

/bin/system-config-users

You can run the GUI user management tool from the root user account or any sudoer account. The following shows how to launch the GUI User Manager from a sudoer account:

sudo system-config-users

It will generate the following GUI User Manager screen:

As always, I hope this helps those trying to do some that should be a basic task that seems to get lost form the books and manuals beginners use.

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Encountered a problem while running the RODBC library from the R prompt as the root user, as follows:

> install.packages('RODBC')

It failed with the following library dependency:

checking for unistd.h... yes
checking sql.h usability... no
checking sql.h presence... no
checking for sql.h... no
checking sqlext.h usability... no
checking sqlext.h presence... no
checking for sqlext.h... no
configure: error: "ODBC headers sql.h and sqlext.h not found"
ERROR: configuration failed for package ‘RODBC’
* removing ‘/usr/lib64/R/library/RODBC’

The downloaded source packages are in
	‘/tmp/RtmpdT1gay/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("RODBC") :
  installation of package ‘RODBC’ had non-zero exit status

I installed unixODBC-devel and unixODBC-gui-qt libraries to fix the library dependencies with the following command as the root user:

yum install -y unixODBC*

It should show you the following when it installs the unixODBC-devel and unixODBC-gui-qt libraries:

Loaded plugins: langpacks, refresh-packagekit
You need to be root to perform this command.
[student@localhost ~]$ su - root
Password: 
Last login: Fri Apr 20 21:18:56 PDT 2018 on pts/1
[root@localhost ~]# yum install -y unixODBC*
Loaded plugins: langpacks, refresh-packagekit
cassandra/signature                                         |  819 B  00:00     
cassandra/signature                                         | 2.9 kB  00:00 !!! 
fedora/20/x86_64/metalink                                   | 3.3 kB  00:00     
mysql-connectors-community                                  | 2.5 kB  00:00     
mysql-tools-community                                       | 2.5 kB  00:00     
mysql56-community                                           | 2.5 kB  00:00     
http://yum.postgresql.org/9.3/fedora/fedora-20-x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
updates/20/x86_64/metalink                                  | 3.1 kB  00:00     
Package unixODBC-2.3.2-4.fc20.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package unixODBC-devel.x86_64 0:2.3.2-4.fc20 will be installed
---> Package unixODBC-gui-qt.x86_64 0:0-0.8.20120105svn98.fc20 will be installed
--> Processing Dependency: libQtNetwork.so.4()(64bit) for package: unixODBC-gui-qt-0-0.8.20120105svn98.fc20.x86_64
--> Processing Dependency: libQtGui.so.4()(64bit) for package: unixODBC-gui-qt-0-0.8.20120105svn98.fc20.x86_64
--> Processing Dependency: libQtCore.so.4()(64bit) for package: unixODBC-gui-qt-0-0.8.20120105svn98.fc20.x86_64
--> Processing Dependency: libQtAssistantClient.so.4()(64bit) for package: unixODBC-gui-qt-0-0.8.20120105svn98.fc20.x86_64
--> Running transaction check
---> Package qt.x86_64 1:4.8.6-30.fc20 will be installed
--> Processing Dependency: qt-common = 1:4.8.6-30.fc20 for package: 1:qt-4.8.6-30.fc20.x86_64
--> Processing Dependency: qt-settings for package: 1:qt-4.8.6-30.fc20.x86_64
---> Package qt-assistant-adp.x86_64 0:4.6.3-6.fc20 will be installed
---> Package qt-x11.x86_64 1:4.8.6-30.fc20 will be installed
--> Processing Dependency: libmng.so.1()(64bit) for package: 1:qt-x11-4.8.6-30.fc20.x86_64
--> Processing Dependency: libclucene.so.3()(64bit) for package: 1:qt-x11-4.8.6-30.fc20.x86_64
--> Running transaction check
---> Package clucene09-core.x86_64 0:0.9.21b-13.fc20 will be installed
---> Package libmng.x86_64 0:1.0.10-12.fc20 will be installed
---> Package qt-common.noarch 1:4.8.6-30.fc20 will be installed
---> Package qt-settings.noarch 0:20-18.fc20 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch       Version                      Repository   Size
================================================================================
Installing:
 unixODBC-devel       x86_64     2.3.2-4.fc20                 updates      55 k
 unixODBC-gui-qt      x86_64     0-0.8.20120105svn98.fc20     fedora      624 k
Installing for dependencies:
 clucene09-core       x86_64     0.9.21b-13.fc20              updates     300 k
 libmng               x86_64     1.0.10-12.fc20               fedora      166 k
 qt                   x86_64     1:4.8.6-30.fc20              updates     4.7 M
 qt-assistant-adp     x86_64     4.6.3-6.fc20                 fedora      257 k
 qt-common            noarch     1:4.8.6-30.fc20              updates     5.8 k
 qt-settings          noarch     20-18.fc20                   updates      19 k
 qt-x11               x86_64     1:4.8.6-30.fc20              updates      12 M

Transaction Summary
================================================================================
Install  2 Packages (+7 Dependent packages)

Total download size: 18 M
Installed size: 56 M
Downloading packages:
(1/9): libmng-1.0.10-12.fc20.x86_64.rpm                     | 166 kB  00:01     
(2/9): clucene09-core-0.9.21b-13.fc20.x86_64.rpm            | 300 kB  00:01     
(3/9): qt-4.8.6-30.fc20.x86_64.rpm                          | 4.7 MB  00:00     
(4/9): qt-common-4.8.6-30.fc20.noarch.rpm                   | 5.8 kB  00:00     
(5/9): qt-settings-20-18.fc20.noarch.rpm                    |  19 kB  00:00     
(6/9): qt-assistant-adp-4.6.3-6.fc20.x86_64.rpm             | 257 kB  00:00     
(7/9): qt-x11-4.8.6-30.fc20.x86_64.rpm                      |  12 MB  00:01     
(8/9): unixODBC-devel-2.3.2-4.fc20.x86_64.rpm               |  55 kB  00:00     
(9/9): unixODBC-gui-qt-0-0.8.20120105svn98.fc20.x86_64.rpm  | 624 kB  00:01     
--------------------------------------------------------------------------------
Total                                              4.1 MB/s |  18 MB  00:04     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
  Installing : libmng-1.0.10-12.fc20.x86_64                                 1/9 
  Installing : qt-settings-20-18.fc20.noarch                                2/9 
  Installing : 1:qt-common-4.8.6-30.fc20.noarch                             3/9 
  Installing : 1:qt-4.8.6-30.fc20.x86_64                                    4/9 
  Installing : clucene09-core-0.9.21b-13.fc20.x86_64                        5/9 
  Installing : 1:qt-x11-4.8.6-30.fc20.x86_64                                6/9 
  Installing : qt-assistant-adp-4.6.3-6.fc20.x86_64                         7/9 
  Installing : unixODBC-gui-qt-0-0.8.20120105svn98.fc20.x86_64              8/9 
  Installing : unixODBC-devel-2.3.2-4.fc20.x86_64                           9/9 
  Verifying  : clucene09-core-0.9.21b-13.fc20.x86_64                        1/9 
  Verifying  : unixODBC-gui-qt-0-0.8.20120105svn98.fc20.x86_64              2/9 
  Verifying  : 1:qt-x11-4.8.6-30.fc20.x86_64                                3/9 
  Verifying  : 1:qt-4.8.6-30.fc20.x86_64                                    4/9 
  Verifying  : qt-settings-20-18.fc20.noarch                                5/9 
  Verifying  : 1:qt-common-4.8.6-30.fc20.noarch                             6/9 
  Verifying  : unixODBC-devel-2.3.2-4.fc20.x86_64                           7/9 
  Verifying  : qt-assistant-adp-4.6.3-6.fc20.x86_64                         8/9 
  Verifying  : libmng-1.0.10-12.fc20.x86_64                                 9/9 

Installed:
  unixODBC-devel.x86_64 0:2.3.2-4.fc20                                          
  unixODBC-gui-qt.x86_64 0:0-0.8.20120105svn98.fc20                             

Dependency Installed:
  clucene09-core.x86_64 0:0.9.21b-13.fc20                                       
  libmng.x86_64 0:1.0.10-12.fc20                                                
  qt.x86_64 1:4.8.6-30.fc20                                                     
  qt-assistant-adp.x86_64 0:4.6.3-6.fc20                                        
  qt-common.noarch 1:4.8.6-30.fc20                                              
  qt-settings.noarch 0:20-18.fc20                                               
  qt-x11.x86_64 1:4.8.6-30.fc20                                                 

Complete!

After installing the unixODBC-devel and unixODBC-gui-qt libraries, I installed the RODBC library from the R prompt, having launched the R environment as the root user:

> install.packages('RODBC')

Installing the RODBC library should install cleanly and generate the following output:

Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.cnr.berkeley.edu/src/contrib/RODBC_1.3-15.tar.gz'
Content type 'application/x-gzip' length 1163967 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

* installing *source* package ‘RODBC’ ...
** package ‘RODBC’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -m64 -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -m64 -std=gnu99 accepts -g... yes
checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -m64 -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sql.h usability... yes
checking sql.h presence... yes
checking for sql.h... yes
checking sqlext.h usability... yes
checking sqlext.h presence... yes
checking for sqlext.h... yes
checking for library containing SQLTables... -lodbc
checking for SQLLEN... yes
checking for SQLULEN... yes
checking size of long... 8
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/config.h
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I. -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic  -c RODBC.c -o RODBC.o
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o RODBC.so RODBC.o -lodbc -L/usr/lib64/R/lib -lR
installing to /usr/lib64/R/library/RODBC/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package ‘RODBC’
    finding HTML links ... done
    RODBC-internal                          html  
    RODBC-package                           html  
    odbc                                    html  
    odbcClose                               html  
    odbcConnect                             html  
    odbcDataSources                         html  
    odbcGetInfo                             html  
    odbcSetAutoCommit                       html  
    setSqlTypeInfo                          html  
    sqlColumns                              html  
    sqlCopy                                 html  
    sqlDrop                                 html  
    sqlFetch                                html  
    sqlQuery                                html  
    sqlSave                                 html  
    sqlTables                               html  
    sqlTypeInfo                             html  
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (RODBC)
Making 'packages.html' ... done

The downloaded source packages are in
	‘/tmp/RtmpdT1gay/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

I hope that helps anybody who runs into the library dependency problems.

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
MacLochlainns Weblog by Maclochlainn - 1M ago

I’ve started building the new image for the database courses. This one needs to include Oracle, MySQL, Cassandra, Hive, and MongoDB databases; and include examples for C, C++, Java, Perl, PHP, Python, R programming languages.

Installing R was a surprise when I saw how many packages there are for it. It’s a standard yum command from the repository, but it will install 256 packages. The command is:

yum install -y R

Once you install it, you simply start the R interpreter, which is part of the Comprehensive R Archive Network (CRAN). Any installation of the R packages includes CRAN, but there are many additional libraries that you may install.

You can launch the R interpreter by typing the following at the Linux command-line:

R

It will display the following licensing information and then the command prompt:

R version 3.2.0 (2015-04-16) -- "Full of Ingredients"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

You have two options for help. As qualified above, you can type help() to get a Linux man page, and q at the colon quits the man page. Typing help.start() launches a browser interface (shown below), which is more helpful.

You can discover your installed R packages with a call to the installed.packages() function but the output lacks clarity and is verbose. You can see a formatted summary of your installed packages with the following command:

print(as.data.frame(installed.packages()[,c(1,3:4)]),row.names=FALSE)

It should display the following:

    Package Version    Priority
       base   3.2.0        base
       boot  1.3-16 recommended
      class  7.3-12 recommended
    cluster   2.0.1 recommended
  codetools  0.2-11 recommended
   compiler   3.2.0        base
   datasets   3.2.0        base
    foreign  0.8-63 recommended
   graphics   3.2.0        base
  grDevices   3.2.0        base
       grid   3.2.0        base
 KernSmooth 2.23-14 recommended
    lattice 0.20-31 recommended
       MASS  7.3-40 recommended
     Matrix   1.2-0 recommended
    methods   3.2.0        base
       mgcv   1.8-6 recommended
       nlme 3.1-120 recommended
       nnet   7.3-9 recommended
   parallel   3.2.0        base
      rpart   4.1-9 recommended
    spatial   7.3-9 recommended
    splines   3.2.0        base
      stats   3.2.0        base
     stats4   3.2.0        base
   survival  2.38-1 recommended
      tcltk   3.2.0        base
      tools   3.2.0        base
      utils   3.2.0        base

The print() function allows us to remove the text-based indexes from display. The indexes would be the same as the package names. If you call frame() function with a second argument of row.names=FALSE, then R converts the text-based indexes to numeric indexes.

You can quit the R environment with the q() or quit() function calls. It will prompt you whether or not you want to save your workspace before you exit.

It’s time to play with R now. I hope this helps you get started by installing and playing with the R programming language.

Read Full Article
Visit website

Read for later

Articles marked as Favorite are saved for later viewing.
close
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview