Skip to content

Instantly share code, notes, and snippets.

View AmrAbdeen's full-sized avatar

Amr AmrAbdeen

  • Egypt, Northern coast
View GitHub Profile
We already support running GlassFish V3 as a service on Solaris 10 and Windows platforms (see my blog). I have been investigating how to provide support for automatically starting GlassFish V3 as a service on Linux. Of course before I can hope to do that -- I must be able to set it up manually. In this blog I will take you through the manual steps needed to run GlassFish V3 as a service on Linux.
This procedure was worked out on my Linux system which happens to be Ubuntu. Other flavors of Linux may have slightly different procedures.
One decision you need to make right up front is what Linux user should "own" GlassFish V3. Typically root is used as the owner. If you choose root as the user you get the advantage that you can use ports < 1024 without complex configuration changes to the system. For this blog I used root.
Here are the steps -- the file named "glassfish" in step 4 is the simple init script which appears at the end of this blog.
Install JDK 6 if needed
Have root install GlassFish like
@AmrAbdeen
AmrAbdeen / Configuring_RESTful_Services
Created September 1, 2015 08:55
How configure RESTful Services in Oracle Application Express. source: https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29159
Configuring RESTful Services
To configure RESTful Services in Oracle Application Express:
Change your working directory to the apex directory where you unzipped the installation software.
Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
run>>
SQL> ALTER system SET CONTROL_MANAGEMENT_PACK_ACCESS='DIAGNOSTIC+TUNING';
SQL> GRANT advisor, administer SQL tuning SET,SELECT any dictionary TO &USER;
SQL> grant advisor to &USER;
SQL> grant administer sql tuning set to &USER;
SQL> exec DBMS_STATS.DELETE_SCHEMA_STATS ('&USER');
--
And show this toturial to help you
@AmrAbdeen
AmrAbdeen / automount_drive
Last active March 6, 2024 23:01
Linux mint | How to automount drive on startup system
To automount drive on startup system
Follow this steps .. | tested on mint 17.2
Go to the Startup Applications..
Write a name for this operation such as "Mount ntfs drives".
Then in command input box, write this
udisks --mount /dev/sda2
to automount the ntfs partition.
Note: You need to replace the /dev/sda2 with your actual NTFS partition number.
@AmrAbdeen
AmrAbdeen / PasswordExpiration11g.txt
Last active April 22, 2019 21:26
Password Expiration in Oracle Database 11g @http://alanarentsen.blogspot.in/2013/02/about-password-expiration-in-oracle.html
Apex Installation Guide you will find the following paragraph:
"In the default profile in Oracle Database 11g, the parameter PASSWORD_LIFE_TIME is set to 180. If you are using Oracle Database 11g with Oracle Application Express, this causes the password for APEX_PUBLIC_USER to expire in 180 days. As a result, your Oracle Application Express instance will become unusable until you change the password.
To prevent this behavior, create another profile in which the PASSWORD_LIFE_TIME parameter is set to unlimited and alter the APEX_PUBLIC_USER account and assign it to the new profile."
Of course with a little help from google you can find out how to do this. I summarized it for you:
First let's see what the limits of the default profile (or the profile of your APEX_PUBLIC_USER) are:
/* --------------------------------------- */
@AmrAbdeen
AmrAbdeen / 503_Service_Unavailable.txt
Created October 15, 2015 12:33
Solved|| Error: 503 - Service Unavailable @https://community.oracle.com/message/13168925#13168925
This is the root cause of your issue.
The apex pool in ORDS corresponds to the database APEX_PUBLIC_USER and it is not correctly configured.
Connect to the SQL Plus prompt with SYS user and SYSDBA privileges and run the following query:
// select username
, account_status
, profile
from dba_users
where username in ('APEX_PUBLIC_USER','APEX_LISTENER','APEX_REST_PUBLIC_USER');
@AmrAbdeen
AmrAbdeen / desc
Last active September 20, 2024 14:01
Fix| Error E:Encountered a section with no Package: header, E:Problem with MergeList
Error “E:Encountered a section with no Package: header, E:Problem with MergeList …….”
Fix it by this steps .. #linux_mint_17.2
1- Clean up..
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get purge
sudo apt-get autoremove -y
sudo rm -fv /var/lib/apt/lists/*
@AmrAbdeen
AmrAbdeen / best_code.txt
Created November 6, 2015 18:41
code best of #oracle_sql
Case 1
I use
COALESCE( v('APP_USER'),USER );
instead of
NVL( V('APP_USER'),USER );
Cause:
More performance.
@AmrAbdeen
AmrAbdeen / Default Apex 5 Main Navigation to Closed.js
Created January 5, 2016 00:59
Default Apex 5 Main Navigation to Closed/Collapsed
Please include the following block of code on all pages in which you want the navbar to always start collapsed by default:
$(window).on("theme42ready", function() {
if ($("body").hasClass("js-navExpanded")) {
$("#t_Button_navControl").click();
}
});
@AmrAbdeen
AmrAbdeen / Update_JAVA_AND_JRE_HOME.bash
Created January 18, 2016 22:39
Update JRE_HOME and JAVA_HOME
sudo update-alternatives --config java