Monday 29 May 2017

Important Linux TCP/IP Port Number

Please find the below complete list of TCP/IP port number in Linux system.

➤ 20- FTP ( File Transfer Protocol) -It is used for transfer the data using ftp connection

➤ 21- FTP Control - It is used this port for ftp connection.

➤ 22- SSH (Secure Shell)- It is used for connecting the secure shell which using SSL encryption.

➤ 23- TELNET - It is used for insecure remote connection.

➤ 25- SMTP (Simple Mail Transfer Protocol)- It is used as a mail transfer agent for email server.

➤ 53- DNS (Domain name system)- It is used for translate the domain name to IP address.

➤ 67- BOOTP (Bootstrap Protocol)- Used for automatically assign the IP address to network device.

➤ 68- DHCP (Dynamic host configuration protocol)- It is a network protocol to enable a server to automatically assign an IP address to system.

➤ 69- TFTP (Trivial file transfer protocol)- Used this protocol in PXE Boot services.

➤ 80- HTTP ( Hypertext Transfer protocol)- Used for WWW web connection.

➤ 88- Kerberos Protocol

➤ 110- POP3 (Post Office Protocol)- Used as a mail delivery agent.

➤ 113- XINETD (Extended Internet Daemon)

➤ 115- SFTP ( Secure File Transfer Protocol)

➤ 123- NTP (Network time protocol)- Used for time syncing uses UDP protocol

➤ 137- NetBIOS (Network basic Input/Output system)

➤ 139- NETBIOS-SESSION Service

➤ 143- IMAP (Internet Message Access Protocol)

➤ 161- SNMP (Simple Network Management Protocol)- Used for network monitoring.

➤ 389- LDAP (Lightweight Directory Access Protocol)

➤ 443- HTTPS ( Hypertext Transfer protocol secure)- Used with SSL encryption.

➤ 445- SMB (Server Message Block or SAMBA)

➤ 514- Syslogd (udp port)

➤ 840- NIS (Network Information Service)

➤ 873- rsync Used for file synchronization.

➤ 990- FTPS (File transfer protocol secure)

➤ 993- IMAPS ( For Secure Connection)

➤ 995- POP3s ( Mail delivery agent with secure connection)

➤ 2049- NFS ( Network file sharing)

How to shrink or reduce MySQL ibdata size in Red Hat Linux server

MySQL database is widely use database server, but sometimes you are facing an ibdata size issue on the database server.

Normally this ibdata size error occur while you are trying to start the MySQL database services. So to resolve such type of error this post is very useful. Here, I would explain to you how to shrink MySQL ibdata size in Red Hat Linux operating system.

➦ Before doing anything in database I would suggest to you take a backup of existing database so in case of any issue, we will restore the previous backup.

Please find the below command using which you need to take a backup of MySQL database. You must remember you need to take full backup which consist triggers, routines and all tables.

[root@localhost]# mysqldump --lock-all-tables --triggers --routines -u user_name -p -h server_name database_name > /home/backup.sql

Using above command you can take a complete MySQL backup on your linux machine.

➦ Now you need to drop all database on the server except default MySQL schema.

➦ Once you drop all existing database, stop the MySQL service and make it disable permanent. Please find the below command to stop the MySQL services on server.


[root@localhost]# /etc/init.d/mysql stop
[root@localhost]# chkconfig mysql off

For RHEL7 you need to use "systemctl" command to stop the MySQL running service. The above example command are valid in lower version on RHEL7.

➦ You need to change the configuration setting in MySQL configuration file, which is generally located in /etc directory.

[root@localhost]# vi /etc/my.cnf

[mysqld]
Innodb_file_per_table
Innodb_flush_method=0_DIRECT
Innodb_log_file_size=1G
Note: Whatever you’re set for innodb_buffer_pool_size, make sure innodb_log_file_size is 25% of innodb_buffer_pool_size.

➦ Please delete the ibdata1, ib_logfile0 and ib_logfile1 from the MySQL library location. At this point, there should only be the MySQL schema in /var/lib/mysql

Now take a restart of MySQL service again and recreated the ibdata1 and ib_logfile0 again and restore the MySQL backup again.

Sunday 28 May 2017

How to find MP console IP address from the running HP-UX Operating system

This post is useful to identify the MP console IP address from the running HP-UX OS, if you forgotten the existing IP address.

For Itanium systems running 11.31 version only we can use smh and the cprop command. These both method works to recover the forgotten password.

cprop is what the smh webpage uses to retrieve the IP address. Run the smh webpage (hostname:hp_ux)

Home -> System -> Management Processor

It is show you the IP address of console port. Also please find the below "cprop" command usage, how to we run this command.

hp_ux:/>/opt/propplus/bin/cprop -summary -c “Management Processor”

[Component]: Management Processor
[Table]: Management Processor
——————————————————-
****************************************************
                   [Hash ID]: Management Processor:11a64d1ax41eed6da
                    [Status]: OK
                 [IPAddress]: 192.168.1.23
                       [URL]: https://192.168.1.23
                     [State]: Enabled
****************************************************

For PARISC boxes and Itanium models running 11.23 or earlier, you must use the serial port on the back of the box. The commands will be:

ctrl-a (to get the attention of the console interface)
<login> typically Admin and Admin
CM (to get to the command menu)
LC 
MA (to exit the CM menu)
X  (to exit the GSP or MP menu)

You can connect the MP console using serial cable, in every HP-UX server are consist this port. Connect the serial cable from one end of server MP port and other side connect to laptop. When you login on the MP console you will get the above option on the server.

How to add a new disk on Logical Volume Manager (LVM) in AIX Operating System

AIX logical volume manager (LVM) is a widely used tool for logical volume management which includes allocating disks and resizing logical volumes.

Using logical volume manager, a hard disk or set of hard disk is allocated to one or more physical volumes. Logical volume manage (LVM) allows users to create partitions from more than one disk and allows them to extend the filesystem size online within few seconds.

In below text, you can find how to add a new drive in AIX operating system using LVM.

Step by step method to add a new disk on LVM:

➤ Initially we need to add the new physical or virtual disk to the logical partition. After successfully adding virtual disk you need to re scan your server hardware so we can get the new disk information.

For scanning please run the below command on AIX server terminal.

ibm_aix:/> cfgmgr

The command output show you the available new disk which are connected to this AIX machine.

➤ Let’s assume that the new disk is hdisk01,please run the below command to check the disk.

ibm_aix:/> lsdev -Cc disk
hdisk00  Available  Virtual SCSI Disk Drive
hdisk01  Available  Virtual SCSI Disk Drive

In above output two disk is available hdisk00 & hdisk01.

➤ You need to create a new group and move the new disk hdisk01 in there. Let's assume the new group named is "rootvg". So please find the below command to create a new group and add the disk in it.

ibm_aix:/> mkvg -y rootvg hdisk01

in this step we add "hdisk01" into "rootvg".

➤ "lspv" command is used for getting an information about the new disk "hdisk01". Please find the "lspv" command output as given below.

ibm_aix:/> lspv hdisk01
PHYSICAL VOLUME:    hdisk01                   VOLUME GROUP:     rootvg
PV IDENTIFIER:      00f68f03d1e42951 VG IDENTIFIER     00f68f0300004c0000000153d1e429c1
PV STATE:           active
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            128 megabyte(s)          LOGICAL VOLUMES:  17
TOTAL PPs:          799 (102272 megabytes)   VG DESCRIPTORS:   2
FREE PPs:           118 (15104 megabytes)    HOT SPARE:        no
USED PPs:           681 (87168 megabytes)    MAX REQUEST:      256 kilobytes
FREE DISTRIBUTION:  11..00..00..00..107
USED DISTRIBUTION:  149..160..159..160..53
MIRROR POOL:        None

If you look the above output you can see the all information regarding the new disk in details.

➤ In this step, you need to create a log logical volume for jfs2 file system and this needs to be part of volume group "rootvg".

ibm_aix:/> mklv -t jfs2log rootvg 1

➤ Please check the new logical volume (lv) and  used the "lsvg" command to check the new logical volume present on the AIX server.

ibm_aix:/> lsvg
rootvg

The command shown you he existing logical group on the server.

ibm_aix:/> lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       1       1    closed/syncd  N/A
hd6                 paging     404     404     1    open/syncd    N/A
loglv00             jfs2log    1       1       1    open/syncd    N/A
hd4                 jfs2       4       4       1    open/syncd    /

In above output, you can see "rootvg" is volume group present and in rootvg, you can find the logical volume "loglv00".Now we create a logical volume and fixed their size , lets assume we will used 20GB size and used the logical volume name lv_aix.

ibm_aix:/> lsvg rootvg
ibm_aix:/> mklv -t jfs2 -y lv_aix rootvg 30G
ibm_aix:/> mkfs -o log=/dev/loglv00 -V jfs2 /dev/lv_aix

➤ After successfully create filesystem, we will mount the filesystem to a particular folder.

ibm_aix:/> mkdir /aix
ibm_aix:/> mount -o log=/dev/loglv00 /dev/lv_aix /aix

So, nwly "/aix" filesystem has been created, for permanent it, please make an entry in "/etc/filesystems file. So when you will take a reboot of machine the filesystem not umount.

Please comment on the post, if you have any query regarding this topic.

Thursday 25 May 2017

How to increase the file system size in Solaris 10/11 operating system

When you file system get full on Sun Solaris operating system , you need to increase it but on Solaris platform it is quite different from other unix operating version.

The below method are used for both type of Sun Solaris version 10/11. You can used the same command on different version platform.

➤ Mostly on Solaris 10/11 machine we have only use default storage pool. if you server is not connected to any SAN, then zpool name should be "rpool".

If you want to check which zpool are present on the Solaris box, you can run the below command for this work.

!-[solaris]# zpool status

Using the above command you can check which zpool storage are present on the solaris server. In my case my Solaris box is connected to SAN storage, so it is display both system default "rpool" & "san" storage system.

➤ Let's suppose you want to increase the size of root file system on server, then first you need to check the current disk space on the filesystem.

To check the current file size of filesystem you can use "df -h" command. This command will show you the filesystem size in correct manner.

On my Solaris box the root filesystem was created with rpool storage, so if I need to increase or extend the size of root filesystem I need to take space from this zpool.

For example, If you want to 5 Gb more space on root filesystem then please use the below command to extend the root filesystem size more 5 Gb. In my case my current root filesystem size is 12Gb so I will extend it to 17 Gb.

!-[solaris]# zfs set quota=17G rpool/ROOT/solaris-1

You can add the 5 Gb space in your current size (12Gb).

!-[solaris]# zfs set reservation=17G rpool/ROOT/solaris-1

In above command you can reserve the 17G space to root filesystem. You can check the new filesystem space using "zfs get quota" command.

Please comment on the post if you are facing any issue regarding the filesystem.

Kernel Panic Error - not syncing: VFS:Unable to mount root fs on unknown-block(0,0)

Kernel Panic crash your system if it is occur. In Unix system, normally such kernel panic occur while we are upgrading the kernel or firmware of any Unix operating system.

In simple words, its look like a blue screen when occur on your personal laptop etc. but if we talk about Unix, the below error message appear during boot time.

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Pid: 1, comm: swapper Not tainted 2.6.32-502.el6.x86_64 #1
Call Trace:
[<ffffffff815292bc>] ? panic+0xa7/0x16f
[<ffffffff81c2b432>] ? mount_block_root+0x216/0x2cb
[<ffffffff81002930>] ? bstat+0x2b0/0x980
[<ffffffff81c2b53d>] ? mount_root+0x56/0x5a
[<ffffffff81c2b6b1>] ? prepare_namespace+0x170/0x1a9
[<ffffffff81c2a92a>] ? kernel_init+0x2e1/0x2f7
[<ffffffff8100c20a>] ? child_rip+0xa/0x20
[<ffffffff81c2a649>] ? kernel_init+0x0/0x2f7
[<ffffffff8100c200>] ? child_rip+0x0/0x20

when such above error occur that means your system is in dangerous state and if you not rectify this issue you may lost your data as well. 

We will provide to you one of cause and solution of this error, why it is occur and how we can resolve it.

In one of case, above error message occur when you upgrade your kernel and by mistake if it is not properly upgrade then kernel version get different with previous one.

For resolving this issue you need to boot you unix machine in grub mode. You can take a reboot of server and press any key once the boot screen appear. In the below screen it is showing different option, please select the grub menu option.

In grub mode, check the kernel and initrd parameter, if both parameter kernel version and initrd version are not matched that's means this is the root cause. So you need to correct the kernel version and make a same version entry and boot the operating system after saving the grub entry for temporary purpose.

To fix the permanent this issue, you need to change the kernel version in grub.conf file otherwise once you take a reboot of server again, you have to face same issue. So avoiding such issue again, please correct the version in grub configuration file.

[root@localhost]# vi /etc/grub.conf
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS 6 (2.6.32-504.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/vstorage-root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vstorage/root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
        initrd /initramfs-2.6.32-504.el6.x86_64.img

Please do same version entry on bold highlighted place. The kernel version should be same at kernel and initrd line. After changing the entry save the entry and take a reboot of server again to check the kernel panic problem again occur or not.

Wednesday 24 May 2017

Best Practical examples of RPM commands in linux

Basically Red Hat Package Manager (RPM) are a package management utility which are used for install, update , uninstall, query and verify of packages in Linux system like (RHEL,CentOS and Fedora).

Please find the below practical examples of rpm commands in Linux operating system.

➤ How to install an RPM packages.

To install the packages on Linux operating machine, please use the -i option for install. Please find the below example for installing the rpm.

[root@localhost]# rpm -ivh jdk-6u37-linux-amd64.rpm

Using above command you can install the rpm on linux operating machine. In the above command, -h print the has mark stat that package is archived and -v used as a verbose for better display.

➤ How to install an RPM packages without dependencies.

To install the packages on linux machine, please use --nodeps option. Please find the below example for installing the rpm without dependencies.

[root@localhost]# rpm -ivh --nodeps ftp-2.7.9-5.el6.2.i686.rpm

In above example, all the dependencies for installing the ftp server has been ignored.

➤ How to check a RPM signature.

To check the PGP signature of any rpm , please use the below command. This signature process is used for verification of the origin of rpm.

[root@localhost]# rpm --checksig jdk-6u37-linux-amd64.rpm

Using above command you can verify that the origin of installing rpm is valid. Normally this command is used before installing the rpm.

➤ How to check all installed rpm on Linux server.

To check the all installed rpm's on the linux machine, please use -q option. Please check the below example for checking all list.

[root@localhost]# rpm -q samba

Using above command you can find the all installed rpm related to packages.

➤ How to check recently installed RPM.

 To check the recently installed rpm, please use the -qa (query all) option. Please find the below example to check the recently installed rpm.

[root@localhost]# rpm -qa --last

The above command show you the list of all recently rpm in sequence of installation order. 

➤ How to list all installed RPM.

To check and print the list of all installed rpm on linux machine, use the below command.

[root@localhost]# rpm -qa

Command output show you the list of all installed packages on the linux machine.

➤ How to Upgrade a RPM Package.

If you want to upgrade already installed rpm on the linux machine, please check the command which is used in below example.

[root@localhost]# rpm -Uvh ftp-2.7.9-5.el6.2.i686.rpm

Here, -U option is used for upgrading the rpm packages which are installed on the linux machine.

➤ How to Remove a RPM Package.

To remove the package from linux server, you can use the -e option. Please find the below command with an example to remove the packages.

[root@localhost]# rpm -e ftp-2.7.9-5.el6.2.i686.rpm

You can use the below command syntax as well for removing the package from the linux machine.

 [root@localhost]# rpm -ev ftp

In last example, all the package dependencies are also removed with this command syntax.

➤ How to Remove a RPM Package without dependencies.

Please use the below command to remove a rpm package without removing any dependencies.

[root@localhost]# rpm -ev--nodeps samba

here, -nodeps command used for removing the package without any dependencies.

➤ How to query a information of Installed RPM package.

If you want to get all information regarding the installed rpm package, please use the -qi option. Please find the below example to query the information of installed rpm.

[root@localhost]# rpm -qi samba

Above command display all the information related to samba packages.

➤ How to verify a RPM package.

To verify a rpm package, please use the -Vp (Verify Package) option. Please check the below example to verify the package.

[root@localhost]# rpm -Vp ftp-2.7.9-5.el6.2.i686.rpm

Using this command you can verify the package.

Please let me know, if you have any concern regarding this topic.

Monday 22 May 2017

Basic HP-UX Commands for Logical Volume Manager (LVM)

This post is useful for those users which are beginners on HP-UX platform. They can easily find all the basic command which are required for creation a file system using logical volume manager (LVM).

Concept of LVM are same in all Unix operating system. LVM is basically used for disk management in operating system that allow to manager the physical disks and logical volume. Here, I will provide to you all basic HP-UX commands.

Basic Commands of HP-UX LVM: 

⏩ How to create a new volume group, logical volume and file system on HP-UX operating system
 
For creating a new physical volume group on HP-UX system, please use the below method.

hpx:/>pvcreate /dev/rdsk/c2t1d1

"Pvcreate" command is used for creating a physical volume on operating system.
⏩ How to create a volume group on HP-UX operating system.

For creating a volume group, first we need to create a directory which we used as a volume group. In my case I will use my volume group name "vstorage" so I need to create a directory with name of vstorage.

hpx:/>mkdir /dev/vstorage
hpx:/>mknod /dev/vstorage/group c 64 0x010000

Once you create a directory, then please create a new volume group with the available disk c2t1d1.

hpx:/>vgcreate /dev/vstorage /dev/dsk/c2t1d1

⏩ How to create a logical group on HP-UX operating system.

When you successfully create a new volume group "vstorage" as describe in above step, we will create a logical group as describe below.

hpx:/>lvcreate -L 2048 /dev/vstorage

If you see the above command we have created a 2 GB size of logical volume.

⏩ How to create a filesystem on HP-UX operating system.

When you successfully created a new logical volume group, then we will create a new file system with the help of VG and LV.

Please find the below command to create a filesystem on HP-UX operating system using LVM.

hpx:/>newfs -F vxfs -o largefiles /dev/vstorage/vg_vstorage

Note: Here, we used "vstorage" as a VG and vg_vstorage as a LV. Now we will create a directory where we mount the new LV.

hpx:/>mkdir /hpux
hpx:/>mount /dev/vstorage/vg_vstorage /hpux

Now, your new file system "/hpux" has been created with the help of LVM. You can mount the file system permanently in filesystem configuration file, so once you take a reboot of server, your file system will not disappear.

Please comment on the post, if you are facing any issue regarding this topic.

Sun Solaris 11 failed connect to studio repo connection refused error

On Solaris server when you are trying to download the packages from the oracle repo server then sometimes you are facing a connection refused error.

Sun Solaris 11 failed to connect the studio repo during downloading the packages online from Oracle server. You can find the error message which you are getting normally on the Solaris server.

!-[solaris]# pkg install pkg://solaris/x11/diagnostic/x11-info-clients

pkg: 1/3 catalogs successfully updated:
Unable to contact valid package repository
Encountered the following error(s):
Unable to contact any configured publishers.
This is likely a network configuration problem.
Framework error: code: 7 reason: Failed connect to studio-repo.oracle.com:1008; Connection refused
URL: 'http://studio-repo.oracle.com' (happened 6 times)

Framework error: code: 7 reason: Failed connect to solaris-repo.oracle.com:1008; Connection refused
URL: 'http://solaris-repo.oracle.com/versions/0/'
any suggestion ??


If you see the above error you can see that when I try to install the X11 info clients packages on the server, I am getting a framework error which describe that failed to connect with Solaris repo.

Normally , user afraid with such type of error while working on it but I believe its very small error and get resolved in two steps.

Just go through my below solution which is very useful for such type of error troubleshooting.

You need to check the pkg services on the Solaris operating system, please check they are enable or not on the server.

!-[solaris]# svcs \*pkg\*
STATE          STIME    FMRI
disabled       May_22   svc:/application/pkg/dynamic-mirror:default
disabled       May_22   svc:/application/pkg/mirror:default
disabled       May_22   svc:/application/pkg/server:default
online         13:27:09 svc:/system/pkgserv:default
online         13:27:09 svc:/application/pkg/zones-proxy-client:default
online         13:27:09 svc:/application/pkg/repositories-setup:default

If you see the above pkg service result , lot of service related to packaging system are disable, so you need to restart the all disable and enable service then after again start to install the package.

Please post your comment on my blog, if you have any query related to this topic.

Sunday 21 May 2017

Step by Step method to enable SAR (System Activity Reporter) on Solaris Server

When you work on Solaris operating system, you need to managed the performance of the operating system. If the performance are very good then your server behave normal and run the long time without any issue.

Sometime your Solaris server performance is not good and memory and resource utilization get very high, then you need to find out what is the cause of this high utilization and if you are working on client project then your client must want the report.

So on Solaris server we are used SAR (System Activity Reporter) to generate all the report related to server health.

SAR (System Activity Reporter) is used to troubleshoot the performance issue on Sun Solaris Servers. Using SAR (System Activity Reporter) we can troubleshoot or monitored the disk, memory or CPU performance issues on the Solaris operating system servers.

Step by step procedure to enable SAR (System Activity Reporter):

⏩ By default SAR utility are installed on the Solaris 11 operating system. If you want to check the current service status of SAR, then you need to run the below command.

!-[solaris]# svcs status sar
disabled        May_22  svc:/system/sar:default

You can used also below command to check the current status of SAR services.

!-[solaris]# svcs -a | grep -i sar
disabled        May_22  svc:/system/sar:default

In above command output, if you see currently the sar service is disable so in the next step we need to enable this service

⏩ In this step, you need to enable the SAR services which is disable on the my solaris server.

!-[solaris]# svcadm enable svc:/system/sar:default

Using above command the SAR service has been started, if you want to check the current status please run the below command.

!-[solaris]# svcs status sar
enabled        May_22  svc:/system/sar:default

⏩ We will make a setup for automatic data collection, once we enable the sar service. The default script for SAR utility are located the below directory location.

/usr/lib/sa/sa1➤ This is a shell script to collect and store data in the binary file /var/adm/sa/sadd, where dd is the current day.

/usr/lib/sa/sa2➤ This is a  shell script for generating daily report in the file /var/adm/sa/sardd, where dd is current day.

As these above script are used normally to collect the automatically data from Solaris Server. If you required the daily report or weekly report then you need to add both the script in crontab file which is describe in next step.

⏩ If you required the SAR report regularly then you need to make an entry of above script on the crontab file.

!-[solaris]# crontab -e

Using these command you can edit the existing file and make an entry of above script according to your requirement when you want to generate the report.

Please comment on my post, if you have any query related to this sar topic.

Saturday 20 May 2017

How to add a fake dummy null printer in linux machine

Their are several way to configure the printer in linux operating system like Red Hat Linux, CentOS etc. You can configure normal local printer with any of these operating system very easily but if some one asked you to configure the fake dummy null printer with linux system, then its goes tricky.

Here, you can find the step by step simple solution of tricky issue. To configure the null printer in linux not much complex but you have to knowledge about the basic command of how to add a printer.

Before moving the main topic we need to know about the package installation system on linux servers. Generally YUM utility and rpm package manager are used for installation of required package of printer.

You can check my below link , how to configure YUM server on linux operating system.

https://unixforsolutions.blogspot.in/2017/05/how-to-configure-yum-server-in-red-hat_14.html

Once you go with my above link you can get an idea about how yum server is configure. So now we will go to main topic.

➤ Initially you need to install the required packages to configure the null printer. Please refer the below command to install the rpm.

[root@localhost]# yum install system-config-printer*

Cups is also required for printer configuration , so please use the below command to install cups services package.

[root@localhost]# yum install cups*

➤ Once the printer packages are installed then start the cup services on the server. Please use the below command to start the cup service.

[root@localhost]# systemctl start cups

You can check the status of cups services using below command.

[root@localhost]# systemctl status cups
cups.service - CUPS Printing Service
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
Active: active (running) since SAT 2017-05-20 14:34:11 IST; 4s ago

➤ Also you need to changed the entry in printer configuration file. "/etc/cups/cupsd.conf is configuration file in linux machine. Open the configuration file and change the parameter FileDevice to yes.

➤ Now, please run the below command to add a printer on the server.

[root@localhost]# lpadmin -p myprinter -E -v file:///dev/null

above command is used for adding a null printer in linux machine, if you want to check the status of printer, then please use the below command.

[root@localhost]# lpstat -s
no system default destination
device for myprinter: ///dev/null

You can find the above output if you are successfully configured the printer. Using this you can check the current device printer status.

Please comment on the post, if you have any query regarding this null printer installation topic.

Step by Step method to Configure Proxy in Linux Terminal

Mostly Squid proxy wpad.dat file are used for configuring the browser on Linux operating system. If you required to configure the proxy on linux terminal then you need to use either DNS name of proxy internet or IP address with port.

Normally user facing such issue while they are working on Linux environment and trying to download files on Linux terminal but they are facing a download error. This is because terminal never accept the browser settings. So you need to set the parameter of proxy manually on linux terminal window.

Here, we will discuss several ways using which we can configure the proxy on linux terminal window. Using this method you can configure the proxy on any linux environment like CentOS, Ubuntu etc.

Step by Step method to configure the proxy in Linux:

In mostly companies when you work on linux server, and trying to download files you will get an error " proxy behind the firewall" that's means you need to configure the proxy on terminal so that when you run your application or command to download the data such error not occur.

➤ Let's suppose your Proxy IP address is 10.13.2.34 and port is 8080, then you need to run the below command into the linux terminal.

[root@localhost]# export http_proxy=http://10.13.2.34:8080

and if your proxy server is secure then you can used https tag with export settings. Please find the below command syntax to use proxy with https.

[root@localhost]# export https_proxy=https://10.13.2.34:8080

➤ Let's suppose your Proxy IP address resolve a particular domain name then in this case you can change the IP address name with dns name as given in below example.

[root@localhost]# export http_proxy=http://squid.proxy.com:8080

[root@localhost]# export https_proxy=https://squid.proxy.com:8080

Please change your dns name as per your proxy configuration, in my case i just take a dummy dns name.

➤ Let's suppose you want to make the export settings permanently for all Unix system users, so any user if login on the Linux server they can able to access internet through terminal. In this situation, you need to make a export entries permanently in /etc/profile file. 

[root@localhost]# vi /etc/profile

on the bottom of this profile file paste the below two entry and save the file.

export http_proxy=http://10.13.2.34:8080
export https_proxy=https://10.13.2.34:8080

[root@localhost]# source /etc/profile

The above source command are used to make a entry permanently without taking a reboot of server.

➤ Let's suppose you want to allow internet only specific user then in this case you need to make the above export http & https entry in user bash profile. 

Please post the comment on this blog, if you have any query regarding this proxy topic.

Friday 19 May 2017

ILO LAN console setup on HP-UX rp/rx systems

HP-UX Operating System are mostly used in IT industries because it is more secure and high reliable operating system. For managing hardware and software of HP-UX, ILO is in used.

ILO is a console for HP-UX servers, If your server operating system get crashed, then you can login in to ILO console and check all the logs related to failure as well as you can take a virtual console of OS from ILO.

Here, we will see how to configure the HP-UX ILO on specialized Unix server.

For initial setup, connect a serial terminal to the system. Use CONSOLE cable if there are multiple (usual HP bulkhead) 9600 bauds, 8N1. After that hit Ctrl-b after memory and CPU test at boot time, or if the system is already running

To modify the configuration, you can also telnet to the console IP address, and hit Ctrl-Shift-e , then c , then f to access the console and Ctrl-b to enter setup. You should see the ILO login prompt like that.

MP login: Admin
MP password: *********

Once you successful login, you'll see the ILO MP menu and find the different command to run. Please find the below MP main menu as given below.

MP MAIN MENU:

CO:   Console
VFP: Virtual Front Panel
CM:  Command Menu
CL:   Console Log
SL:   Show Event Logs
HE:  Main Help Menu
X:    Exit Connection

➤ Please select the CO command from MP main menu. The prompt changes to MP:CM> You are now ready to perform the configuration changes.

Note: The preferred method is always the directly connected terminal.

➤ The SA command shows you the Access Configuration menu. Change the settings so that it looks like that. This command allows you to modify MP access configuration.

Current Set Access Configuration:

R - Remote/Modem: OS SESSION
T - Telnet:                  Enabled 
W - Web SSL:           Enabled 
H - SSH:                    Disabled 
I - IPMI over LAN:   Enabled

Edit Section IP settings:

➤ The LC command shows you the LAN Configuration menu. Change the settings so that it looks like that.

Current LAN Configuration:

     MAC Address                              : 0x001a4b0add53
     D - DHCP Status                          : Disabled
     I - IP Address                               : 10.123.5.6
     M - MP Host Name                     : ethan-r
     S - Subnet Mask                          : 255.0.0.0
     G - Gateway Address                  : 10.123.0.1
     L - Link State                              : Auto Negotiate
     W - Remote Serial Console Port : 2023
     H - SSH Access Port                   : 22
     - - IPMI / LAN Port                     : 623

➤ You can see the current settings using the LS command. When you run the LS command it is shown you all current LAN configuration.

➤ The SO command with the O choice shows you the Security/Login options menu. Change the settings so that it looks like that:

Current Security Options:

     L - Login Timeout in minutes          : 1
     N - Number of Password Faults allowed : 3
     F - Allow MP Firmware upgrade via PCI : Enabled
     R - Allow MP reset via IPMI           : Disabled
     P - Allow MP password reset via IPMI  : Disabled

Edit Section Users:

➤ Use the UC command to view the User Configuration. If you can see the below my command output when you run the UC command on the command menu.

Login ID             User Name               Access Rights   Enabled
  --------------------------------------------------------------------------
   1 - Admin         Default Admin         C, P, M, U       Yes
   2 - Oper            Default Operator      C                     Yes
   3 - root              root                           C, P, M, U       Yes

Using above all method section we can configure the ILO on HP-UX rp/rx system. Please make sure in every HP-UX system parametere are different , so you can change as per your requirment.

Please post the comment on the blog, if you have any query regarding this topic.

Thursday 18 May 2017

How to Increase a Swap Space on Solaris Server

Swap memory work as a virtual memory in Unix operating systems. In Unix server when your physical memory used fully, that time swap memory are used and its maintain the system performance.

On Solaris server, if your swap size space use full then you need to create a new swap file or increase the swap space. We have a different method to increase/create a swap size on Solaris operating system server.

Here, we will discuss how to increase a swap size on Sun Solaris 11 operating system. The same steps are used for Sun Solaris 10 operating system.

In my testing machine, we are using storage space to create a new swap file as my operating system pool space are already fully utilized. 

Step by Step Method to Increase a Swap Space:

➤ On your Solaris machine , first you check the current swap space. Please use the below command to check the current running swap size.

!-[solaris]# swap -l
swapfile                               dev        swaplo   blocks       free
/dev/zvol/dsk/san/swap1     202,1        16         731596    6730226

In above example, "swap -l" command used to check the existing swap size space, you can use "top" command as well but using "top" command you can not find which swap named file are in used. You can find only total swap memory available on the Solaris server. On my solaris testing machine "swap1" file was already created which is currently in used.

➤ If you want to increase more size then you need to create a new swap file like swap2 or swap 3 as per your requirement and space available on server storage.

Let's assume on my Solaris server, I need to increase 30 GB more swap size, then you need to create new swap file.

Please use the below command to create a new swap file on Sun Solaris 11 operating system.

!-[solaris]# zfs create –V 30G san/swap2
!-[solaris]# swap –a /dev/zvol/dsk/san/swap2

In above command, we will create swap2 file with 30 GB space. Once you run both command one by one in given sequence a new swap 2 file with 30 GB has been created on the server.

➤ To verify the new swap size space, you need to run the below command.

!-[solaris]# swap -l
swapfile                               dev        swaplo   blocks       free
/dev/zvol/dsk/san/swap1     202,1        16         731596    6730226
/dev/zvol/dsk/san/swap2     209,2        16         832226    31457280

If you see the above output, the newly created swap file are seen with 30 GB space, and you can run the top command which show you the total swap memory space.

➤ To make it this swap space on Solaris server, please make an entry in "/etc/vfstab" file.

!-[solaris]# vi /etc/vfstab
/dev/zvol/dsk/san/swap1 -       -       swap    -       no      -

When we make this an entry in vfstab file, we don't need to take a reboot.  Once you take a reboot your space would be available and you can show it without any problem.

Please post your comment on this blog, if you have any query related to this topic.

How to get the SAN Storage Information on AIX Operating System

If you are using IBM AIX Operating System and wants to work on Storage part, then you need understand basic of SAN fiber connectivity with server.

In blog, I would show you all the commands with an example, through which you can get an idea how SAN fiber connect with server and works.

➤ If you want to see how many fiber card (FC) adapter are present on the AIX operating system then please run the below command.

ibm_aix:/> lsdev -Cc adapter | grep fcs

"lsdev" command used for to check the FC adapter present on the IBM AIX servers. In the below line you can find the command output.

ibm_aix:/> lsdev -Cc adapter | grep fcs
fcs0    Available 00-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs1    Available 00-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs2    Available 03-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs3    Available 03-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

In above command output, you can see on my AIX machine , I have 4 FC card adapter present. Each card adapter have dual port 8Gb. You can see the available adapter name like "fcs0,fcs1". It would be different on every AIX server depend up which type of storage you used.

➤ If you want to check WWN number or SAN ID, please use the below command to check specific information.

ibm_aix:/> lscfg -vl fcs2 | grep "Network Address"
        Network Address.............10000090FAC8D594

In above example, "lscfg" command use to check the all information about a adapter. In my machine , I need an information about WWN  of third adapter "fcs2" which are present on the AIX server. 

This command show you the wwn or SAN ID number which are connected to the server.

➤ If you want to see the fiber card adapter current status, then please use the below command. This command show you regarding the fiber health and all the information regarding the fiber.

ibm_aix:/> fcstat fcs0

FIBRE CHANNEL STATISTICS REPORT: fcs0

Device Type: FC Adapter (adapter/pciex/df1000f114108a0)
Serial Number: 1A550004C1
Option ROM Version: 027820F5
ZA: U2D2.03X5
World Wide Node Name: 0x20000090FACA86B4
World Wide Port Name: 0x10000090FACA86B4

Output of this command "fcstat" is very long so I can not write here, you can run this command on your AIX platform and check all the information. 

Please post your comment on this blog, if you have any query regarding this topic. I will try to resolve your query as earliest.

How to limit ZFS arc cache size on Solaris server

If you are working on Solaris operating system then you normally facing the ZFS cache size issue while running multiple database on Solaris local zones.

As per oracle suggested if your physical Solaris server have 64 GB physical RAM then ZFS cache arc minimum size should be 2 GB, and if physical server have 128 GB RAM then ZFS arc cache size should be 4 GB. Minimum you can set the ZFS arc cache size to 512MB only.

In this post, I will show you how to limit the ZFS arc cache size on Solaris server operating system.

➤ Let's suppose your Solaris server have 128 GB physical RAM, in this case you need to set the ZFS arc cache size to 4 GB minimum.

Before doing that you must check the current cache size which are running on the server

!-[solaris]# kstat zfs:0:arcstats:size | grep size | awk '{printf "%2dMB\n",  $2/1024/1024+0.5}'
1024MB

If you see the above command output, you can see the current running cache arc size is around 1 GB.

➤ If you want to check current "zfs_arc_max" & "zfs_arc_min" cache size, then please run the below command to check this.

!-[solaris]# kstat -p zfs:0:arcstats | head -4
zfs:0:arcstats:buf_size  55652720
zfs:0:arcstats:c             1073741824
zfs:0:arcstats:c_max    1073741824
zfs:0:arcstats:c_min     268435456

If you see the current above command output the "zfs_arc_max" cache size is 1 GB approx and  zfs_zrc_min size is approx 256 MB.

➤ As in my above post, you can see, as per Oracle, the cache size should be minimum 4 GB if physical RAM of the server 128 GB. So in this step , we will change the parameter.

To set the new ZFS ARC parameter, you need to go "/etc/system" file where old cache parameter was written.

!-[solaris]# vi /etc/system

Please change the parameter according to 128 GB physical RAM, so in our case zfs_arc_max would be 6 GB and zfs_arc_min would be 4 GB.

set zfs:zfs_arc_max = 6442450944
set zfs:zfs_arc_min = 4294967296

You can set the above parameter in /etc/system file. The ZFS cache size max would be 8 GB but on my machine I used it to 6 GB only.

➤ Once you set the above step ZFS ARC parameter in the system file, you need to take a reboot of Solaris server to effect these new size permanently. 

Once the server is up , you can run the below command to check the new ZFS cache size.

!-[solaris]# kstat zfs:0:arcstats:size | grep size | awk '{printf "%2dMB\n",  $2/1024/1024+0.5}'
6144MB

If you see the above output, you can see the ZFS cache max size vary to 6 GB.

➤ You can  also use the below command to check the max. cache size on global zone.

!-[solaris]# kstat zfs::arcstats:size
module: zfs                              instance: 0
name:    arcstats                       class:    misc
              size                             6445232256
You can see the above command output, its clearly show you the new current ZFS arc cache size for 128 GB physical Sun Solaris server.

Please post the comment on this blog, if you have any query related to this topic.

Sunday 14 May 2017

How to configure YUM Server in Red Hat Linux 7 Operating System

This is my first post, hope you are like my blog content. I am trying to provide you the simple and straight forward solution on this post.

In this post, I will guide to you, how to configure YUM server in Red Hat Linux 7 operating system. Yum tends for Yellowdog Updater Modified utility which used for package management system on Linux environment. In the below post, you can find the step by step method of configuration and installation of YUM.

Step by Step Method of Installation & Configuration of YUM:

➤ If you have Red Hat Linux 7 operating system image or cd, then please mount this iso or cd on cdrom device of operating system.

[root@localhost]# mount -o loop /dev/cdrom /mnt

In above command syntax, you can able to see we have mount the our Red Hat Linux 7 operating system image on /mnt file system. Normally /mnt file system are used for mounting purpose only but its depends upon every user understanding.

➤ Please create a directory where you want to copy the all packages files for configuration of YUM server.

[root@localhost]# mkdir /"Directory Name"

In linux operating system mkdir command are used for creating a directory. In my case I normally use "/yumserver" name for YUM configuration. When you create a directory please change your directory name.

➤  Please copy the all files from "/mnt" directory to /"Directory Name".

[root@localhost]# cp -rvf /mnt/* /"Directory Name"

Using this command all the packages files are copied on the other place, you need to keep save this directory otherwise your YUM configuration is not works.

➤ In this step, we will go the the packages directory and install the required rpm packages which are required for installation of YUM server.

[root@localhost]# cd /yumserver/Packages

You can use your directory name to reach the packages folder. Now once we reached in this directory then we will install the required rpm packages one by one in below sequence.

[root@localhost]# rpm -ivh deltarpm-3.6-3.el7.x86_64.rpm
[root@localhost]# rpm -ivh python-deltarpm-3.6-3.el7.x86_64.rpm
[root@localhost]# rpm -ivh createrepo-0.9.9-23.el7.noarch.rpm

If you are trying to install the above rpm packages and not follow the above installation of rpm's in same sequence then you are definitely getting an dependency error.

➤ For creating a repo packages, you need to createrepo of all the packages, for this please run the below command on your terminal window.

[root@localhost]# createrepo  –v /yumserve/Packages

Please change the yum directory name which you used in above steps. Using this command all the packages repo has been created on the yum directory.

➤ Create a repo file on the below directory location. Please used the valid name while creating a repo file.

[root@localhost]# cd /etc/yum.repos.d/
[root@localhost]# vi yumserver.repo

You can change the repo file name according to your feasibility. Now please write the below entry inside this file.
#########################
[Packages]
baseurl=file:///yumserver/Packages 
gpgcheck=0
enable=1
########################

This is the main file content, so please more careful while doing the entry in this file. You can change the baseurl location as per your YUM packages directory location. After saving the file go for final step.

➤  In final step, as you configured the YUM configuration file, now you need to clean your yum repo and used it for installation the packages.

[root@localhost]# yum clean all

When you run this command , some space from /var file system get free, actually during packages installation /var file system get increase sometimes.

[root@localhost]# yum list

above command show you all the yum repo which exist on this server. In our case you can find the yumserver repo.

To test the yum server is configured properly or not then please run the below command to installed the any packages on the server using yum commands.

[root@localhost]# yum install samba*

When you run this command, if all the packages related to yum are installed that's means your YUM server installation and configuration are successful. If you are see any error then please check the above all steps configuration one by one.