## 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://oralin73/) **[http://localhost/phpinfo.php](http://localhost/phpinfo.php)** **Self join msgs paginator** [http://localhost/fw/public/app/tema/tema.php](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](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](http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html) [OR](http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html) [https://www.virtualbox.org/wiki/Downloads](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](file:///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://edelivery.oracle.com/linux) ([http://www.oracle.com/technetwork/server-storage/linux/downloads/](http://www.oracle.com/technetwork/server-storage/linux/downloads/)) **RIGHT CTRL TO FREE MOUSE !!** * Select Virtual Machine ora11g that you just created. Click on the green Start icon on the top of vbox screen. * Select 'install Oracle linux 7.5' and click Enter key. Select language to use during the installation process. * **Only ora Linux: Select Server with GUI.** Minimal installation option is the installation without GUI. Select :Add ons for selected environment and choose : File and storage server Java platform Network filesystem client Performance tools Compatibility libraries Development tools --- at least this not !!! KDE desktop (installs also Gnome) * Select other buttons (keyboard if not english, partitioning...) ethernet **fwphp75** **enp0s3** GENERAL: Automatic conn. to network **ipv4 :** during installation you will see 2 red warnings indicating that the root password is not set and no users are created - **create root account and user account** * When system reboots, you will be directed to perform the initial setup, click on the checkbox to accept the license agreement and click on the Done button on the top left corner. Click on the FINISH CONFIGURATION button to proceed. do not forget to remove the tick at Boot Order 'CD/DVD'. 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](file:///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/](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](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/](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) [](https://linuxconfig.org/apache-webserver-httpd-service-installation-on-redhat-7-linux) \# 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](https://shi2wei3.github.io/posts/2014-12-03-oracle-11g-xe-on-rhel7.html) [database](https://shi2wei3.github.io/tags/database.html) 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
.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](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](http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/install/apexinst/apexinst_prod.htm) ### How to restart database /etc/init.d/oracle-xe restart Do experiment for Joel Spolsky's The Law of Leaky Abstractions ... [](https://linuxconfig.org/apache-webserver-httpd-service-installation-on-redhat-7-linux) [ ](https://linuxconfig.org/apache-webserver-httpd-service-installation-on-redhat-7-linux) ## 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/#](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](http://www.if-not-true-then-false.com/2012/php-apc-configuration-and-usage-tips-and-tricks/ "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_ 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](http://oralin73/test.php)[/test.php](http://oralin73/test.php) - WORKS !! [192.http://192.168.5.102:8083/test.php](http://192.168.5.102:8083/test.php) - WORKS !! [http://localhost/test.php](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](https://www.if-not-true-then-false.com/2010/enable-apache-userdir-with-selinux-on-fedora-centos-red-hat-rhel/) 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) [ ](https://linuxconfig.org/apache-webserver-httpd-service-installation-on-redhat-7-linux) [ ](https://linuxconfig.org/apache-webserver-httpd-service-installation-on-redhat-7-linux) [https://linuxconfig.org/apache-webserver-httpd-service-installation-on-redhat-7-linux](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](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. [](http://localhost/test.php)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/](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/](https://webtatic.com/packages/php70/) or [https://www.if-not-true-then-false.com/2010/install-apache-php-on-fedora-centos-red-hat-rhel/](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 **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**](http://localhost/phpinfo.php) or [http://127.0.0.1/**phpinfo.php**](http://127.0.0.1/) **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:** [](http://localhost/fw/app/v/Info/01info_PdoOra_ver1.php) **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](http://localhost/fw/app/v/Info/01info_PdoOra_ver1.php) **Self join msgs paginator** [http://localhost/fw/public/app/tema/tema.php](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](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"](http://www.unixmen.com/install-epel-repository-rhel-centos-scientific-linux-6/%20)) 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 #
\#
\# # Apache 2.4 \# Require local \#
\#
\# # 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/](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](http://redis.io/) 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/](http://www.cyberciti.biz/faq/installing-rhel-epel-repo-on-centos-redhat-7-x/) : [https://wiki.centos.org/HowTos/Virtualization/VirtualBox/CentOSguest](https://wiki.centos.org/HowTos/Virtualization/VirtualBox/CentOSguest) : [http://docs.oracle.com/cd/E52668\_01/](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/