Skip to content
Advertisements

Posts from the ‘Linux’ Category

creating local repository yum install linux

Follow the below procedure

[root@ebs-app-xx-xx u01]# yum repolist

[root@ebs-app-xx-xx u01]# yum list installed | grep createrepo

createrepo.noarch                         0.9.9-28.el7             @anaconda/7.5

[root@ebs-app-xx-xx u01]# createrepo /u01/Packages/

 

[root@ebs-app-xx-xx u01]# cd /etc/yum.repos.d

[root@ebs-app-xx-xx yum.repos.d]# ls -tlr

total 4

-rw-r–r–. 1 root root 358 Nov  4 22:55 redhat.repo

Now, create custom repository

[root@ebs-app-xx-xx yum.repos.d]# cat custom.repo

[customrepo]

name=Custom Repository

baseurl=file:///u01/Packages/

enabled=1

gpgcheck=0

 

you can check how much packages in the repository

 

[root@ebs-app-xx-xx yum.repos.d]# yum repolist

Now, we can install the rpm packages from the repository

 

[root@ebs-app-xx-xx Packages]# yum install tigervnc-1.8.0-5.el7.x86_64.rpm

 

Issue faced :

 

if  repository giving below error message,then your repository is corrupted.

 

Error Downloading Packages:

InstallMedia: [Errno 256] No more mirrors to try.

 

Solution:

Refer

https://access.redhat.com/solutions/203603

 

Advertisements

Remove this file if there is no X server

Try to start VNC, you may get the below error

 

[root@fusiondev ~]# vncserver

Warning: fusiondev.xxxxx.com:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server fusiondev.xxxx.com:1

New ‘fusiondev.xxxxx.com:2 (root)’ desktop is fusiondev.xxxxx.com:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/fusiondev.xxxxx.com:2.log

 

Solution :

[root@fusiondev tmp]# rm -rf /tmp/.X1-lock

[root@fusiondev tmp]# rm -rf /tmp/.X11-unix/X1

[root@fusiondev tmp]# vncserver

New ‘fusiondev.xxxxxx.com:1 (root)’ desktop is fusiondev.xxxxxx.com:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/fusiondev.xxxxxx:1.log

Start and stop firewall OEL 7

Check the status

[root@ezylebuat ~]# systemctl status firewalld
● firewalld.service – firewalld – dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-01-17 06:37:59 EST; 24min ago

Stop the firewall

[root@ezylebuat ~]# systemctl  stop firewalld 

[root@ezylebuat ~]# systemctl status firewalld
● firewalld.service – firewalld – dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2018-01-17 07:04:09 EST; 3s ago
Docs: man:firewalld(1)

Disable the firewall( After reboot,It will not enable automatically)

[root@ezylebuat ~]# systemctl disable firewalld

Enable the firewall

[root@ezylebuat ~]# systemctl enable firewalld

Start the firewall

[root@ezylebuat ~]# systemctl  firewalld start

find the files older than 30 days in linux

cd /u01/app/12c/oracle/trace

find *.trc -maxdepth 1 -mtime +30 -type f -exec ls -l {} \;

 

 

Change hostname in OEL 7

Method 1 :  nmtui  tool on terminal

Method 2 : [root@EDB-LEB-4-53 ~]# hostnamectl status
Static hostname: EDB-LEB-4-53.ace-ins.com
Icon name: computer-vm
Chassis: vm
Machine ID: 11cc4d26c75c476db3fa89a66a0fcae9
Boot ID: afc4b181973e40b9ab46ca774e6130c4
Virtualization: vmware
Operating System: Oracle Linux Server 7.0
CPE OS Name: cpe:/o:oracle:oracle_linux:7.0:GA:server
Kernel: Linux 3.8.13-35.3.1.el7uek.x86_64
Architecture: x86_64

 

[root@EDB-LEB-4-53 ~]# hostnamectl set-hostname ezylebuatdb.damana.com
[root@EDB-LEB-4-53 ~]# hostnamectl status
Static hostname: ezylebuatdb.damana.com
Icon name: computer-vm
Chassis: vm
Machine ID: 11cc4d26c75c476db3fa89a66a0fcae9
Boot ID: afc4b181973e40b9ab46ca774e6130c4
Virtualization: vmware
Operating System: Oracle Linux Server 7.0
CPE OS Name: cpe:/o:oracle:oracle_linux:7.0:GA:server
Kernel: Linux 3.8.13-35.3.1.el7uek.x86_64
Architecture: x86_64

 

Diagnostic-Code: SMTP; 550 host unknown

When we’re trying to send mail to localdomain through mailx from linux box. It says “Diagnostic-Code: SMTP; 550 host unknown”  and mail not sent.

Solution :

Edit sendmail.cf

# “Smart” relay host (may be null)
DS[10.x.x.xx]

restart the sendmail service and send the mail is successful

10.x.x.xx — mailbox server

 

 

 

 

delete argument too long linux

When you’re trying to delete files in linux , you receive following error message

bash: /bin/rm: Argument list too long

Solution :

go to that directory and execute below command

find . -name ‘filename*’ -print0 | xargs  -0 rm

vncserver configuration

Step 1:  Login as root user

Install vncserver rpm package, check whether its already installed or not

vnc-server-4.1.2-14.el5_5.4.x86_64.rpm

[root@ebsdev ~]# rpm -q vnc-server-4.1.2-14.el5_5.4.x86_64
vnc-server-4.1.2-14.el5_5.4
[root@ebsdev ~]#

Step 2: password for vncserver

[root@ebsdev ~]# vncpasswd
Password:
Verify:
[root@ebsdev ~]#

Step 3:

[root@ebsdev ~]# vncserver
xauth: creating new authority file /root/.Xauthority

New ‘ebsdev.ace-ins.com:1 (root)’ desktop is ebsdev.ace-ins.com:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/ebsdev.ace-ins.com:1.log

Step 4:

[root@ebsdev ~]# vi .vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ –x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ –r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
twm &

remove the command from unset and exec

[root@ebsdev ~]# vi .vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ –x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ –r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
twm &

Step 5:

[root@ebsdev ~]# vncserver -kill :1
Killing Xvnc process ID 20106
[root@ebsdev ~]#

Step 6:

[root@ebsdev ~]# vncserver

New ‘ebsdev.ace-ins.com:1 (root)’ desktop is ebsdev.ace-ins.com:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/ebsdev.ace-ins.com:1.log

[root@ebsdev ~]#

Step 7: Download vncviewer

http://www.realvnc.com/download/viewer/

Step 8:  connect the host with vncviewer

Note : Some times you cann’t able connect your host, in this case check your firewall of linux and If already vncserver process aviable, kill the session using by vncserver -kill :1 

If you want to connect the server which was installed on RHEL 7, you just install “tigervnc-server-1.8.0-5.el7.x86_64.rpm” and then start vncserver & you can able to connect the server using vncviewer from your pc.

 

bip_11

 

bip_12

 

bip_13

oops i cann’t boot my windows because of before linux was installed on my machine

Steps below

  1. Before removing a partition, boot rescue mode
  2. Start parted ,where /dev/hda is the device on which to remove the partition
  3. In command mode
  4. >list hard-drives
  5. >parted /dev/hda or /dev/sda
  6. >print
  7. >rm 2
  8. exit and then you can install another OS on your system like windows xp or any.

step by step redhat installation on vmware

This document show you step by step redhat installation on vmware workstation

 

Step by step redhat installation on VMware workstation