Oracle Enterprise Linux Tips

Posted in Unix on May 17th, 2011 by phoenixdigital

OEL comes with some great security features as default. However when your developing these can get in the way.

So here are a few tips to dropping OEL guard when it comes to security.

Read more »

Tags: , , , , , , ,

Linux networking setup and detection

Posted in Unix on May 17th, 2011 by phoenixdigital

A few useful commands to see if your kernel supports your network

lspci -knn
ifconfig -a

cd /etc/sysconfig/network-scripts/

Tags: , , ,

Configuring Samba

Posted in Unix on May 12th, 2011 by phoenixdigital

Generally I setup samba for a group of people to contribute to an area of the server such as /opt/theDirectoryToShare .

Read more »

Tags: , , , ,

Unix OS check and Memory Usage

Posted in Unix on May 4th, 2011 by phoenixdigital

If you want to see what operating system a particular unix machine is running from the command line just use the command
uname -a

To see how much memory is available depends on the operating system.

If top is installed just type ‘top’ in the shell. If however it is not you will need to use the methods below depending on the operating system installed.
Read more »

Tags: , , , , ,

Creating, partitioning, formatting and mounting a new drive in Unix

Posted in Unix on February 9th, 2011 by phoenixdigital

When adding a new disk to a unix machine you need to follow a few simple steps to get it visible on the file system.

Read more »

Tags: , ,

Common Unix Commands

Posted in Unix on November 24th, 2010 by phoenixdigital

Create a simple tar of a directory
tar -cvf /tmp/this.tar /directoryToArchive

Create a gzipped tar of a directory
tar -cvzf /tmp/this.tgz /directoryToArchive

Mount an external USB drive

  1. First plug the drive in and then type
    tail /var/log/messages
  2. look for something like ‘sdd’ which shows the device this drive was assigned to. The number after it is the partition on the drive
  3. Then mount the drive
    mount /dev/sdd1 /tmp/YourMountDirectory

Format External Drive to ext3
mkfs.ext3 /dev/sdd1

Create a user
adduser theUsername

Create a group
groupadd staff

Add existing user to a group
usermod -g staff user1

Add user to sudoers
visudo (Then find the lines that look like below and add it)
theUsername ALL=(ALL)       ALL
Then restart sshd
service sshd restart

Disable plaintext passwords
vi /etc/ssh/sshd_config

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication no

Finding a file by name
find / -name filename.txt -print

Finding a file by containing ‘Gas’
find . -type f -print | xargs grep Gas

Finding all directories in current path
find . -type d

Finding all items in current path with modified time less than 60 mins
find . -mmin -60

Finding all items in current path with modified time less than 1 day
find . -mtime -1

Finding Diskspace On Unix

Posted in Unix on October 31st, 2009 by phoenixdigital

du -xh --max-depth=1  /
du -xh  /

Tags: , ,

Basic vi Commands

Posted in Unix on September 20th, 2009 by phoenixdigital

When editing text files the only stock editor that comes with Unix is vi. While it’s pretty daunting for non-unix people there are really only a few basic commands you need to know.
Read more »

Tags: , , ,