Tuesday, June 16, 2015

How to check forgot password of plesk & login mysql too

For login plesk mysql without password : mysql -uadmin -p`cat /etc/psa/.psa.shadow`

For Check plesk admin panel password :  /usr/local/psa/bin/admin --show-password

OVF file not able to deploy

Failed to deploy OVF package: The task was canceled by a user

 

There will be three files you have to delete .mf file and edit .ova file and change contain like below
  • .ova – OVF descriptor, written in XML, which describes the hardware requirements
  • .mf – contains SHA1 checksums of the .OVA and .VMDK
  • .vmdk – the virtual hard disk for the virtual machine.
vmware.cdrom.iso
Changing the above line, to read…
vmware.cdrom.atapi
Then import it will work.
Before import right click on virtual system and edit setting and modify and choose Host CD ROME.
Then export vm and then deploy it will work.

Friday, May 29, 2015

How to excute mysql command from shell



execute mysql command remotely from shell

# mysql -h [ip] -u [user] -p[pass] -e "[mysql commands]"

# mysql -h hostip -u root -pmysqlpassword -e "show databases"

Mention database to use.

Use -D option to specify the name of MySQL database :
# mysql -D [db name] -u [user] -p[pass] -e "[mysql commands]"

# mysql -D DBName -u root -pmysqlpassword -e "show tables"


Use the following syntax in your Bash scripts for running MySQL commands :

mysql -u [user] -p[pass] << EOF

[mysql commands]

EOF

Example :
#!/bin/bash
mysql -u root -pmysqlpassword << EOF
use mysql;
show tables;
EOF
 

Wednesday, May 27, 2015

Use full command

Find particular word in files. directory & subdirectory

grep -r EAJggRQ * > asdf

Find particular files. directory & subdirectory

find . -print | grep -i 'index.php'


Mobile test

curl -s -D - -A 'Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; HTC Desire 1.19.161.5 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17' http://dsroutage.com/ > asd

Find Out apache load per process

ps aux | grep 'httpd' | awk '{print $6/1024 " MB";}'
ps -aux | grep 'httpd' | awk '{print $6/1024 " MB";}'
ps aux | grep 'httpd' | awk '{print $6/1024;}' | awk '{avg += ($1 - avg) / NR;} END {print avg " MB";}'
ps aux | grep 'mysql' | awk '{print $6/1024 " MB";}')
ps aux | grep 'mysql' | awk '{print $6/1024 " MB";}'

for check memory  : free -g

most cpu & ram using process :  top -c


High load cpu & Ram using   :  ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr | head -10
Plesk Mysql login without password

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

Plesk Mysql login password
/usr/local/psa/bin/admin --show-password

apache overload stop contain
vi /etc/httpd/conf.d/fcgid.conf

##FcgidIOTimeout 45
  FcgidIOTimeout 300

GracefulShutDownTimeout 3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
FcgidMaxRequestLen 533554432

/scripts/ensure_vhost_includes --all-users

http://www.zyxware.com/articles/2714/how-to-make-custom-changes-to-virtualhost-settings-in-httpd-conf-on-a-whmcpanel-vps-without-losing-the-changes

Friday, May 8, 2015

How to reset Jenkins admin password



For reset jenkin admin password if you forgot just login server via terminal & edit

/var/lib/jenkins/users/username/config.xml file  and update the contents of passwordHash:
Replace with current with below.

#jbcrypt:$2a$10$SmpPO.crN1akTcBmuiIPhOGqVL82RtBQlgaX9u3/4CKUtFNS9Iesy

Save file and restart Jenkins service  now able to login with password “ India@123”
Sunday, April 12, 2015

How to make WHM to non secure to secure redirect permant

Once you login visit this section:

WHM >> Server Configuration >> Tweak Settings >> Redirection section and tick the top box for "Always redirect users to the SSL/TLS....." Next tick the Hostname and SSL Certificate Name respectively and save.

Closer all browser windows, then open one and go back to https://domainname:2087/ login and accept the security Certificate into your browser and you're good to go.
Wednesday, March 25, 2015

Ubuntu command

apt-get update

aptitude install postgresql


use apt-get or aptitude or Ubuntu Software Center.

dpkg -i package-file-name

-i is to install a package.
 
dpkg -l | grep 'tcl' 



apt-get purge  package name