Posts

Showing posts with the label *nix Howto's

NFS-network file Sharing service(server)

NFS: File Sharing in UNIX Networks NFS: File Sharing in UNIX Networks NFS (Network File System) is a protocol used for file sharing within UNIX environments. Windows users typically cannot access these shared files, as NFS is specifically designed for UNIX systems. Key Information Package Name : nfs-utils Service Name : nfs Port Information : NFS does not have a specific port; it relies on the portmapper service, which operates on port 111. To check the status of the portmapper service, use: service portmap status netstat -atnp | grep 111 Configuration Path : /etc/exports Log File : /var/log/messages Sharing Files and Directories To share a file or directory, you need to specify its path in the /etc/exports file using the following format: sharename ID/IP permissions Here are some examples: Read-Only with Sync : /crackers *(ro,sync) This shares the /crackers directory with read-only ...

Using a Self signed Certificate to Run Apache2 under SSL

Generating a Self-Signed Certificate for Apache2 SSL Generating a Self-Signed Certificate for Apache2 SSL This guide will help you create a self-signed certificate to enable SSL for Apache2. While using a commercial certificate is preferable for production environments, a self-signed certificate is suitable for development or testing purposes. Step 1: Enable SSL for Apache First, enable the SSL module in Apache: sudo a2enmod ssl Step 2: Create a Directory for Certificates Next, create a directory to store your self-signed certificate and its associated keys: sudo mkdir /etc/apache2/certificate Step 3: Generate the Self-Signed Certificate Now, generate the keys for your self-signed certificate. You will be prompted to provide some information during this process: sudo openssl req -new -x509 -days 1095 -nodes -out /etc/apache2/certificate/apache.pem -keyout /etc/apache2/certificate/apache.key During this step, you will see output similar to this:...

Nagios on ubuntu

Here’s the HTML version of the rewritten content: ```html In this Scenario We have two machines: one running Ubuntu Server 10.04, which will be used for Nagios monitoring, and another running Ubuntu 10.10, serving as a remote host to be monitored. Both machines have a minimal installation. On the Nagios Server Install Required Packages: root@nagios-ubuntu:~# apt-get -y install ssh php5-gd gcc make build-essential libgd2-xpm-dev libssl-dev Create a User for Nagios: root@nagios-ubuntu:~# useradd -m nagios root@nagios-ubuntu:~# passwd nagios When a new user is created, a group with the same name is typically assigned. However, it's good practice to create a dedicated Nagios group and add the Nagios user to both this group and the www-data (Apache2) group: root@nagios-ubuntu:~# groupadd nagios root@nagios-ubuntu:~# usermod -G nagios nagios root@nagios-ubuntu:...

Playing with Apache TomCat

Apache Tomcat, often referred to simply as Tomcat, should not be confused with the Apache web server. While they are frequently used together, they are separate entities. Apache Tomcat is an open-source servlet container developed by the Apache Software Foundation, implementing the Java Servlet and JSP specifications to provide a "pure Java" HTTP web server environment for Java applications. Installing Apache Tomcat on Linux First, download the latest stable version of the JDK. For this guide, we will use JDK 7. Installing Java SE Development Kit 7 Download JDK 7: [root@centos garbage]# wget http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.rpm Install JDK 7: [root@centos garbage]# rpm -ivh jdk-7-linux-i586.rpm Verify the installation: [root@centos garbage]# java [root@centos garbage]# java -version java version "1.7.0" Java(TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot(TM)...

IPS (Image Packaging system) in Solaris 10

In Standard Solaris, IPS is exclusively a feature of Oracle Solaris 11. While Oracle Solaris 10 provides some tools to achieve similar functionality, their use in production environments raises questions about reliability. Historically, package installation in Solaris has been challenging. Fortunately, some solutions now provide IPS-like functionality: 1. OpenCSW To utilize IPS functionality with OpenCSW in Oracle Solaris 10, follow these steps: Download the package from: http://mirror.opencsw.org/opencsw/current/i386/5.10/pkgutil-2.4%2CREV%3D2011.05.15-SunOS5.8-i386-CSW.pkg.gz Unzip the downloaded package: gunzip pkgutil-2.4,REV=2011.05.15-SunOS5.8-i386-CSW.pkg.gz Install the package: pkgadd -d pkgutil-2.4,REV=2011.05.15-SunOS5.8-i386-CSW.pkg Fetch the latest catalog: pkgutil --catalog Install any package with all dependencies: pkgutil -i vim 2. BlastWave To achieve IPS functionality ...

Playing with Solaris Zones

Solaris supports operating system-level virtualization, allowing you to run only Solaris in virtual hosts, utilizing the same kernel copy as the parent OS. This results in high performance, with overhead degradation typically between 1-3%. Zones There are two types of zones: Global/Parent Zone (Base OS) Non-Global Zones Key Points about Zones: A single machine can host up to 8192 zones. Zones do not support graphics. Zones are not installed from DVD or other media; they are created from the parent OS. It is common not to run services on the Global Zone, as its failure affects all Non-Global Zones. Types of Non-Global Zones: Whole Root Zone : This contains a complete Solaris OS. It's slower and generally not recommended for production as it acts as a full replica of the Global Zone. Spare Root Zone : This type shares parts of the Solaris OS with the parent zone, offering faster performance since only essential c...