How to get version of Redhat & Oracle Enterprise Linux

Oracle Enterprise Linux: more /etc/enterprise-release, example output: “Enterprise Linux Server release 5.5 (Carthage)”

Redhat: more /etc/redhat-release

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

How to enable & force HTTPS on Apache2 Web Server on Ubuntu

HTTPS Configuration (with self-signed certificate)

“sudo a2enmod ssl”

“sudo a2ensite default-ssl”

With Apache2 now configured for HTTPS, restart the service to enable the new settings:

“sudo service apache2 restart”

Source: https://help.ubuntu.com/10.04/serverguide/httpd.html

To force https:

Enable mod_rewrite:

"sudo a2enmod rewrite"

Then add the following to “/etc/apache2/sites-available/default” (first thing after <VirtualHost *:80>):
RewriteEngine   on
RewriteCond     %{HTTPS} !=on
RewriteRule     ^(.*)$ https://%{HTTP_HOST}/$1 [L,R]

Finally restart your Apache2 Server again (or force-reload it if you wish):

“sudo service apache2 restart”

Source: http://www.linode.com/wiki/index.php/Apache2_SSL_in_Ubuntu

 

 

Posted in Uncategorized | Tagged , , , | 1 Comment

How to install basic GUI on Ubuntu Server and access it via VNC

For those who need basic & light-weight GUI for their Ubuntu Server, you can do the following:

“sudo apt-get install xorg openbox”

To easily access it via VNC:

“sudo apt-get install tightvncserver”

To start your VNC server, simply type:

“vncserver”

Then you can access this VNC server via any VNC client, such as Remmina with the following server info:

“servername:1” (for the first vncserver, replace 1 by a corresponding number as necessary)

If a password is required and the server didn’t prompt you for it, simply run:

“vncpasswd”

After you’re done, don’t forget to kill your VNC server via the following command:

“vncserver -kill :1” (replace 1 by a corresponding number as necessary)

All the above packages take very little resources from your server, for example they all take around 100 MB of storage only!

Source: https://help.ubuntu.com/community/ServerGUI

Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

How to manually modify DB initialization parameters by creating pfile from spfile

pfile is the initialization parameters of DB in plain text, while spfile is the binary one, so to be able to change it, you have to:

  1. Extract the pfile from the spfile:
    “create pfile=’my_path/file_name.ora‘ from spfile;”
  2. Shutdown the DB:
    “shutdown immediate;”
  3. Edit the pfile applying the new parameters with “vi”, “notepad” or any plain text editor
  4. Startup the DB from the pfile:
    “startup pfile=’my_path/file_name.ora‘;”
  5. Generate spfile from pfile:
    “create spfile from pfile=’my_path/file_name.ora‘”

Source: http://www.dba-oracle.com/concepts/pfile_spfile.htm

Posted in Oracle | Tagged , , , , , , | Leave a comment

How to start the X server at boot with Redhat or Oracle Linux

vi /etc/inittab

Edit your /etc/inittab file by replacing the line:

id:3:initdefault:

With this one:

id:5:initdefault:

and reboot

Enjoy!

Source: http://www.redhat.com/support/resources/faqs/rhl_general_faq/s1-xwin-q.html

Posted in Uncategorized | Tagged , , , , , , | Leave a comment