Archive

Archive for the ‘Linux’ Category

SLES 11 SP1 Hangs on Boot with Oracle Listener

February 3rd, 2015 Comments off

Every once in a while you might experience boot issues if you have configured Oracle to automatically start the listener, instance and agent in the /etc/sysconfig/oracle.

There might be few reasons for this to happen.

In my case after some troubleshooting I noticed that the tnsnames.ora file was configured to use an IP address rather than hostname.

Read more…

Categories: Database, Linux, Oracle, SLES Tags:

MacOSX+SSH+SOCKS+Proxy

March 1st, 2014 Comments off

Here is how you connect your mac to an ssh server and establish Dynamic port forwarding allowing you to browse safely.

1. Open Terminal

2. st0ma:~ st0ma$ ssh -D 8080 st0ma@codero.soteks.org
Authenticate with your ssh user credentials.
3. In your browser of choice, setup the advanced network settings to use a socks proxy
on localhost (or IP 127.0.0.1) and port 8080 as we issued in the Dynamic forwarding in point 2.

Read more…

Categories: Linux, MAC, SSH Tags:

Add Domain Name to Hosting on Plesk CLI

June 12th, 2012 Comments off

Hello Dear Readers,
It is the Summer season and I finally have more time to post stuff right after I do it.
Today I had to create a new domain in hosting under Plesk control panel command line and since I never kept notes for the previous times I did it, I had to undergo some documentation reading.
The best resources online are provided by Parallels themselves. It is one of the most well documented APIs that I have come across in the hosting world, have to give them that!
The URL is http://download1.parallels.com/Plesk/PP10/10.1.1/Doc/en-US/online/plesk-unix-cli/index.htm
All I had to do is issue the following two commands in order to create the domain in hosting and then to create a database related to it:

1. Creating a new domain name in Hosting on Plesk CLI

[root@216-55-186-14 bin]# /usr/local/psa/bin/domain --create domainname.me -owner Client1 -ip 216.55.186.14 -status enabled -hosting true -hst_type phys -dns false -login domain_user -passwd temp_pass -shell /bin/bash -cgi false -php true -php_safe_mode true

Read more…

Categories: Linux, Plesk, SSH Tags:

ls xargs rm

June 4th, 2012 2 comments

I keep forgetting the proper xargs arguments when I need them.
My intention today was to list old backup files based on the year time stamp and remove them.
Here is the one liner that works specifically because I have named my backups with the dd-mm-yyyy convention:

[root@webserver1 httpd]# ls -latf|grep 2009|xargs -L 1 rm

Here is a better approach that is independent from the file naming convention:

Read more…

Categories: Linux, SLES, SSH Tags:

PLESK 10 Domain Disabled

January 30th, 2012 4 comments

Yeah, that’s the reason for the domain being disabled for such a long time.
The hosting service for the blog is gently provided by a dear friend of mine however none of us noticed that my subscription for the control panel has expired few days back and this turned the website to the plesk parking page. Anyways we’re back online but let me share a valid experience on enabling domain service through the plesk API.

1. make sure you check the domain status
/usr/local/psa/bin/domain -i soteks.org

From the result of the above check the Domain status and Domain Expiration Date:

Read more…

Categories: Linux Tags: , , , ,

mysqldump all databases on mysql

February 20th, 2011 2 comments

I was wondering for a few minutes if I can easily backup all databases created by users on a mysql database server. I was trying to automate the process regardless of users creating new databases without my knowledge. I was aware of the convention under which mysql stores the separate databases on the filesystem so I gave it a try.
Fist I tried with few ‘ls’ commands to retrieve the folder names which respectively referred to the database names in the mysql server. On FreeBSD here is the command I used:

[root@bsdbox08 ~]# find /var/db/mysql/ -type d
/var/db/mysql/
/var/db/mysql/mysql
/var/db/mysql/db1
/var/db/mysql/performance_schema
/var/db/mysql/db2

Here I decided not to mysqldump the mysql database and the performance_schema so I changed the command slightly by adding sed and grep to it.

Read more…

Categories: Database, Linux, mysql Tags:

SSH Tunnel + SOCKS Proxy Browsing

May 23rd, 2009 4 comments

This article I create for my personal reference since I tend to forget things such as names, addresses, SSH Tunnel configurations, severe acts of nature and so on…

Concerning Tunnels:

A tunnel is usually an underground passage from one place to another. Why is there a reason to go through a tunnel instead above ground I can’t really answer in general, but I sure know why I have to use tunnels in my daily IT routines.
The tunneling allows me to deliver payload securely and also allows me to access resources that are otherwise restricted from my location.
The example below demonstrates the setup of an SSH Tunnel that is used for simple internet browsing.

Read more…

Categories: SSH Tags: ,

Extending VMDK file and resizing the partition – SLES 10 Linux

April 7th, 2009 Comments off

1. ESXi 3.5 Extending the VMDK file [Virtual Machine Hard Disk]

The main reason behind this is the fact that I needed more space for 2 more Oracle databases on a SLES10 Linux system. The partition mounted on /u01 was initially created as 21GB but I quickly depleted the space with 3 oracle 10g databases that took more than 17GB and the space left was not sufficient for the 2 new databases that I had to create.

Before I advanced with the extension of the VMDK file I connected to each separate instance and performed “shutdown immediate” command as sysdba.
Then I stopped the listener, dbconsole, isqlplus and once I confirmed that no oracle related processes were present on the system I performed a shutdown “shutdown -h now”.

In order to extend an existing hard drive attached to a virtual machine you have to make sure no snapshots of the virtual machine are present. I know that this is quite uncomfortable considering the risky operation that you are about to perform but there is a work around. (The work around is not in this post, so please let me know if you are interested or simply search for it. There is a good chance that I will have an article concerning that topic)

Read more…

Arcconf Bash Reporting Script

February 24th, 2009 4 comments

Monitor your RAID Controller at all times!
There is no need to tell you that Monitoring your RAID is of great importance.

Another important thing that I would like to say is that RAID is Not a Backup solution.

So just don’t use it is one or the chances are you will recall these words with bitter regret when you least expect it.
The above sounds like a curse, doesn’t it 🙂
And “when you least expect it” could be an uncomfortable period time for you [no internet, vacation to a deserted destination with no network coverage what so ever, no laptop or mobile device that could allow you to react,… here you can let your imagination lose for a moment and you might get a grasp of all the bad moments to have a RAID problem, or any other problem with your service but this article focuses on the RAID…]

Read more…

Categories: Linux, SLES, SSH Tags: , , , , ,

Oracle 10g RAC on ESXi3 using SLES9 SP5 – Part 10

February 20th, 2009 3 comments

When I finished the clusterware install in the lab environment I have continued with the database software itself but it appears that I needed a VMware ESXi Update 3 required! The kernel version of SLES failed verification and upon an upgrade of the kernel through YAST both machines were unusable since they would not boot.

This is an obstacle until completed since I can’t continue with the How-to until this is done.

In Part 9 of the Oracle RAC How-to we have completed successfully the installation of the Oracle Clusterware services on the shared storage for the two Suse Linux Enterprise Server 9 SP5 nodes.

Read more…