Archive for the ‘LAMP’ Category
Setup PostgreSQL
After you have installed PostgeSQL on Fedora 27 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) |
After you’ve initialized the PostgreSQL database, you may need to restart your database manually unless you configure the server to start it when you boot your server. The syntax to start the PostgreSQL database at the command-line as the postgres
privileged user is:
postgres -D /var/lib/pgsql/data & |
You can find detailed instructions in Chapter 18.3 Starting the Database Server web page. There are several options available to you to automate the starting process.
The instructions to build a postgresql.service
actually require modification for Fedora 27. You should create the following file in the /etc/systemd/system
directory:
[Unit] Description=PostgreSQL database server Documentation=man:postgres(1) [Service] Type=notify User=postgres ExecStart=/usr/bin/postgres -D /var/lib/pgsql/data ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed KillSignal=SIGINT TimeoutSec=0 [Install] WantedBy=multi-user.target |
You can start the PostgreSQL service with the following command:
systemctl start postgresql.service >/dev/null |
The following steps create tablespace, database, role, and user:
- 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) |
- 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'; |
- 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 adba
role:GRANT ALL PRIVILEGES ON DATABASE videodb TO dba;
- The third step creates a
student
user with thedba
role:CREATE USER student WITH ROLE dba PASSWORD 'student';
- Connect to the
videodb
as thestudent
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.
Fedora User Manager
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.
Fedora Install unixODBC
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.
How to install MongoDB
This post shows the yum
command to install the MongoDB packages on Linux. More on setup and use will follow.
You install the MongoDB package with the following yum
command:
yum install -y mongodb |
You should see the following log file, which may also show a missing mirrored site:
Loaded plugins: langpacks, refresh-packagekit cassandra/signature | 819 B 00:00 cassandra/signature | 2.9 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 updates/20/x86_64/metalink | 2.6 kB 00:00 Resolving Dependencies --> Running transaction check ---> Package mongodb.x86_64 0:2.4.6-1.fc20 will be installed --> Processing Dependency: v8 for package: mongodb-2.4.6-1.fc20.x86_64 --> Processing Dependency: libv8.so.3()(64bit) for package: mongodb-2.4.6-1.fc20.x86_64 --> Processing Dependency: libtcmalloc.so.4()(64bit) for package: mongodb-2.4.6-1.fc20.x86_64 --> Processing Dependency: libboost_program_options.so.1.54.0()(64bit) for package: mongodb-2.4.6-1.fc20.x86_64 --> Processing Dependency: libboost_iostreams.so.1.54.0()(64bit) for package: mongodb-2.4.6-1.fc20.x86_64 --> Processing Dependency: libboost_filesystem.so.1.54.0()(64bit) for package: mongodb-2.4.6-1.fc20.x86_64 --> Running transaction check ---> Package boost-filesystem.x86_64 0:1.54.0-12.fc20 will be installed ---> Package boost-iostreams.x86_64 0:1.54.0-12.fc20 will be installed ---> Package boost-program-options.x86_64 0:1.54.0-12.fc20 will be installed ---> Package gperftools-libs.x86_64 0:2.1-4.fc20 will be installed ---> Package v8.x86_64 1:3.14.5.10-18.fc20 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: mongodb x86_64 2.4.6-1.fc20 fedora 30 M Installing for dependencies: boost-filesystem x86_64 1.54.0-12.fc20 updates 66 k boost-iostreams x86_64 1.54.0-12.fc20 updates 59 k boost-program-options x86_64 1.54.0-12.fc20 updates 147 k gperftools-libs x86_64 2.1-4.fc20 updates 266 k v8 x86_64 1:3.14.5.10-18.fc20 updates 3.0 M Transaction Summary ================================================================================ Install 1 Package (+5 Dependent packages) Total download size: 34 M Installed size: 101 M Downloading packages: (1/6): boost-iostreams-1.54.0-12.fc20.x86_64.rpm | 59 kB 00:00 (2/6): boost-filesystem-1.54.0-12.fc20.x86_64.rpm | 66 kB 00:00 (3/6): boost-program-options-1.54.0-12.fc20.x86_64.rpm | 147 kB 00:00 (4/6): gperftools-libs-2.1-4.fc20.x86_64.rpm | 266 kB 00:00 (5/6): v8-3.14.5.10-18.fc20.x86_64.rpm | 3.0 MB 00:00 (6/6): mongodb-2.4.6-1.fc20.x86_64.rpm | 30 MB 00:04 -------------------------------------------------------------------------------- Total 7.6 MB/s | 34 MB 00:04 Running transaction check Running transaction test Transaction test succeeded Running transaction (shutdown inhibited) Installing : 1:v8-3.14.5.10-18.fc20.x86_64 1/6 Installing : boost-program-options-1.54.0-12.fc20.x86_64 2/6 Installing : gperftools-libs-2.1-4.fc20.x86_64 3/6 Installing : boost-filesystem-1.54.0-12.fc20.x86_64 4/6 Installing : boost-iostreams-1.54.0-12.fc20.x86_64 5/6 Installing : mongodb-2.4.6-1.fc20.x86_64 6/6 Verifying : boost-iostreams-1.54.0-12.fc20.x86_64 1/6 Verifying : boost-filesystem-1.54.0-12.fc20.x86_64 2/6 Verifying : gperftools-libs-2.1-4.fc20.x86_64 3/6 Verifying : mongodb-2.4.6-1.fc20.x86_64 4/6 Verifying : boost-program-options-1.54.0-12.fc20.x86_64 5/6 Verifying : 1:v8-3.14.5.10-18.fc20.x86_64 6/6 Installed: mongodb.x86_64 0:2.4.6-1.fc20 Dependency Installed: boost-filesystem.x86_64 0:1.54.0-12.fc20 boost-iostreams.x86_64 0:1.54.0-12.fc20 boost-program-options.x86_64 0:1.54.0-12.fc20 gperftools-libs.x86_64 0:2.1-4.fc20 v8.x86_64 1:3.14.5.10-18.fc20 Complete! |
Hope this helps those looking for the command.
Python variable not defined
While working with a programming example for my students, I ran into an interesting run-time error when I changed their approach to importing Python’s random
module. Here’s the raised error message:
Traceback (most recent call last): File "windowBouncingBalls.py", line 84, in <module> speed = [choice([-2,2]), choice([-2,2])] NameError: name 'choice' is not defined |
You raise the missing choice
identifier when two things occur. The first thing requires you to use a standard import
statement, like the following example, and the second thing requires you to continue to reference the identifier as “choice
“.
import random |
You can avoid the error by making the import of random like this:
from random import * |
Or, you can leave the ordinary import statement and fully qualify the choice
identifier with the random
module name, like this:
speed = [random.choice([-2,2]), random.choice([-2,2])] |
As always, I hope this helps those who encounter a similar problem.
Install PyGame on Fedora
The PyGame library is a wonderful tool for building games with Python. It lets you accomplish a great deal by simply managing events. You need to understand how to use Python functions, modules, and events to build games with this Python library.
You can download and install the PyGame library with the yum utility like this:
yum install -y pygame |
It should generate the following list when you install it as the root
user:
Loaded plugins: langpacks, refresh-packagekit Available Packages pygame.x86_64 1.9.1-14.fc20 fedora [root@localhost ~]# yum install -y pygame Loaded plugins: langpacks, refresh-packagekit Resolving Dependencies --> Running transaction check ---> Package pygame.x86_64 0:1.9.1-14.fc20 will be installed --> Processing Dependency: numpy for package: pygame-1.9.1-14.fc20.x86_64 --> Processing Dependency: libportmidi.so.0()(64bit) for package: pygame-1.9.1-14.fc20.x86_64 --> Processing Dependency: libSDL_ttf-2.0.so.0()(64bit) for package: pygame-1.9.1-14.fc20.x86_64 --> Processing Dependency: libSDL_mixer-1.2.so.0()(64bit) for package: pygame-1.9.1-14.fc20.x86_64 --> Processing Dependency: libSDL_image-1.2.so.0()(64bit) for package: pygame-1.9.1-14.fc20.x86_64 --> Running transaction check ---> Package SDL_image.x86_64 0:1.2.12-7.fc20 will be installed ---> Package SDL_mixer.x86_64 0:1.2.12-5.fc20 will be installed --> Processing Dependency: libmikmod for package: SDL_mixer-1.2.12-5.fc20.x86_64 ---> Package SDL_ttf.x86_64 0:2.0.11-4.fc20 will be installed ---> Package numpy.x86_64 1:1.8.2-2.fc20 will be installed --> Processing Dependency: python-nose for package: 1:numpy-1.8.2-2.fc20.x86_64 ---> Package portmidi.x86_64 0:217-9.fc20 will be installed --> Running transaction check ---> Package libmikmod.x86_64 0:3.3.6-3.fc20 will be installed ---> Package python-nose.noarch 0:1.3.0-1.fc20 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: pygame x86_64 1.9.1-14.fc20 fedora 2.1 M Installing for dependencies: SDL_image x86_64 1.2.12-7.fc20 fedora 41 k SDL_mixer x86_64 1.2.12-5.fc20 fedora 91 k SDL_ttf x86_64 2.0.11-4.fc20 fedora 22 k libmikmod x86_64 3.3.6-3.fc20 updates 142 k numpy x86_64 1:1.8.2-2.fc20 updates 3.0 M portmidi x86_64 217-9.fc20 fedora 26 k python-nose noarch 1.3.0-1.fc20 fedora 272 k Transaction Summary ================================================================================ Install 1 Package (+7 Dependent packages) Total download size: 5.7 M Installed size: 21 M Downloading packages: (1/8): SDL_image-1.2.12-7.fc20.x86_64.rpm | 41 kB 00:00 (2/8): SDL_mixer-1.2.12-5.fc20.x86_64.rpm | 91 kB 00:00 (3/8): portmidi-217-9.fc20.x86_64.rpm | 26 kB 00:00 (4/8): SDL_ttf-2.0.11-4.fc20.x86_64.rpm | 22 kB 00:00 (5/8): libmikmod-3.3.6-3.fc20.x86_64.rpm | 142 kB 00:00 (6/8): numpy-1.8.2-2.fc20.x86_64.rpm | 3.0 MB 00:02 (7/8): pygame-1.9.1-14.fc20.x86_64.rpm | 2.1 MB 00:01 (8/8): python-nose-1.3.0-1.fc20.noarch.rpm | 272 kB 00:00 -------------------------------------------------------------------------------- Total 1.7 MB/s | 5.7 MB 00:03 Running transaction check Running transaction test Transaction test succeeded Running transaction (shutdown inhibited) Installing : SDL_ttf-2.0.11-4.fc20.x86_64 1/8 Installing : SDL_image-1.2.12-7.fc20.x86_64 2/8 Installing : portmidi-217-9.fc20.x86_64 3/8 Installing : libmikmod-3.3.6-3.fc20.x86_64 4/8 Installing : SDL_mixer-1.2.12-5.fc20.x86_64 5/8 Installing : python-nose-1.3.0-1.fc20.noarch 6/8 Installing : 1:numpy-1.8.2-2.fc20.x86_64 7/8 Installing : pygame-1.9.1-14.fc20.x86_64 8/8 Verifying : pygame-1.9.1-14.fc20.x86_64 1/8 Verifying : SDL_mixer-1.2.12-5.fc20.x86_64 2/8 Verifying : python-nose-1.3.0-1.fc20.noarch 3/8 Verifying : libmikmod-3.3.6-3.fc20.x86_64 4/8 Verifying : 1:numpy-1.8.2-2.fc20.x86_64 5/8 Verifying : portmidi-217-9.fc20.x86_64 6/8 Verifying : SDL_image-1.2.12-7.fc20.x86_64 7/8 Verifying : SDL_ttf-2.0.11-4.fc20.x86_64 8/8 Installed: pygame.x86_64 0:1.9.1-14.fc20 Dependency Installed: SDL_image.x86_64 0:1.2.12-7.fc20 SDL_mixer.x86_64 0:1.2.12-5.fc20 SDL_ttf.x86_64 0:2.0.11-4.fc20 libmikmod.x86_64 0:3.3.6-3.fc20 numpy.x86_64 1:1.8.2-2.fc20 portmidi.x86_64 0:217-9.fc20 python-nose.noarch 0:1.3.0-1.fc20 Complete! |
I hope this helps folks install the software.
Basic Python Object
One of my students wanted a quick example of a Python object with getters and setters. So, I wrote a little example that I’ll share.
You define this file in a physical directory that is in your $PYTHONPATH, like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Define Coordinate class. class Coordinate: # The method that initializes the Coordinate class. def __init__ (self, x, y): self.x = x self.y = y # Gets the x value from the instance. def getX (self): return self.x # Gets the y value from the instance. def getY (self): return self.y # Sets the x value in the instance. def setX (self, x): self.x = x # Sets the y value in the instance. def setY (self, y): self.y = y # Prints the coordinate pair. def printCoordinate(self): print (self.x, self.y) |
Assuming the file name is Coordinate.py, you can put it into the Python Idle environment with the following command:
from Coordinate import Coordinate |
You initialize the class, like this:
g = Coordinate(49,49) |
Then, you can access the variables of the class or it’s methods as shown below:
# Print the retrieved value of x from the g instance of the Coordinate class. print g.getX() # Print the formatted and retrieved value of x from the g instance of the Coordinate class. print "[" + str(g.getX()) + "]" # Set the value of x inside the g instance of the Coordinate class. print g.setX(39) # Print the Coordinates as a set. g.printCoordinate() |
You would see the following results:
49 [49] (39,49) |
As always, I hope that helps those looking for a solution.
Can’t Display 256 Colors
If you’re reading this post, you most likely are trying to run the Oracle Database 11g or 12c runInstaller
program, and it’s failing a critical dependency check and displaying an error like the one below. If so, choose n
because if you choose y
it won’t launch the Oracle Installer.
Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 30824 MB Passed Checking swap space: must be greater than 150 MB. Actual 3967 MB Passed Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<< Some requirement checks failed. You must fulfill these requirements before continuing with the installation, Continue? (y/n) [n] n |
The first thing to check is whether you’ve the $TERM
environment variable. It’ll be set in your env
list but may not be set in your .bashrc
file. You can see whether it’s set by running the following command:
echo $TERM |
It should return a value, like this:
xterm-256color |
If you didn’t get that value, use the env
command to lookup the $TERM
. The correct value can be found by running the env command like this:
env | grep -i term |
Add $TERM
environment variable to your .bashrc
file and source it after the change or reboot the user’s session:
export TERM=xterm-256color |
If it still doesn’t work, some posts ask you to run xclock
but you don’t generally install the xhost
clients. Those articles assumes you’ve installed the xorg-x11-apps
package library. That’s more or less a choice you made when installing the Linux OS. You can check for the presence of the library with the following command as the root
user:
rpm -qa xorg-x11-apps |
If the command fails to return a result from the search of Red Hat Package Manager (RPM) libraries, you haven’t installed it. You can install it as the root superuser with this syntax:
yum install -y xorg-x11-apps |
It should display the following result when successful:
Loaded plugins: langpacks Resolving Dependencies --> Running transaction check ---> Package xorg-x11-apps.x86_64 0:7.7-6.el7 will be installed --> Processing Dependency: libXaw.so.7()(64bit) for package: xorg-x11-apps-7.7-6.el7.x86_64 --> Running transaction check ---> Package libXaw.x86_64 0:1.0.12-5.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================= Package Arch Version Repository Size ================================================================================= Installing: xorg-x11-apps x86_64 7.7-6.el7 ol7_latest 304 k Installing for dependencies: libXaw x86_64 1.0.12-5.el7 ol7_latest 190 k Transaction Summary ================================================================================= Install 1 Package (+1 Dependent package) Total download size: 494 k Installed size: 1.2 M Downloading packages: (1/2): libXaw-1.0.12-5.el7.x86_64.rpm | 190 kB 00:00:00 (2/2): xorg-x11-apps-7.7-6.el7.x86_64.rpm | 304 kB 00:00:00 --------------------------------------------------------------------------------- Total 690 kB/s | 494 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libXaw-1.0.12-5.el7.x86_64 1/2 Installing : xorg-x11-apps-7.7-6.el7.x86_64 2/2 Verifying : libXaw-1.0.12-5.el7.x86_64 1/2 Verifying : xorg-x11-apps-7.7-6.el7.x86_64 2/2 Installed: xorg-x11-apps.x86_64 0:7.7-6.el7 Dependency Installed: libXaw.x86_64 0:1.0.12-5.el7 Complete! |
After installing the xorg-x11-apps
library packages, you can retry running the Oracle installer. You should now see the following successful message set:
Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 30809 MB Passed Checking swap space: must be greater than 150 MB. Actual 3967 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-06-01_01-50-54AM. Please wait ... |
As always, I hope this helps my students and anybody looking for a solution to a less than explicit error message.
Oracle 12c Pre-requisites
Installing any Oracle database is tedious, but the installing the prerequisites can be especially tedious. This post tries to simplify the process by creating a single prereq.sh
file for all the prerequisite libraries, except for the oracle-rdbms-server-12cR1-preinstall
, which you should run after the prerequisite file.
The prerequisite file should contain the following:
yum install -y binutils \ compat-libstdc++-33 \ compat-libstdc++-33.i686 \ gcc \ gcc-c++ \ glibc \ glibc.i686 \ glibc-devel \ glibc-devel.i686 \ ksh \ libgcc \ libgcc.i686 \ libstdc++ \ libstdc++.i686 \ libstdc++-devel \ libstdc++-devel.i686 \ libaio \ libaio.i686 \ libaio-devel \ libaio-devel.i686 \ libXext \ libXext.i686 \ libXtst \ libXtst.i686 \ libX11 \ libX11.i686 \ libXau \ libXau.i686 \ libxcb \ libxcb.i686 \ libXi \ libXi.i686 \ make \ sysstat \ unixODBC \ unixODBC-devel \ zlib-devel \ zlib-devel.i686 |
You can run the prereq.sh
script as the root
user like you would source an environment file:
. ./prereq.sh |
Dependent upon what you installed when creating the Oracle Linux 7.1 operating system, you should see something like this in the output console:
sh-4.2# . ./prereq.sh Loaded plugins: langpacks Package compat-libstdc++-33-3.2.3-72.el7.x86_64 already installed and latest version Package libXtst-1.2.2-2.1.el7.x86_64 already installed and latest version Package libXau-1.0.8-2.1.el7.x86_64 already installed and latest version Package 1:make-3.82-21.el7.x86_64 already installed and latest version Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package binutils.x86_64 0:2.23.52.0.1-30.el7_1.2 will be updated ---> Package binutils.x86_64 0:2.23.52.0.1-55.el7 will be an update ---> Package compat-libstdc++-33.i686 0:3.2.3-72.el7 will be installed ---> Package gcc.x86_64 0:4.8.3-9.el7 will be updated --> Processing Dependency: gcc = 4.8.3-9.el7 for package: gcc-gfortran-4.8.3-9.el7.x86_64 --> Processing Dependency: gcc = 4.8.3-9.el7 for package: libquadmath-devel-4.8.3-9.el7.x86_64 ---> Package gcc.x86_64 0:4.8.5-4.el7 will be an update --> Processing Dependency: cpp = 4.8.5-4.el7 for package: gcc-4.8.5-4.el7.x86_64 --> Processing Dependency: libgomp = 4.8.5-4.el7 for package: gcc-4.8.5-4.el7.x86_64 ---> Package gcc-c++.x86_64 0:4.8.3-9.el7 will be updated ---> Package gcc-c++.x86_64 0:4.8.5-4.el7 will be an update ---> Package glibc.x86_64 0:2.17-78.0.1.el7 will be updated --> Processing Dependency: glibc = 2.17-78.0.1.el7 for package: glibc-headers-2.17-78.0.1.el7.x86_64 --> Processing Dependency: glibc = 2.17-78.0.1.el7 for package: glibc-common-2.17-78.0.1.el7.x86_64 ---> Package glibc.i686 0:2.17-106.0.1.el7_2.6 will be installed --> Processing Dependency: libfreebl3.so for package: glibc-2.17-106.0.1.el7_2.6.i686 --> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-106.0.1.el7_2.6.i686 ---> Package glibc.x86_64 0:2.17-106.0.1.el7_2.6 will be an update ---> Package glibc-devel.x86_64 0:2.17-78.0.1.el7 will be updated ---> Package glibc-devel.i686 0:2.17-106.0.1.el7_2.6 will be installed ---> Package glibc-devel.x86_64 0:2.17-106.0.1.el7_2.6 will be an update ---> Package ksh.x86_64 0:20120801-22.el7_1.3 will be installed ---> Package libX11.x86_64 0:1.6.0-2.1.el7 will be updated ---> Package libX11.i686 0:1.6.3-2.el7 will be installed --> Processing Dependency: libX11-common >= 1.6.3-2.el7 for package: libX11-1.6.3-2.el7.i686 ---> Package libX11.x86_64 0:1.6.3-2.el7 will be an update ---> Package libXau.i686 0:1.0.8-2.1.el7 will be installed ---> Package libXext.x86_64 0:1.3.2-2.1.el7 will be updated ---> Package libXext.i686 0:1.3.3-3.el7 will be installed ---> Package libXext.x86_64 0:1.3.3-3.el7 will be an update ---> Package libXi.x86_64 0:1.7.2-2.1.el7 will be updated ---> Package libXi.i686 0:1.7.4-2.el7 will be installed ---> Package libXi.x86_64 0:1.7.4-2.el7 will be an update ---> Package libXtst.i686 0:1.2.2-2.1.el7 will be installed ---> Package libaio.x86_64 0:0.3.109-12.el7 will be updated ---> Package libaio.i686 0:0.3.109-13.el7 will be installed ---> Package libaio.x86_64 0:0.3.109-13.el7 will be an update ---> Package libaio-devel.i686 0:0.3.109-13.el7 will be installed ---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed ---> Package libgcc.x86_64 0:4.8.3-9.el7 will be updated ---> Package libgcc.i686 0:4.8.5-4.el7 will be installed ---> Package libgcc.x86_64 0:4.8.5-4.el7 will be an update ---> Package libstdc++.x86_64 0:4.8.3-9.el7 will be updated ---> Package libstdc++.i686 0:4.8.5-4.el7 will be installed ---> Package libstdc++.x86_64 0:4.8.5-4.el7 will be an update ---> Package libstdc++-devel.x86_64 0:4.8.3-9.el7 will be updated ---> Package libstdc++-devel.i686 0:4.8.5-4.el7 will be installed ---> Package libstdc++-devel.x86_64 0:4.8.5-4.el7 will be an update ---> Package libxcb.x86_64 0:1.9-5.el7 will be updated ---> Package libxcb.i686 0:1.11-4.el7 will be installed ---> Package libxcb.x86_64 0:1.11-4.el7 will be an update ---> Package unixODBC.x86_64 0:2.3.1-11.el7 will be installed ---> Package unixODBC-devel.x86_64 0:2.3.1-11.el7 will be installed ---> Package zlib-devel.i686 0:1.2.7-15.el7 will be installed --> Processing Dependency: zlib = 1.2.7-15.el7 for package: zlib-devel-1.2.7-15.el7.i686 --> Processing Dependency: libz.so.1 for package: zlib-devel-1.2.7-15.el7.i686 ---> Package zlib-devel.x86_64 0:1.2.7-15.el7 will be installed --> Running transaction check ---> Package cpp.x86_64 0:4.8.3-9.el7 will be updated ---> Package cpp.x86_64 0:4.8.5-4.el7 will be an update ---> Package gcc-gfortran.x86_64 0:4.8.3-9.el7 will be updated ---> Package gcc-gfortran.x86_64 0:4.8.5-4.el7 will be an update --> Processing Dependency: libgfortran = 4.8.5-4.el7 for package: gcc-gfortran-4.8.5-4.el7.x86_64 --> Processing Dependency: libquadmath = 4.8.5-4.el7 for package: gcc-gfortran-4.8.5-4.el7.x86_64 ---> Package glibc-common.x86_64 0:2.17-78.0.1.el7 will be updated ---> Package glibc-common.x86_64 0:2.17-106.0.1.el7_2.6 will be an update ---> Package glibc-headers.x86_64 0:2.17-78.0.1.el7 will be updated ---> Package glibc-headers.x86_64 0:2.17-106.0.1.el7_2.6 will be an update ---> Package libX11-common.noarch 0:1.6.0-2.1.el7 will be updated ---> Package libX11-common.noarch 0:1.6.3-2.el7 will be an update ---> Package libgomp.x86_64 0:4.8.3-9.el7 will be updated ---> Package libgomp.x86_64 0:4.8.5-4.el7 will be an update ---> Package libquadmath-devel.x86_64 0:4.8.3-9.el7 will be updated ---> Package libquadmath-devel.x86_64 0:4.8.5-4.el7 will be an update ---> Package nss-softokn-freebl.x86_64 0:3.16.2.3-12.el7_1 will be updated ---> Package nss-softokn-freebl.i686 0:3.16.2.3-14.2.el7_2 will be installed ---> Package nss-softokn-freebl.x86_64 0:3.16.2.3-14.2.el7_2 will be an update ---> Package zlib.x86_64 0:1.2.7-13.el7 will be updated ---> Package zlib.i686 0:1.2.7-15.el7 will be installed ---> Package zlib.x86_64 0:1.2.7-15.el7 will be an update --> Running transaction check ---> Package libgfortran.x86_64 0:4.8.3-9.el7 will be updated ---> Package libgfortran.x86_64 0:4.8.5-4.el7 will be an update ---> Package libquadmath.x86_64 0:4.8.3-9.el7 will be updated ---> Package libquadmath.x86_64 0:4.8.5-4.el7 will be an update --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: compat-libstdc++-33 i686 3.2.3-72.el7 ol7_latest 196 k glibc i686 2.17-106.0.1.el7_2.6 ol7_latest 4.2 M glibc-devel i686 2.17-106.0.1.el7_2.6 ol7_latest 1.0 M ksh x86_64 20120801-22.el7_1.3 ol7_latest 880 k libX11 i686 1.6.3-2.el7 ol7_latest 609 k libXau i686 1.0.8-2.1.el7 ol7_latest 28 k libXext i686 1.3.3-3.el7 ol7_latest 38 k libXi i686 1.7.4-2.el7 ol7_latest 39 k libXtst i686 1.2.2-2.1.el7 ol7_latest 19 k libaio i686 0.3.109-13.el7 ol7_latest 24 k libaio-devel i686 0.3.109-13.el7 ol7_latest 12 k libaio-devel x86_64 0.3.109-13.el7 ol7_latest 12 k libgcc i686 4.8.5-4.el7 ol7_latest 102 k libstdc++ i686 4.8.5-4.el7 ol7_latest 310 k libstdc++-devel i686 4.8.5-4.el7 ol7_latest 1.5 M libxcb i686 1.11-4.el7 ol7_latest 201 k unixODBC x86_64 2.3.1-11.el7 ol7_latest 412 k unixODBC-devel x86_64 2.3.1-11.el7 ol7_latest 54 k zlib-devel i686 1.2.7-15.el7 ol7_latest 49 k zlib-devel x86_64 1.2.7-15.el7 ol7_latest 49 k Updating: binutils x86_64 2.23.52.0.1-55.el7 ol7_latest 5.0 M gcc x86_64 4.8.5-4.el7 ol7_latest 16 M gcc-c++ x86_64 4.8.5-4.el7 ol7_latest 7.2 M glibc x86_64 2.17-106.0.1.el7_2.6 ol7_latest 3.6 M glibc-devel x86_64 2.17-106.0.1.el7_2.6 ol7_latest 1.0 M libX11 x86_64 1.6.3-2.el7 ol7_latest 605 k libXext x86_64 1.3.3-3.el7 ol7_latest 38 k libXi x86_64 1.7.4-2.el7 ol7_latest 39 k libaio x86_64 0.3.109-13.el7 ol7_latest 24 k libgcc x86_64 4.8.5-4.el7 ol7_latest 94 k libstdc++ x86_64 4.8.5-4.el7 ol7_latest 297 k libstdc++-devel x86_64 4.8.5-4.el7 ol7_latest 1.5 M libxcb x86_64 1.11-4.el7 ol7_latest 189 k Installing for dependencies: nss-softokn-freebl i686 3.16.2.3-14.2.el7_2 ol7_latest 187 k zlib i686 1.2.7-15.el7 ol7_latest 90 k Updating for dependencies: cpp x86_64 4.8.5-4.el7 ol7_latest 5.9 M gcc-gfortran x86_64 4.8.5-4.el7 ol7_latest 6.6 M glibc-common x86_64 2.17-106.0.1.el7_2.6 ol7_latest 11 M glibc-headers x86_64 2.17-106.0.1.el7_2.6 ol7_latest 662 k libX11-common noarch 1.6.3-2.el7 ol7_latest 161 k libgfortran x86_64 4.8.5-4.el7 ol7_latest 292 k libgomp x86_64 4.8.5-4.el7 ol7_latest 130 k libquadmath x86_64 4.8.5-4.el7 ol7_latest 182 k libquadmath-devel x86_64 4.8.5-4.el7 ol7_latest 45 k nss-softokn-freebl x86_64 3.16.2.3-14.2.el7_2 ol7_latest 203 k zlib x86_64 1.2.7-15.el7 ol7_latest 89 k Transaction Summary ================================================================================ Install 20 Packages (+ 2 Dependent packages) Upgrade 13 Packages (+11 Dependent packages) Total download size: 71 M Downloading packages: No Presto metadata available for ol7_latest (1/46): compat-libstdc++-33-3.2.3-72.el7.i686.rpm | 196 kB 00:00 (2/46): binutils-2.23.52.0.1-55.el7.x86_64.rpm | 5.0 MB 00:01 (3/46): cpp-4.8.5-4.el7.x86_64.rpm | 5.9 MB 00:01 (4/46): gcc-c++-4.8.5-4.el7.x86_64.rpm | 7.2 MB 00:02 (5/46): gcc-4.8.5-4.el7.x86_64.rpm | 16 MB 00:03 (6/46): glibc-2.17-106.0.1.el7_2.6.i686.rpm | 4.2 MB 00:01 (7/46): gcc-gfortran-4.8.5-4.el7.x86_64.rpm | 6.6 MB 00:02 (8/46): glibc-2.17-106.0.1.el7_2.6.x86_64.rpm | 3.6 MB 00:01 (9/46): glibc-devel-2.17-106.0.1.el7_2.6.i686.rpm | 1.0 MB 00:00 (10/46): glibc-devel-2.17-106.0.1.el7_2.6.x86_64.rpm | 1.0 MB 00:00 (11/46): glibc-headers-2.17-106.0.1.el7_2.6.x86_64.rpm | 662 kB 00:00 (12/46): ksh-20120801-22.el7_1.3.x86_64.rpm | 880 kB 00:00 (13/46): libX11-1.6.3-2.el7.i686.rpm | 609 kB 00:00 (14/46): libX11-1.6.3-2.el7.x86_64.rpm | 605 kB 00:00 (15/46): libX11-common-1.6.3-2.el7.noarch.rpm | 161 kB 00:00 (16/46): libXau-1.0.8-2.1.el7.i686.rpm | 28 kB 00:00 (17/46): libXext-1.3.3-3.el7.i686.rpm | 38 kB 00:00 (18/46): libXext-1.3.3-3.el7.x86_64.rpm | 38 kB 00:00 (19/46): libXi-1.7.4-2.el7.i686.rpm | 39 kB 00:00 (20/46): libXi-1.7.4-2.el7.x86_64.rpm | 39 kB 00:00 (21/46): libXtst-1.2.2-2.1.el7.i686.rpm | 19 kB 00:00 (22/46): libaio-0.3.109-13.el7.i686.rpm | 24 kB 00:00 (23/46): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00 (24/46): libaio-devel-0.3.109-13.el7.i686.rpm | 12 kB 00:00 (25/46): glibc-common-2.17-106.0.1.el7_2.6.x86_64.rpm | 11 MB 00:04 (26/46): libaio-devel-0.3.109-13.el7.x86_64.rpm | 12 kB 00:00 (27/46): libgcc-4.8.5-4.el7.i686.rpm | 102 kB 00:00 (28/46): libgfortran-4.8.5-4.el7.x86_64.rpm | 292 kB 00:00 (29/46): libgomp-4.8.5-4.el7.x86_64.rpm | 130 kB 00:00 (30/46): libgcc-4.8.5-4.el7.x86_64.rpm | 94 kB 00:00 (31/46): libquadmath-4.8.5-4.el7.x86_64.rpm | 182 kB 00:00 (32/46): libquadmath-devel-4.8.5-4.el7.x86_64.rpm | 45 kB 00:00 (33/46): libstdc++-4.8.5-4.el7.i686.rpm | 310 kB 00:00 (34/46): libstdc++-4.8.5-4.el7.x86_64.rpm | 297 kB 00:00 (35/46): libstdc++-devel-4.8.5-4.el7.i686.rpm | 1.5 MB 00:00 (36/46): libstdc++-devel-4.8.5-4.el7.x86_64.rpm | 1.5 MB 00:00 (37/46): libxcb-1.11-4.el7.x86_64.rpm | 189 kB 00:00 (38/46): libxcb-1.11-4.el7.i686.rpm | 201 kB 00:00 (39/46): nss-softokn-freebl-3.16.2.3-14.2.el7_2.x86_64.rpm | 203 kB 00:00 (40/46): nss-softokn-freebl-3.16.2.3-14.2.el7_2.i686.rpm | 187 kB 00:00 (41/46): unixODBC-devel-2.3.1-11.el7.x86_64.rpm | 54 kB 00:00 (42/46): unixODBC-2.3.1-11.el7.x86_64.rpm | 412 kB 00:00 (43/46): zlib-1.2.7-15.el7.i686.rpm | 90 kB 00:00 (44/46): zlib-1.2.7-15.el7.x86_64.rpm | 89 kB 00:00 (45/46): zlib-devel-1.2.7-15.el7.x86_64.rpm | 49 kB 00:00 (46/46): zlib-devel-1.2.7-15.el7.i686.rpm | 49 kB 00:00 -------------------------------------------------------------------------------- Total 5.2 MB/s | 71 MB 00:13 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : libgcc-4.8.5-4.el7.x86_64 1/70 Updating : glibc-common-2.17-106.0.1.el7_2.6.x86_64 2/70 Updating : nss-softokn-freebl-3.16.2.3-14.2.el7_2.x86_64 3/70 Updating : glibc-2.17-106.0.1.el7_2.6.x86_64 4/70 Updating : zlib-1.2.7-15.el7.x86_64 5/70 Updating : libquadmath-4.8.5-4.el7.x86_64 6/70 Updating : libstdc++-4.8.5-4.el7.x86_64 7/70 Updating : glibc-headers-2.17-106.0.1.el7_2.6.x86_64 8/70 Updating : libX11-common-1.6.3-2.el7.noarch 9/70 Installing : nss-softokn-freebl-3.16.2.3-14.2.el7_2.i686 10/70 Installing : glibc-2.17-106.0.1.el7_2.6.i686 11/70 Installing : libgcc-4.8.5-4.el7.i686 12/70 Installing : glibc-devel-2.17-106.0.1.el7_2.6.i686 13/70 Updating : libgfortran-4.8.5-4.el7.x86_64 14/70 Updating : cpp-4.8.5-4.el7.x86_64 15/70 Updating : binutils-2.23.52.0.1-55.el7.x86_64 16/70 Updating : libaio-0.3.109-13.el7.x86_64 17/70 Installing : unixODBC-2.3.1-11.el7.x86_64 18/70 Updating : libgomp-4.8.5-4.el7.x86_64 19/70 Updating : gcc-4.8.5-4.el7.x86_64 20/70 Updating : libquadmath-devel-4.8.5-4.el7.x86_64 21/70 Updating : libxcb-1.11-4.el7.x86_64 22/70 Updating : libX11-1.6.3-2.el7.x86_64 23/70 Updating : libXext-1.3.3-3.el7.x86_64 24/70 Updating : libXi-1.7.4-2.el7.x86_64 25/70 Updating : gcc-gfortran-4.8.5-4.el7.x86_64 26/70 Installing : unixODBC-devel-2.3.1-11.el7.x86_64 27/70 Installing : libaio-devel-0.3.109-13.el7.x86_64 28/70 Updating : glibc-devel-2.17-106.0.1.el7_2.6.x86_64 29/70 Updating : libstdc++-devel-4.8.5-4.el7.x86_64 30/70 Installing : zlib-devel-1.2.7-15.el7.x86_64 31/70 Installing : ksh-20120801-22.el7_1.3.x86_64 32/70 Installing : libstdc++-4.8.5-4.el7.i686 33/70 Installing : libstdc++-devel-4.8.5-4.el7.i686 34/70 Installing : libXau-1.0.8-2.1.el7.i686 35/70 Installing : libxcb-1.11-4.el7.i686 36/70 Installing : libX11-1.6.3-2.el7.i686 37/70 Installing : libXext-1.3.3-3.el7.i686 38/70 Installing : libXi-1.7.4-2.el7.i686 39/70 Installing : libaio-0.3.109-13.el7.i686 40/70 Installing : zlib-1.2.7-15.el7.i686 41/70 Installing : zlib-devel-1.2.7-15.el7.i686 42/70 Installing : libaio-devel-0.3.109-13.el7.i686 43/70 Updating : gcc-c++-4.8.5-4.el7.x86_64 44/70 Installing : libXtst-1.2.2-2.1.el7.i686 45/70 Installing : compat-libstdc++-33-3.2.3-72.el7.i686 46/70 Cleanup : gcc-gfortran-4.8.3-9.el7.x86_64 47/70 Cleanup : gcc-c++-4.8.3-9.el7.x86_64 48/70 Cleanup : libgfortran-4.8.3-9.el7.x86_64 49/70 Cleanup : libXi-1.7.2-2.1.el7.x86_64 50/70 Cleanup : libquadmath-devel-4.8.3-9.el7.x86_64 51/70 Cleanup : libstdc++-devel-4.8.3-9.el7.x86_64 52/70 Cleanup : gcc-4.8.3-9.el7.x86_64 53/70 Cleanup : glibc-devel-2.17-78.0.1.el7.x86_64 54/70 Cleanup : binutils-2.23.52.0.1-30.el7_1.2.x86_64 55/70 Cleanup : cpp-4.8.3-9.el7.x86_64 56/70 Cleanup : libstdc++-4.8.3-9.el7.x86_64 57/70 Cleanup : libXext-1.3.2-2.1.el7.x86_64 58/70 Cleanup : glibc-headers-2.17-78.0.1.el7.x86_64 59/70 Cleanup : libX11-1.6.0-2.1.el7.x86_64 60/70 Cleanup : libxcb-1.9-5.el7.x86_64 61/70 Cleanup : zlib-1.2.7-13.el7.x86_64 62/70 Cleanup : libgomp-4.8.3-9.el7.x86_64 63/70 Cleanup : libquadmath-4.8.3-9.el7.x86_64 64/70 Cleanup : libaio-0.3.109-12.el7.x86_64 65/70 Cleanup : libX11-common-1.6.0-2.1.el7.noarch 66/70 Cleanup : glibc-common-2.17-78.0.1.el7.x86_64 67/70 Cleanup : nss-softokn-freebl-3.16.2.3-12.el7_1.x86_64 68/70 Cleanup : glibc-2.17-78.0.1.el7.x86_64 69/70 Cleanup : libgcc-4.8.3-9.el7.x86_64 70/70 Verifying : libXext-1.3.3-3.el7.x86_64 1/70 Verifying : libgcc-4.8.5-4.el7.i686 2/70 Verifying : gcc-4.8.5-4.el7.x86_64 3/70 Verifying : glibc-devel-2.17-106.0.1.el7_2.6.i686 4/70 Verifying : libXext-1.3.3-3.el7.i686 5/70 Verifying : libstdc++-4.8.5-4.el7.i686 6/70 Verifying : glibc-2.17-106.0.1.el7_2.6.x86_64 7/70 Verifying : libxcb-1.11-4.el7.i686 8/70 Verifying : gcc-c++-4.8.5-4.el7.x86_64 9/70 Verifying : zlib-devel-1.2.7-15.el7.x86_64 10/70 Verifying : libaio-devel-0.3.109-13.el7.i686 11/70 Verifying : libX11-1.6.3-2.el7.x86_64 12/70 Verifying : glibc-common-2.17-106.0.1.el7_2.6.x86_64 13/70 Verifying : unixODBC-devel-2.3.1-11.el7.x86_64 14/70 Verifying : libXau-1.0.8-2.1.el7.i686 15/70 Verifying : libaio-0.3.109-13.el7.i686 16/70 Verifying : zlib-1.2.7-15.el7.x86_64 17/70 Verifying : ksh-20120801-22.el7_1.3.x86_64 18/70 Verifying : libaio-0.3.109-13.el7.x86_64 19/70 Verifying : libXtst-1.2.2-2.1.el7.i686 20/70 Verifying : glibc-2.17-106.0.1.el7_2.6.i686 21/70 Verifying : libstdc++-4.8.5-4.el7.x86_64 22/70 Verifying : libX11-common-1.6.3-2.el7.noarch 23/70 Verifying : zlib-devel-1.2.7-15.el7.i686 24/70 Verifying : unixODBC-2.3.1-11.el7.x86_64 25/70 Verifying : libgfortran-4.8.5-4.el7.x86_64 26/70 Verifying : libstdc++-devel-4.8.5-4.el7.i686 27/70 Verifying : gcc-gfortran-4.8.5-4.el7.x86_64 28/70 Verifying : libaio-devel-0.3.109-13.el7.x86_64 29/70 Verifying : nss-softokn-freebl-3.16.2.3-14.2.el7_2.x86_64 30/70 Verifying : glibc-headers-2.17-106.0.1.el7_2.6.x86_64 31/70 Verifying : zlib-1.2.7-15.el7.i686 32/70 Verifying : libstdc++-devel-4.8.5-4.el7.x86_64 33/70 Verifying : libXi-1.7.4-2.el7.x86_64 34/70 Verifying : cpp-4.8.5-4.el7.x86_64 35/70 Verifying : compat-libstdc++-33-3.2.3-72.el7.i686 36/70 Verifying : libX11-1.6.3-2.el7.i686 37/70 Verifying : libgomp-4.8.5-4.el7.x86_64 38/70 Verifying : libgcc-4.8.5-4.el7.x86_64 39/70 Verifying : binutils-2.23.52.0.1-55.el7.x86_64 40/70 Verifying : libquadmath-devel-4.8.5-4.el7.x86_64 41/70 Verifying : libXi-1.7.4-2.el7.i686 42/70 Verifying : glibc-devel-2.17-106.0.1.el7_2.6.x86_64 43/70 Verifying : nss-softokn-freebl-3.16.2.3-14.2.el7_2.i686 44/70 Verifying : libquadmath-4.8.5-4.el7.x86_64 45/70 Verifying : libxcb-1.11-4.el7.x86_64 46/70 Verifying : glibc-common-2.17-78.0.1.el7.x86_64 47/70 Verifying : libX11-common-1.6.0-2.1.el7.noarch 48/70 Verifying : libxcb-1.9-5.el7.x86_64 49/70 Verifying : libgfortran-4.8.3-9.el7.x86_64 50/70 Verifying : glibc-2.17-78.0.1.el7.x86_64 51/70 Verifying : libaio-0.3.109-12.el7.x86_64 52/70 Verifying : cpp-4.8.3-9.el7.x86_64 53/70 Verifying : libstdc++-devel-4.8.3-9.el7.x86_64 54/70 Verifying : libX11-1.6.0-2.1.el7.x86_64 55/70 Verifying : gcc-gfortran-4.8.3-9.el7.x86_64 56/70 Verifying : libquadmath-devel-4.8.3-9.el7.x86_64 57/70 Verifying : libXi-1.7.2-2.1.el7.x86_64 58/70 Verifying : glibc-devel-2.17-78.0.1.el7.x86_64 59/70 Verifying : gcc-c++-4.8.3-9.el7.x86_64 60/70 Verifying : nss-softokn-freebl-3.16.2.3-12.el7_1.x86_64 61/70 Verifying : libgcc-4.8.3-9.el7.x86_64 62/70 Verifying : binutils-2.23.52.0.1-30.el7_1.2.x86_64 63/70 Verifying : glibc-headers-2.17-78.0.1.el7.x86_64 64/70 Verifying : gcc-4.8.3-9.el7.x86_64 65/70 Verifying : zlib-1.2.7-13.el7.x86_64 66/70 Verifying : libXext-1.3.2-2.1.el7.x86_64 67/70 Verifying : libstdc++-4.8.3-9.el7.x86_64 68/70 Verifying : libgomp-4.8.3-9.el7.x86_64 69/70 Verifying : libquadmath-4.8.3-9.el7.x86_64 70/70 Installed: compat-libstdc++-33.i686 0:3.2.3-72.el7 glibc.i686 0:2.17-106.0.1.el7_2.6 glibc-devel.i686 0:2.17-106.0.1.el7_2.6 ksh.x86_64 0:20120801-22.el7_1.3 libX11.i686 0:1.6.3-2.el7 libXau.i686 0:1.0.8-2.1.el7 libXext.i686 0:1.3.3-3.el7 libXi.i686 0:1.7.4-2.el7 libXtst.i686 0:1.2.2-2.1.el7 libaio.i686 0:0.3.109-13.el7 libaio-devel.i686 0:0.3.109-13.el7 libaio-devel.x86_64 0:0.3.109-13.el7 libgcc.i686 0:4.8.5-4.el7 libstdc++.i686 0:4.8.5-4.el7 libstdc++-devel.i686 0:4.8.5-4.el7 libxcb.i686 0:1.11-4.el7 unixODBC.x86_64 0:2.3.1-11.el7 unixODBC-devel.x86_64 0:2.3.1-11.el7 zlib-devel.i686 0:1.2.7-15.el7 zlib-devel.x86_64 0:1.2.7-15.el7 Dependency Installed: nss-softokn-freebl.i686 0:3.16.2.3-14.2.el7_2 zlib.i686 0:1.2.7-15.el7 Updated: binutils.x86_64 0:2.23.52.0.1-55.el7 gcc.x86_64 0:4.8.5-4.el7 gcc-c++.x86_64 0:4.8.5-4.el7 glibc.x86_64 0:2.17-106.0.1.el7_2.6 glibc-devel.x86_64 0:2.17-106.0.1.el7_2.6 libX11.x86_64 0:1.6.3-2.el7 libXext.x86_64 0:1.3.3-3.el7 libXi.x86_64 0:1.7.4-2.el7 libaio.x86_64 0:0.3.109-13.el7 libgcc.x86_64 0:4.8.5-4.el7 libstdc++.x86_64 0:4.8.5-4.el7 libstdc++-devel.x86_64 0:4.8.5-4.el7 libxcb.x86_64 0:1.11-4.el7 Dependency Updated: cpp.x86_64 0:4.8.5-4.el7 gcc-gfortran.x86_64 0:4.8.5-4.el7 glibc-common.x86_64 0:2.17-106.0.1.el7_2.6 glibc-headers.x86_64 0:2.17-106.0.1.el7_2.6 libX11-common.noarch 0:1.6.3-2.el7 libgfortran.x86_64 0:4.8.5-4.el7 libgomp.x86_64 0:4.8.5-4.el7 libquadmath.x86_64 0:4.8.5-4.el7 libquadmath-devel.x86_64 0:4.8.5-4.el7 nss-softokn-freebl.x86_64 0:3.16.2.3-14.2.el7_2 zlib.x86_64 0:1.2.7-15.el7 Complete! |
After you have installed the prerequisites, you install the oracle-dbms-server-12cR1-preinstall
library as the root
user. You run the command as the root user like this:
yum install -y oracle-dbms-server-12cR1-preinstall |
You should see the following when it’s successful:
Loaded plugins: langpacks adobe-linux-x86_64 | 951 B 00:00 ol7_UEKR3 | 1.2 kB 00:00 ol7_latest | 1.4 kB 00:00 (1/2): ol7_latest/x86_64/updateinfo | 829 kB 00:00 (2/2): ol7_latest/x86_64/primary | 16 MB 00:02 ol7_latest 14500/14500 Resolving Dependencies --> Running transaction check ---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-4.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: oracle-rdbms-server-12cR1-preinstall x86_64 1.0-4.el7 ol7_latest 18 k Transaction Summary ================================================================================ Install 1 Package Total download size: 18 k Installed size: 43 k Downloading packages: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64.rpm | 18 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 1/1 Verifying : oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 1/1 Installed: oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-4.el7 Complete! |
After running the oracle-dbms-server-12cR1-preinstall library, you can navigate through the Applications, Sundry, and Users and Groups to see the following dialog:
It’s hard to tell from the GUI the oracle
user’s group. You can find oracle
primary user’s group by checking the /etc/passwd
file. You will find that oinstall
is the primary user’s group.
As always, I hope this helps those trying to install an Oracle Database 12c instance. Please post a comment if you have a better way to load the pre-requisite packages.
Linux User-Group Console
This post shows you how to add the menu option and GUI to set users and groups. It’s quite a bit easier than mastering all the command-line syntax. It makes setting up the required user and group accounts for an Oracle Enterprise or MySQL database solution much easier.
You add the utility by calling the yum (Yellowdog Updater, Modified) utility like this:
yum installed -y system-config_users |
You should see the following:
Loaded plugins: langpacks adobe-linux-x86_64 | 951 B 00:00 ol7_UEKR3 | 1.2 kB 00:00 ol7_latest | 1.4 kB 00:00 Resolving Dependencies --> Running transaction check ---> Package system-config-users.noarch 0:1.3.5-2.el7 will be installed --> Processing Dependency: system-config-users-docs for package: system-config-users-1.3.5-2.el7.noarch --> Running transaction check ---> Package system-config-users-docs.noarch 0:1.0.9-6.el7 will be installed --> Processing Dependency: rarian-compat for package: system-config-users-docs-1.0.9-6.el7.noarch --> Running transaction check ---> Package rarian-compat.x86_64 0:0.8.1-11.el7 will be installed --> Processing Dependency: rarian = 0.8.1-11.el7 for package: rarian-compat-0.8.1-11.el7.x86_64 --> Processing Dependency: rarian for package: rarian-compat-0.8.1-11.el7.x86_64 --> Processing Dependency: librarian.so.0()(64bit) for package: rarian-compat-0.8.1-11.el7.x86_64 --> Running transaction check ---> Package rarian.x86_64 0:0.8.1-11.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: system-config-users noarch 1.3.5-2.el7 ol7_latest 337 k Installing for dependencies: rarian x86_64 0.8.1-11.el7 ol7_latest 97 k rarian-compat x86_64 0.8.1-11.el7 ol7_latest 65 k system-config-users-docs noarch 1.0.9-6.el7 ol7_latest 307 k Transaction Summary ================================================================================ Install 1 Package (+3 Dependent packages) Total download size: 805 k Installed size: 3.9 M Downloading packages: (1/4): rarian-0.8.1-11.el7.x86_64.rpm | 97 kB 00:00 (2/4): rarian-compat-0.8.1-11.el7.x86_64.rpm | 65 kB 00:00 (3/4): system-config-users-1.3.5-2.el7.noarch.rpm | 337 kB 00:00 (4/4): system-config-users-docs-1.0.9-6.el7.noarch.rpm | 307 kB 00:00 -------------------------------------------------------------------------------- Total 830 kB/s | 805 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : rarian-0.8.1-11.el7.x86_64 1/4 Installing : rarian-compat-0.8.1-11.el7.x86_64 2/4 Installing : system-config-users-1.3.5-2.el7.noarch 3/4 Installing : system-config-users-docs-1.0.9-6.el7.noarch 4/4 Verifying : rarian-compat-0.8.1-11.el7.x86_64 1/4 Verifying : system-config-users-1.3.5-2.el7.noarch 2/4 Verifying : rarian-0.8.1-11.el7.x86_64 3/4 Verifying : system-config-users-docs-1.0.9-6.el7.noarch 4/4 Installed: system-config-users.noarch 0:1.3.5-2.el7 Dependency Installed: rarian.x86_64 0:0.8.1-11.el7 rarian-compat.x86_64 0:0.8.1-11.el7 system-config-users-docs.noarch 0:1.0.9-6.el7 Complete! |
After successfully installing the radian
, rarian-compat
, system-config-users
, and system-config-users-docs
packages, you will find that there’s now a Users and Groups option when you navigate by clicking on Applications and then clicking on Sundry from the menu.
Menu Instructions
- You navigate to the Applications menu, and choose Sundry from the menu list and Users and Groups from the menu item to continue.
- You will be prompted for the sudoer’s password in this dialog.
- At this point, you can use the GUI interface to set users and groups.
As always, I hope this helps those trying to set users and passwords without mastering the command-line syntax.