Thursday, November 19, 2020

Rename the multiple files which matching certain string - linux

Ex: 
test1_test2.txt 
 test1_test3.txt 
 test1_test4.txt 

 $ ls * | sed -e 'p;s/test1/XYZ/' | xargs -n2 mv 


 Output: XYZ_test2.txt XYZ_test3.txt XYZ_test4.txt

Thursday, June 4, 2020

Appian 19.2 Services Restart

Appian 19.2 START

1) Backend
/appian_home/appian/services/bin/start.sh -p $APPIAN_PW -s all
2) Dataserver
/appian_home/appian//data-server/bin/start.sh
3) SearchServer Frontend host
/appian_home/appian/search-server/bin/start.sh (Note: check for ss.pid )
4) Tomcat Frontend Host
/appian_home/appian//tomcat/apache-tomcat/bin/start-appserver.sh && tail -f /appian_home/appian/logs/tomcat-stdout.log


Appian 19.2 STOP

1)Tomcat Frontend Host
/appian_home/appian//tomcat/apache-tomcat/bin/stop-appserver.sh && tail -f /appian_home/appian/logs/tomcat-stdout.log
2) SearchServer Frontend host
/appian_home/appian/search-server/bin/stop.sh
3) Dataserver
/appian_home/appian//data-server/bin/stop.sh
4) Backend
/appian_home/appian/services/bin/stop.sh -p $APPIAN_PW -s all


CHECK BACKEND ENGINES STATUS

/appian_home/appian/services/bin/status.sh -p $APPIAN_PW -c


If Services Stop abruptly then we need to do perform checkpoint procedure.

/appian_home/appian/services/bin/checkpoint.sh -p $APPIAN_PW -s all


**** for password store in /etc/sysconfig/appian ****
source /etc/sysconfig/appian
$APPIAN_PW

Tuesday, April 21, 2020

Deploy app with weblogic.deployer task

set the environment path


java weblogic.Deployer -deploy -adminurl t3://: -username -password -name -targets ,

java weblogic.Admin -url t3://: -password FORCESHUTDOWN



How to rename weblogic domain name

Changing weblogic domain name is possible with modifying certain files under your domain.

In this exercise – I have renamed from wl-lstba to wl-bstqa

1) Take complete backup of your domain

2) Copy old domain name folder to new domain name
cp -rp wl-lstba wl-bstqa

3) Search all files which contains lstba in newly copied folder
[wlapp@Server1 server1034]$ pwd
/pae/Server1/weblogic/dst/server1034/wl-bstqa
grep -rl lstba *

4) Replace lstba with bstqa name


grep -rl lstba . | xargs sed -i -e 's/lstba/bstqa/'


Ensure none of the files are having base_domain



[wlapp@Server1 server1034] grep -r lstba *




5) Restart the JVM's to verify servers are coming up.

Tuesday, April 14, 2020

Creating Volume group and logical Volume

pvcreate /dev/sdd ( It should run only once)

vgcreate rhel03 /dev/sdd ( Creating Volume group here and assigning to /dev/sdd)

lvcreate -l 100%FREE -n u03 rhel03 ( Creating logical volume group u03 and assigning to volume group rhel03)

lvscan (to check the logical volumes)

mkfs.xfs -f /dev/rhel03/u03 ( formatting the disk)

/dev/mapper/rhel03-u03 /u03 xfs defaults 1 2
mount /u03

Friday, March 6, 2020

Moving home directory in linux

Username: test
Environment : Linux

$usermod -d /usr/test -m test

## Here "test" is a user and /home/test is directory which will move from /home/test to /usr/test.

Monday, March 2, 2020

Ansible

Linux User Administration

Adding a user with UID to the group

useradd -c "comment" -u 801 -g group username;
chage -I -1 -m 0 -M 99999 -E -1 username;


Modify a existing user group
usermod -a -G group username

Removing a user from GROUP

gpasswd -d username group



My GIT Notes




git clone

git branch ( to see which branch you are in)

git show-branch ( to see which branch you are in)

git checkout branch
git add
git commit
git push -u origin

============================================================
error: The following untracked working tree files would be overwritten by checkout:
        xxxxxxxxxxxxxx
Please move or remove them before you can switch branches.
Aborting


git clean  -d  -f

============================================================

Sonarqube Upgrade from 9.4.4 to 9.9.4 LTS

 Issue:  1) Java hasbeen upgraded from 11 to Open JDK 17. And Sonarqube is upgraded from 9.4 to 9.9.4. 2) After the upgrade sonarqube servic...