Posts

How to Create Virutal Host in Xampp For Clonning of WordPress or OtherSite on Local Machine

Since Creating a Clone for the purpose of Testing or Development, we have to perform many different task like changing the host names especially in WordPress. Hence in this tutorial I will show how to skips old techniques of changing host URLs in the site. Instead of replacing the URL - Site/Host Address from the cloned environment, we will create our Local Machine as the Virtual Host i.e. it will behave as the same site as of production. So dont need to change the URL/Address from the enviroment. Following are the steps using Xampp  Step 1) C:\WINDOWS\system32\drivers\etc\ Open the "hosts" file : 127.0 . 0.1 localhost 127.0 . 0.1 test.com 127.0 . 0.1 example.com Step 2) xampp\apache\conf\extra\httpd-vhosts.conf <VirtualHost *: 80 > DocumentRoot C:/xampp/htdocs/test/ ServerName www.test.com </VirtualHost> <VirtualHost *: 80 > DocumentRoot C:/xampp/htdocs/example/ ServerName www.example.com </VirtualHost> ...

File Transfer Using SFTP with Linux Command Line

Linux > Install sshpass Linux >  sshpass -p Password sftp  User@NetworkDriveIP/HOSTNAME sftp> put backup.zip sftp> bye

Transferring File Using FTP with Linux Command Line

 filename=$( date +%d%m%Y_%H%M) BACKUP_DIR="/u02/backup" expdp user/pass@db_pdbp schemas=users directory=datapump dumpfile=$filename.dmp logfile=$filename.log #tar -zcvpf $BACKUP_DIR/$filename.tar.gz $BACKUP_DIR/$filename.dmp $BACKUP_DIR/$filename.log zip --password "ZIP_PASS" $BACKUP_DIR/$filename.zip $BACKUP_DIR/$filename.dmp $BACKUP_DIR/$filename.log rm $BACKUP_DIR/$filename.dmp $BACKUP_DIR/$filename.log cd $BACKUP_DIR ftp -n NASDRIVE_IP/HOSTNAME << EOF user USERNAME PASSWORD cd Backups put $filename.zip EOF

Schedule Database Backup Job on Linux

1. Make Backup Script Having following Task:                     a. T hat will make File Name (unique - by taking current system time)                      b. Then Export Database with Log having system generated File Name as Above                    c. Then Zip These DMP and LOG file with Password                    d. Remove DMP & LOG, to release Space.                    e. Move ZIP file to Remote Location (NAS Drive/Backup Directory having FTP Enabled) ------------------------------------------------------------------------------------------------------------------------------ #BackupScript.sh . /home/oracle/scripts/setEnv.sh filename=$( date +%d%m%Y_%H%M) BACKUP_DIR="/u02/backup" expdp user/pa...

Create Local Network Between Virtual Linux on Hyper-V and Host Machine

 Create Virtual Switch From Hyper V, With Internal Type:       Once you create this Switch, Windows will create a Virtual Adapter in Network Adatpers     Now Bind this Virtual Switch with the Virtual Machine Go To Setting of Virutal Machine           Now Go To Network Adapter and select the one we created earlier.     Once, done the start Linux Machine and Go to Network Setting from Top.    Click Setting Icon, then it will open new Network Window, Go To IPV4 Tab and select Shared To Other Computer Check Box.    Once Done,  Check what DHCP has assinged IP on Both Host and Virtual Linux Machine. The Host Machien is having following IP Now you could Ping To Check Estalibhsed Connectvitiy     However , you could setup own IP's in the network instead of 10.10.X.X