WYSIWYG md editor SimpleMDE or use some desktop markdown text editor    Home    [ html2markdown ]
Markdown txt 01/001_vbox/001_instalac_moj_VM_oralinux_older.mkd Parsedown-ed to HTML.    [ Edit text ]    [ Colored text ]


12-MAY-2019 vbox 6.0.6

VBOX: oralin73 ssoralin73@oralin73 host oralin73I

tested also 29.jul 2017 vbox 5.1.26, 1.jun 2016 (vbox 5.1.6), 2.oct.2016 (vbox 5.0.20).

This file: L:\1_instalac\1_instalirano\linux\2_oralinux\1_instalac_moj_oracle_linux_or_fedora_64bit_virtualbox_Apache_PHP_11gXE.html

http://oralin73

http://localhost/phpinfo.php

Self join msgs paginator http://localhost/fw/public/app/tema/tema.php

Steps (see details below) :

In J:\awww\apl\dev1\zz\zz30GB\dev1_zinstalac_dok\linux\1_virtualbox :

  1. install vbox : 2click VirtualBox-5.1.26-117224-Win.exe as admin (?)

  2. 2click Oracle_VM_VirtualBox_Extension_Pack-5.1.26-117224.vbox-extpack

  3. install oralin_7_3_V834394-01.iso and start oralin73 in vbox

  4. install Guest Additions for Linux guest oralin73: Devices ->Guest add.
    Outputs: Uncompress.VirtualBox 5.1.26 Guest Additions for Linux.....

see http://goto-adf.blogspot.hr/2014/11/install-oracle-xe-on-oracle-linux-7.html


WHERE ARE INSTALLED :

C:\Program Files\Oracle\VirtualBox - installed VirtualBox, .iso for add ons mount in Devices ->Guest add
C:\Users\ss\VirtualBox VMs - virtual machines images: oralinux, centos, ubuntu...
Snapshot folder is C:\Users\ss\VirtualBox VMs\oralin73\Snapshots

1. Install Oracle VirtualBox-6.0.6-130049-Win.exe

on Windows 10 64 bit, MAY 2019.

Why vbox ? Before larger installations we make snapshot to return to (any previos) state-snapshot before (failed) installation. Acronis disk images are much larger and slower. Learning is simplest-fastest with virtualization. Vagrant is second step after learned virtualization described here.

  1. Download Oracle VM VirtualBox OR https://www.virtualbox.org/wiki/Downloads

  2. New Wizzard (automatic settings GUI) : Click "New" in vbox main screen, Choose a name for your VM eg ora11gxefedora, J:\vbox\VMs
    select type of OS (operating system) Linux, version Fedora (64 bit)
    Select Memory size eg 4096 + 1024= 5120 MB and click Next
    Create a virtual hard disk now, expert mode VDI (VirtualBox Disk Image), Dinamically allocated, ora11gxefedora 64 GB (8 GB for swap - required by Oracle 11g DB)
    New Wizzard re-directs you back to vbox main screen.

  3. Settings -> General -> Advanced -> Enable Shared Clippboard and Drag-drop both bidirectional
    Snapshot folder is J:\vbox\VMs\ora11gxefedora\Snapshots
    Settings -> System -> Processor -> 2 CPU (2 for Win 10 64 bit)
    Settings -> Display -> Screen -> 128 MB
    Settings -> Display -> Screen -> Enable 3D acceleration

    Settings -> Network -> Adapter 1
    -> Atached to: -> Bridged adapter (my is cable, Realtek PCIe GBE on
    Gigabyte Z68AP-D3, Intel Core i5 2500K, 16 GB DDR3 - recomended. Minimum is half this CPU and half mem. but slow.
    ->Promiscuous Mode: Allow all

    Settings -> Shared folders -> Add -> Folder path and name, eg J:\awww\www, name: fwphp
    J:\awww\apl\dev1\zz\zz30GB\dev1_zinstalac_dok\linux\2_oralinux, name: 2_oralinux.
    My virt. Apache site doc.root on Win.10 is J:\awww\apl\dev1 Auto-mount check box for all Shared folders.

  4. Settings -> Storage -> IDE controller -> Click on Empty CD icon.
    On screen right side click on CD image icon for the CD/DVD drive and click on the �Choose a virtual CD/DVD disk file...� -> Find ISO eg
    L:\_ISO\_ISO\Fedora-Workstation-Live-x86_64-30-1.2.iso 1,9 GB
    L:\1_instalac\1_instalirano\linux\2_oralinux\7_5\V975367-01.iso 4,3 GB

2. Install Oracle Fedora 30 guest OS on Win 10 64 bit Virtual Box

Download oralinux 7.3 from http://edelivery.oracle.com/linux
(http://www.oracle.com/technetwork/server-storage/linux/downloads/)

RIGHT CTRL TO FREE MOUSE !!

Oracle Linux 7.3 installation is finished.
I tested also Centos 7.3 and Mint 18.2 Cinnamon - do not work for me (after OS update - problems with booting same as with oralinux 7.3). To install DB 11g XE I ended withoralinux 7.3 - works better than 7.2.

2. Install VBoxGuestAdditions for guest Oracle Linux 7.3

After installing Linux on VirtualBox we need install VBoxGuestAdditions because of not working features :
Resolution is bad, Auto-Resize (rightctrl+f), Drag-Drop, Clipboard sharing

1. to install Guest Additions for Linux guest oralin73 :2 click :
L:\1_instalac\1_instalirano\linux\1_virtualbox\Oracle_VM_VirtualBox_Extension_Pack-6.0.6.vbox-extpack

2. remove Linux .iso from IDE controller
-> Start Linux > put vbox extension iso in IDE controller -> Devices ->Guest add. from vbox oralin73
Uncompressing VirtualBox 5.1.26 Guest Additions for Linux...

or less simple :
1- With vbox is installed :
C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso

2- start Orcle VM VirtualBox Manager -> click oralin73 Virtual Machine (powered off) -> click icon Settings
-> click Button 'Storage' and add a new 'Controller: IDE' for virtual DVD device, put iso above in it

3- now you can start Oracle Linux 7.3 and right click VBoxGuestAdditions icon -> open in terminal

\===>The gcc utility was not found.- error if I did not during linux installation selected development tools !!!!!!!

Work around:

http://www.cyberciti.biz/faq/installing-rhel-epel-repo-on-centos-redhat-7-x/ :
su -
cd /tmp
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
ls *.rpm
yum install epel-release-latest-7.noarch.rpm
yum repolist

repo id repo name status
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 11,932
ol7_UEKR4/x86_64 Latest Unbreak.Enterp.Kernel R 4 for 7 Server 396
ol7_latest/x86_64 Oracle Linux 7Server Latest (x86_64) 19,362
repolist: 31,690

https://wiki.centos.org/HowTos/Virtualization/VirtualBox/CentOSguest
[root@localhost VBOXADDITIONS_5.0.20_106931]#yum install dkms
yum groupinstall "Development Tools"
yum install kernel-devel

./VBoxLinuxAdditions.run
error again:

The missing package can be probably installed with
yum install kernel-uek-devel-3.8.13-98.7.1.el7uek.x86_64

after I did it - OK - resolution, Auto-Resize, Drag-Drop and Clipboard sharing features are working

3. Install Ora 11g XE

On ssoralin73@oralin73 Ora Linux 7.3 64 bit

1-- [ssoralin73@oralin73 ~]$
su -
links = browser
ctrl+shift+t = new tab terminal
su -
mc (Midnight commander)
in ms's left pane: cd /media/**sf_2_oralinux/
in ms's right pane: cd /home/ssoralin73
F5 (copy) oracle-xe-11.2.0-1.0.x86_64.rpm.zip left -> right
**

new tab terminal
su -
cd /home/ssoralin73
chmod 776 oracle-xe-11.2.0-1.0.x86_64.rpm.zip
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip

creating: Disk1/
creating: Disk1/upgrade/
inflating: Disk1/upgrade/gen_inst.sql
creating: Disk1/response/
inflating: Disk1/response/xe.rsp
inflating: Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm

2-- su -
cd /home/ssoralin73/Disk1
1. rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

3-- 2. /etc/init.d/oracle-xe configure
This will configure on-boot properties of Oracle Database 11g Express
Edition. The following questions will determine whether
database should be starting upon system boot,
ports it will use,
passwords that will be used for database accounts.
Press ENTER to accept the defaults. Ctrl-C will abort.
Specify the HTTP port that will be used for Oracle Application Express [8080]:8085
Specify a port that will be used for the database listener [1521]:
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of different passwords for each database account. This can be done after
initial configuration:
Confirm the password:
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:n
Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.

4-- Setting the Oracle Database XE Environment Variables
Log on with root permissions is not needed.
do not exit (from root user)
DB XE provides a script that sets environment variables :
cd /u01/app/oracle/product/11.2.0/xe/bin
gedit ./oracle_env.sh

Noting to change hear:
# /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/bin
without /bin at end !!
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export PATH=$ORACLE_HOME/bin/$PATH

see for NLS_LANG :
https://mikesmithers.wordpress.com/2015/03/01/installing-oracle-xe-on-centos/

run it :
3. ./oracle_env.sh

cd /etc/skel
ls -la | grep .bash_profile
Edit login or profile files so that these environment variables are set each time you log in or open a new shell :
gedit .bash_profile
enter the following line at end /etc/skel/.bash_profile :
4. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh

5-- Starting Oracle Database XE
To start the database manually, run this command as root user:
5. /etc/init.d/oracle-xe start or /etc/init.d/oracle-xe stop
or :
After you have installed Oracle Database XE, DB is up and running and you can start it if it is currently stopped:
Main menu (on Gnome)->Oracle Database 11g Express Edition
or 6. Applications->Other menu (on KDE),
and then click Start Database or Run SQL Command Line or...

Connect to the database using the user name SYSTEM, and supply the password that you created during configuration.
7. conn sys/ss141 as SYSDBA (system can not)

# gedit /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.

# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.

# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.file-max = 6815744
########

Oracle 11g XE on RHEL7

December 3, 2014 https://shi2wei3.github.io/posts/2014-12-03-oracle-11g-xe-on-rhel7.html
database

The prerequisite is i assume you already got a RHEL7 installed with GNOME3

Install oracle database 11gXE

it needs swap volume at least specify space 2 x memory (12 GB)

unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
cd Disk1
sudo rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm

Install sqlplus

su -
cd /home/ssoralin73
chmod 776 oracle-xe-11.2.0-1.0.x86_64.rpm.zip
unzip instantclient-basic-linux.x64-12.2.0.1.0.zip
unzip instantclient-sdk-linux.x64-12.2.0.1.0.zip
unzip instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
cd instantclient_12_2
ls -l
ln -s libclntsh.so.12.1 libclntsh.so
ln -s libocci.so.12.1 libocci.so

To avoid error ee to see libsqlplus.so :
./sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
export LD_LIBRARY_PATH=$(pwd)

./sqlplus sys/ss141@localhost/XE as SYSDBA (system can not)
alter user hr account unlock;
alter user hr identified by hr;
grant CONNECT,DBA,RESOURCE to hr IDENTIFIED BY hr;
or grant create table to hr; ...

ALTER USER ANONYMOUS ACCOUNT UNLOCK;

# cd /home/ssoralin73/instantclient_12_2
# ./sqlplus hr/hr@localhost/XE

Alternative: rpm instantclient installation

put all three rpm in some tmp dir and :
ls *rpm
rpm -i *rpm
ls /usr/lib/oracle/12.1/client64/lib
ls /usr/lib/oracle/12.1/client64/bin - here is sqlplus dir
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
/usr/lib/oracle/12.1/client64/bin/sqlplus hr/hr@localhost/XE

or :

sudo rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
sudo rpm -ivh oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm

If you got the error below, you need to add library path manually: sqlplus64: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib/

which sqlplus

/usr/bin/which: no sqlplus in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) 

# updatedb  
# locate sqlplus  
/home/ssoralin73/instantclient\_12\_2/sqlplus  
/u01/app/oracle/product/11.2.0/xe/sqlplus  - dir, not script  
/u01/app/oracle/product/11.2.0/xe/bin/sqlplus  
...  
/u01/app/oracle/product/11.2.0/xe/bin/sqlplus hr/hr@localhost/XE  
Error 6 initializing SQL\*Plus  
SP2-0667: Message file sp1<lang>.msb not found  
SP2-0750: You may need to set ORACLE\_HOME to your Oracle software directory  

[root@oralin73 instantclient\_12\_2\]# ls -alF  
total 219860  
drwxr-xr-x.  3 root       root            4096 Jul 30 17:59 ./  
drwx------. 23 ssoralin73 ssoralin73      4096 Jul 30 17:25 ../  
-rwxrwxr-x.  1 root       root           44220 Jan 26  2017 adrci\*  
...

Install sqldeveloper (Optional)

Install jdk

sudo rpm -ivh jdk-7u72-linux-x64.rpm
sudo rpm -ivh sqldeveloper-4.0.3.16.84-1.noarch.rpm

Update JDK_HOME to SetJavaHome in: ~/.sqldeveloper/4.0.0/product.conf

Add the command below to /usr/local/bin/sqldeveloper: unset GNOME_DESKTOP_SESSION_ID

Login to APEX (Optional)

http://localhost:8085/apex/apex_admin
usr/psw: ADMIN/ss141 ss141 -> Ss141!!

Application Express 4.0.2.00.09
Workspace: INTERNAL User: ADMIN
Language: en | Copyright � 1999, 2010, Oracle. All rights reserved.

if you forgot the admin password, you can change it follow the steps

How to restart database

/etc/init.d/oracle-xe restart

Do experiment for Joel Spolsky's The Law of Leaky Abstractions

...


4.1. Install Apache HTTP Server (httpd)

   and PHP 7.1.7 on  

CentOS / Red Hat (RHEL) 7.3 / oracle linux 7.3

OLD: yum --enablerepo=remi install php56-php-oci8.x86_64
yum install php56-php-oci8.x86_64
yum erase php56-php-oci8.x86_64

https://www.if-not-true-then-false.com/2010/install-apache-php-on-fedora-centos-red-hat-rhel/#
also contains on Fedora 26/25/24, CentOS / Red Hat (RHEL) 7.3/6.9

1 Change to root user

su -    ## OR ##   sudo -i

2 Install EPEL & Remi repository

## Remi Dependency on CentOS 7 and Red Hat (RHEL) 7 ##rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

3 Install Apache (httpd) Web server and PHP 7.1.7

yum --enablerepo=remi,remi-php71 install httpd php php-common

4 Install PHP 7.1.7 modules

Select what you need: OPcache, APCu, CLI, PEAR, PDO, MySQL, PostgreSQL, MongoDB, Memcache, Memcached, GD, MBString, MCrypt, XML

More info about PHP APC from PHP APC Configuration and Usage Tips and Tricks.

yum --enablerepo=remi,remi-php71 install php-pecl-apcu php-cli php-pear php-pdo php-gd php-mbstring php-mcrypt php-xml

yum --enablerepo=remi,remi-php71 install php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongodb php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml

5 Start Apache HTTP server (httpd) and autostart Apache HTTP server (httpd) on boot

systemctl enable httpd.service

6 Create test PHP page to check that Apache, PHP and PHP modules are working

gedit /var/www/html/test.php

<?php    phpinfo();

7 Check created page with browser

http://oralin73/test.php - WORKS !!
http://localhost/test.php - WORKS !!
System Linux oralin73 4.1.12-94.5.7.el7uek.x86_64 #2 SMP Thu Jul 20 18:44:17 PDT 2017 x86_64 Build Date Jul 6 2017 13:32:33
Server API Apache 2.0 Handler Virtual Directory Support disabled
Configuration File (php.ini) Path /etc
Loaded Configuration File /etc/php.ini
Scan this dir for additional .ini files /etc/php.d
...
Apache Version Apache/2.4.6 () PHP/7.1.7
Server Administrator root@localhost
Hostname:Port fe80::9760:1dcd:9a9b:92:0
User/Group apache(48)/48
Server Root /etc/httpd
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
SERVER_ADDR fe80::9760:1dcd:9a9b:92
SERVER_PORT 80
REMOTE_ADDR fe80::9760:1dcd:9a9b:92
DOCUMENT_ROOT /var/www/html
REQUEST_SCHEME http
REMOTE_PORT 38526
GATEWAY_INTERFACE CGI/1.1

ls -alF /var/www/html/

See instructions in the file /etc/httpd/conf.d/welcome.conf.
For example, if you experienced problems while visiting www.example.com, you should send e-mail to "webmaster@example.com"

ls -alF /etc/httpd/conf
gedit /etc/httpd/conf/httpd.conf

Listen 80

Listen 8083
ServerName www.example.com:80

ServerName oralin73:8083

chmod 660 /etc/httpd/conf/httpd.conf
ls -alF /etc/httpd/conf/httpd.conf
-rw-rw----. 1 root root 11805 Jul 30 14:33...

service httpd restart Redirecting to /bin/systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe"

[root@oralin73 ~]# chmod 660 /etc/httpd/logs/error_log
[root@oralin73 ~]# ls -alF /etc/httpd/logs/error_log
-rw-rw-r--. 1 root root 2639 Jul 30 14:37...

SELinux shows err dialog:
You can generate a local policy module to allow this access.
Allow this access for now by executing:
ausearch -c 'httpd' --raw | audit2allow -M my-httpd
semodule -i my-httpd.pp

4.2 Enable Remote Connection to Apache HTTP Server (httpd) -> Open Web server Port (80) on Iptables Firewall (as root user again)

firewall-cmd --get-active-zones

Outputs:
public
interfaces: enp0s3 (or wlp1s0)

Add New Rule to Firewalld

You might have active zone like public, FedoraWorkstation, FedoraServer.

firewall-cmd --permanent --zone=public --add-port=8083/tcp

2.2.3 Restart firewalld.service

systemctl restart firewalld.service

3. Test remote connection

Access following address, with your browser. http://your.domain/test.php
http://oralin73
/test.php - WORKS !!
192.http://192.168.5.102:8083/test.php - WORKS !!
http://localhost/test.php - WORKS !!

More reading:

Enable Apache Userdir with SELinux on Fedora 26/25/24, CentOS 7.3/6.9, Red Hat (RHEL) 7.3/6.9

gedit /etc/hosts
# dev1 is local pc's virtual host, ssoralin73 is local pc name
127.0.0.1 localhost dev1
::1 localhost dev1

[ssoralin73@oralin73 ~]$ hostname
oralin73

# updatedb
# locate php.ini
/etc/php.ini - loaded
/usr/share/doc/php-common-7.1.7/php.ini-development
/usr/share/doc/php-common-7.1.7/php.ini-production

ls -ltr /etc/httpd/conf -ltr or -alF
httpd.conf magic




https://linuxconfig.org/apache-webserver-httpd-service-installation-on-redhat-7-linux
Apache webserver (httpd) service installation on Redhat 7 Linux

[root@localhost ~]# httpd -v
**Server version: Apache/2.4.6 () Server built: Apr 12 2017 03:56:09

**

install a base apache package httpd:
[root@rhel7 ~]# yum install httpd (3.9 MB)
2.4.6-45.0.1.el7_3.4 ol7_latest
[root@rhel7 ~]# service httpd start
Redirecting to /bin/systemctl start httpd.service
Check the status of httpd service:
[root@rhel7 ~]# service httpd status

Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since Sat 2017-07-29 20:35:39 CEST; 21s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 5183 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
+�5183 /usr/sbin/httpd -DFOREGROUND
+�5187 /usr/sbin/httpd -DFOREGROUND
+�5188 /usr/sbin/httpd -DFOREGROUND
+�5189 /usr/sbin/httpd -DFOREGROUND
+�5190 /usr/sbin/httpd -DFOREGROUND
L�5191 /usr/sbin/httpd -DFOREGROUND

Jul 29 20:35:38 oralin73 systemd[1]: Starting The Apache HTTP Server...
Jul 29 20:35:39 oralin73 httpd[5183]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::9760:1dcd:9a9b:92
Jul 29 20:35:39 oralin73 systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.

Create some simple page. Once done this will also disable RHEL7 apache test page from apearing:
[root@rhel7 ~]#
echo "APACHE on RHEL7" > /var/www/html/index.html
http://oralin73 - WORKS !!

If you get a following errors:
rhel7 httpd[2234]: AH00557: httpd[2234]: AH00558: httpd: Could not reliably determine
the server's fully qualified domain name, using 127.0.0.1. Set the 'Server...
You can fix it by a following command:
[root@rhel7 ~]#
echo 'ServerName 127.0.0.1' >> /etc/httpd/conf/httpd.conf

[root@rhel7 ~]# service httpd restart

By default the port 80 is blocked so we need to change firewall rules to enable http port:
firewall-cmd --zone=public --add-port=80/tcp --permanent
**
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload**
At the moment you should be able to see a default Apache website when pointing your browser to your server's hostname or IP address eg. 10.1.1.110.

To start apache webserver after reboot :
[root@localhost ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service
to /usr/lib/systemd/system/httpd.service
manual ln is not needed :
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'

PHP

https://webtatic.com/packages/php71/

upgrade PHP does not work:
yum install yum-plugin-replace yum replace php-common --replace-with=php71w-common

https://webtatic.com/packages/php70/ or
https://www.if-not-true-then-false.com/2010/install-apache-php-on-fedora-centos-red-hat-rhel/

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Install PHP 7.0�s mod_php SAPI (along with opcode cache) :

yum install php70w php70w-opcache (27 MB)

Installed:
php70w.x86_64 0:7.0.21-1.w7
php70w-opcache.x86_640:7.0.21-1.w7
Dependency Installed:
php70w-cli.x86_64 0:7.0.21-1.w7
php70w-common.x86_64 0:7.0.21-1.w7

gedit /var/www/html/phpinfo.php

<?php    phpinfo();

You can alternatively install PHP 7.0�s php-fpm SAPI (along with an opcode cache by doing:

yum install php70w-fpm php70w-opcache

See the package list below for additional SAPIs and PHP extensions.
...

Install Apache 2.4, MySQL/MariaDB 5.5 and PHP 5.5/5.6 on RHEL/CentOS 7/6 & Fedora 23-18

http://www.tecmint.com/install-apache-mysql-php-on-redhat-centos-fedora/

https://uk.godaddy.com/help/build-a-lamp-stack-linux-apache-mysql-php-centos-7-17344

https://uk.godaddy.com/help/configure-apache-virtual-hosts-centos-7-17338

su -
# yum update

------ RHEL/CentOS 7/6 and Fedora 18-21 ------
# yum search all php
yum search all oci

Step 1: Installing Remi Repository

ls /etc/yum.repos.d
epel.repo epel-testing.repo public-yum-ol7.repo

should be like this :
epel.repo public-yum-ol7.repo remi.repo
epel-testing.repo remi-php70.repo remi-safe.repo

https://rpms.remirepo.net/ and than your local, for me :
Slovenia http://ftp.arnes.si/mirrors/remi/

On RHEL/CentOS 7/oralin7 :

# yum update && yum install epel-release (if not installed)

# rpm -Uvh http://ftp.arnes.si/mirrors/remi/enterprise/remi-release-7.rpm
or
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

[root@oralin73 ~]# ls /etc/yum.repos.d
epel.repo epel-testing.repo public-yum-ol7.repo remi-php54.repo remi-php70.repo remi-php71.repo remi-php72.repo remi.repo remi-safe.repo

------ For RHEL 7 Only ------ not found on oracle linux 7
# subscription-manager repos --enable=rhel-7-server-optional-rpms

Step 2: Enabling the Remi Repository

common dependencies are in "remi-safe"

Now you make sure that remi repository is enabled and all set to install chosen PHP version,
to do this open remi.repo file and make sure the line set to enabled=1 as instructed below,
in order to install PHP 7.2

#gedit /etc/yum.repos.d/remi.repo

[remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Now if you want to install PHP 5.5 or PHP 5.6, just set the line enabled=1 in sections
[remi-php55] and [remi-php56] to install as instructed below.

[remi-php55]
name=Remi's PHP 5.5 RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/php55/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/php55/mirror
# NOTICE: common dependencies are in "remi-safe"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/php56/mirror
# NOTICE: common dependencies are in "remi-safe"
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Step 3: Installing Apache, MariaDB/MySQL, and PHP

To enable the MariaDB repository on RHEL/CentOS 7 distributions, create a file named
/etc/yum.repos.d/mariadb.repo with the following contents:
....

Step 4: Installing PHP Modules
------ On RHEL/CentOS 7/6 and Fedora 18-21 ------
yum --enablerepo=remi install php-pdo php-pecl-memcache php-pecl-memcached php-gd php-xml php-mbstring php-mcrypt php-pecl-apcu php-cli php-pear
also : php-mysqlnd php-pgsql php-pecl-mongo...

sudo yum install php yum above did not all needed !?

Step 5: Enable/Start Apache and MySQL/MariaDB
On SystemD � RHEL/CentOS 7 and Fedora 23-18

------ Enable Apache and MariaDB on Boot ------
# systemctl enable httpd
# systemctl enable mariadb

------ Start Apache and MariaDB ------
# systemctl start httpd
# systemctl start mariadb

yum --enablerepo=remi install php56-php-oci8.x86_64

Step 6: Verifying PHP 5.5 or 5.6

[root@localhost ~]# php -v
PHP 5.6.22 (cli) (built: May 26 2016 15:36:45) Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

[root@localhost ~]# which php
/bin/php

[root@localhost ~]# updatedb

[root@localhost ~]# locate httpd.conf
gedit /etc/httpd/conf/httpd.conf
/usr/lib/tmpfiles.d/httpd.conf

[root@localhost ~]# hostname
localhost.localdomain
[root@localhost ~]# hostname -f
localhost

locate php.ini
/etc/php.ini

    /opt/remi/php56/root/etc/php.ini  

   /opt/remi/php56/root/usr/share/doc/php56-php-common-5.6.22/php.ini-development  
   /opt/remi/php56/root/usr/share/doc/php56-php-common-5.6.22/php.ini-production  

   /usr/share/doc/pecl/igbinary/igbinary.php.ini  

   /usr/share/doc/php-common-5.6.22/php.ini-development  
  /usr/share/doc/php-common-5.6.22/php.ini-production  

systemctl restart httpd.service
systemctl restart httpd

load module

gedit /var/wwwenp0s3/html/phpinfo.php
<?php
phpinfo();
?>

ip addr show enp0s3 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'^C
curl http://icanhazip.com

php /var/www/html/phpinfo.php
links http://127.0.0.1/phpinfo.php

http://localhost/phpinfo.php or http://127.0.0.1/phpinfo.php

su -
mkdir /mnt/fw

mount -t vboxsf fw /mnt/fw
ls -alF /mnt/fw

cd /mnt/fw/
sudo rm -R /var/www/html/fw
sudo mkdir /var/www/html/fw

sudo cp -R * /var/www/html/fw
cd /var/www/html/fw/public
sudo cp /mnt/fw/public/index.php .
sudo chown -R $USER:$USER /var/www/html/fw
sudo chmod 755 /var/www/html/fw -R
admin:///opt/lampp/htdocs/fwphp/01mater

This help: ss3@sspc3:/var/www/html/fw/app/v/Info$ cp /mnt/fw/"1_moj_Zend Server VirtualBox.html" .

[http://localhost/fw/**](http://localhost/fw/)**[public](http://localhost/fw/public)

[http://localhost/fw/app/v/Info/01info\_PdoOra\_ver1.php**](http://localhost/fw/app/v/Info/01info_PdoOra_ver1.php)**
http://localhost/fw/app/v/Info/1_moj_Zend%20Server%20VirtualBox.html

Self join msgs paginator http://localhost/fw/public/app/tema/tema.php

7. Enable Remote Connection to Apache HTTP Server (httpd)

-> Open Web server Port (80) on Iptables Firewall (as root user again)

1. CentOS/Red Hat (RHEL)

1. Edit /etc/sysconfig/iptables file:
gedit -w /etc/sysconfig/iptables

2. Add following INPUT rule:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

3. Restart Iptables Firewall:
service iptables restart ## OR ## /etc/init.d/iptables restart

3. Test remote connection
http://your.domain/test.php

-

8a. Install MySQL 5.5 using Yum


yum --enablerepo=remi install mysql mysql-server

service mysqld start

Execute mysql_secure_installation script and follow the wizard. It will prompt for root password.
To get temporary root password check /root/.mysql_secret file

/usr/bin/mysql_secure_installation

Autostart MySQL on boot :
chkconfig mysqld on

Login to MySQL using root access and try to create a dummy db,
root user password is in /root/.mysql_secret :
mysql -u root -p

Create a dummy database using following command.

mysql> create database dummydb;
Query OK, 1 row affected (0.01 sec)

8b. Install phpMyAdmin using EPEL repository


phpMyAdmin is a free open source web interface tool, used to manage your MySQL databases. By default phpMyAdmin is not found in CentOS official repositories, so install it using EPEL repository.

To install EPEL repository, follow the below link:

- [Install EPEL Repository On RHEL/CentOS/Scientific Linux 6]
(http://www.unixmen.com/install-epel-repository-rhel-centos-scientific-linux-6/ "Install EPEL Repository On RHEL/CentOS/Scientific Linux 6")

Now install phpMyAdmin

yum install phpmyadmin -y

**Configure phpMyAdmin**

gedit /etc/httpd/conf.d/phpMyAdmin.conf

Find and comment the whole / section as shown below:

[...]
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>

# <IfModule mod_authz_core.c>
# # Apache 2.4
# Require local
#
# <IfModule !mod_authz_core.c>
# # Apache 2.2
# Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
# Allow from ::1
#

[...]

Open �config.inc.php� file and change from �cookie� to �http� to change the authentication in phpMyAdmin:
cp /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php
gedit /usr/share/phpMyAdmin/config.inc.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]

service httpd restart
http://server-ip-address/phpmyadmin/ access phpmyadmin console
Enter your MySQL username and password which you have given in previous steps (eg �root� and �centos�).

Now you will able to manage your MariaDB databases from phpMyAdmin web interface.

---

10. Install Redis cache on CentOS and Redhat


phpredis extension provides an API for communicating with the Redis key-value store (open source BSD licensed, in-memory data structure store used as database, cache and message broker).

wget http://download.redis.io/releases/redis-2.8.6.tar.gz
tar -zxvf redis-2.8.6.tar.gz
cd redis-2.8.6
make

Once you installed it without any error move two Redis files into the /usr/local/bin/ directory...

cd src
cp redis-server /usr/local/bin/
cp redis-cli /usr/local/bin/

Now time to move default init script and configuration file's.

cd utils/
cp redis_init_script /etc/init.d/redis
cd ..
cp redis.conf /etc/

After that edit the redis.conf file and make certain changes.

gedit /etc/redis.conf

* Set daemonize yes
* Set bind to loop back ip address[127.0.0.1]
* Set logfile /var/log/redis.log default set to /dev/null
* Set pidfile /var/run/redis.pid
* Set LogLevel to Debug to debug issue
* Set the number of databases on a per connection basis. The default value is 0
* Set maxmemory as per requirement.

Now download install and configure phpredis

git clone git://github.com/nicolasff/phpredis.git
cd phpredis
phpize
./configure
make && make install

gedit /etc/php.d/redis.ini
Add extensions redis.so in file:
extension=redis.so

service httpd restart

CentOS 7 minimal and GUI


NOT WORKING: yum groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts" (62 MB to download 169 MB to install)
startx

SEE:

http://www.cyberciti.biz/faq/installing-rhel-epel-repo-on-centos-redhat-7-x/ :

https://wiki.centos.org/HowTos/Virtualization/VirtualBox/CentOSguest :

http://docs.oracle.com/cd/E52668_01/

L:_ISO_ISO\LINUX\oracle_linux\Instalac11gXE_on_oralin7_6.txt

-- not on oralin gksu gedit /etc/samba/smb.conf

https://snapcraft.io/docs/installing-snap-on-red-hat
Canonical https://www.canonical.com/ describes Snap as a universal Linux package which can work on any distribution.

Adding EPEL repository to RHEL >=7.6, less than 8

The EPEL repository can be added to a RHEL 7 system with the following command:

1. sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Adding the optional and extras repositories is also recommended:
sudo subscription-manager repos --enable "rhel--optional-rpms" --enable "rhel--extras-rpms"
sudo yum update

Installing snapd

With the EPEL repository added to your RHEL installation, install snapd package:

2. sudo yum install snapd

Once installed, the systemd unit that manages the main snap communication socket needs to be enabled:

3. sudo systemctl enable --now snapd.socket

Created symlink from /etc/systemd/system/sockets.target.wants/snapd.socket to /usr/lib/systemd/system/snapd.socket
which snap
/usr/bin/snap
To enable classic snap support, enter the following to create a symbolic link between /var/lib/snapd/snap and /snap:

4. sudo ln -s /usr/bin/snap /snap

sudo ln -s /var/lib/snapd/snap /snap

5. log out and back in again or restart your system** to ensure snap’s paths are updated correctly.

Snap is now installed and ready to go! If you're using a desktop, a great next step is to install the Snap Store app.
https://snapcraft.io/docs/installing-snap-store-app
sudo snap install snap-store

If you use a desktop environment, snaps can be more readily discovered, installed and managed from the Snap Store desktop app.
https://snapcraft.io/snap-store
sudo snap install snap-store NOT WORKING

https://itsfoss.com/notepad-plus-plus-linux/
sudo snap install notepad-plus-plus

https://itsfoss.com/notepad-alternatives-for-linux/
sudo snap install notepadqq

https://github.com/atom/atom/releases/tag/v1.45.0
sudo yum install -y lsb-core-noarch libXss.so.1 rpm -ivh Downloads/atom.x86_64.rpm

https://www.unixmen.com/top-10-alternative-notepad-linux/