November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Yellowdog Update Modified

Yum (Yellowdog Update Modified) is an RPM package management tool used on CentOS and RedHat systems. The yum history command allows the system administrator to roll back the system to the previous state, but due to some limitations, rollback is not possible in all cases Success, sometimes yum command may do nothing, and sometimes […]

iptables tips and tricks

Tip #1: Take a backup of your iptables configuration before you start working on it.

Back up your configuration with the command:

/sbin/iptables-save > /root/iptables-works Tip #2: Even better, include a timestamp in the filename.

Add the timestamp with the command:

/sbin/iptables-save > /root/iptables-works-`date +%F`

You get a file with a name like:

/root/iptables-works-2018-09-11

If […]

CentOS 7 deploys rsync backup server

1.1 rsync (official address http://wwww.samba.org/ftp/rsync/rsync.html)

A remote data synchronization tool that quickly synchronizes files between multiple hosts over a LAN/WAN. Rsync uses the so-called “rsync algorithm” to synchronize files between two local and remote hosts. This algorithm only transfers different parts of two files, rather than transmitting them all at once, so the speed is […]

time difference

Time difference res1=$(date +%s.%N) sleep 1 res2=$(date +%s.%N) echo “Start time: $res1” echo “Stop time: $res2” echo “Elapsed: $(echo “$res2 – $res1″|bc )” printf “Elapsed: %.3F\n” $(echo “$res2 – $res1″|bc )

rsync increment data

command will copy increment data and keep it in sync with remote server.

It will copy only incremental data. It will delete if any data deleted from source. It will copy again from source if any data deleted at destination. basically this command will keep the both environment in sync.

rsync -avWe ssh –delete-before (source) […]

Linux: include hidden files in tar archive

When you create a tar archive of a directory tree the hidden files are normally not included. Here’s how to include the hidden files.

Say you have a web directory called “/var/www/html/mysite/” that contains the following tree:

.htaccess index.php logo.jpg style.css admin_dir/.htaccess admin_dir/includes.php admin_dir/index.php

Normally you would use the tar command like this:

tar […]

Replacing IP Address in Apache2 config files with SED

Suppose i just mirrored my vps machine (starting from a clone and then rsync-ing all needed files) with rsync. Obviously i need to change the IP Address value contained into all the config files, but I’m lazy. So, let’s use “SED” to do it at once, with a single line command. I need to replace […]

rsync

There are many commands to copy a directory in Linux. The difference between them in current Linux distribution are very small. All of them support link, time, ownership and sparse.

I tested them to copy a Linux kernel source tree. Each command I tested twice and keep the lower result. The original directory size is […]

Reset SonarQube Admin User Password

Reset SonarQube Admin User Password

by default sonar creates admin account : user: admin, password : admin

Start root access to mysql database

mysql -uroot -p Copy Bash

Check if sonar database exists.

show databases; Copy SQL use sonar; Copy SQL

Reset admin user to admin password.

update users set crypted_password = ’88c991e39bb88b94178123a849606905ebf440f5′, salt=’6522f3c5007ae910ad690bb1bdbf264a34884c6d’ […]

Setup and Run Jenkins

Installing Jenkins:

Download latest or specific version you want to install from here.

For example:

$ wget https://updates.jenkins-ci.org/download/war/2.123/jenkins.war Starting Jenkins

The easiest way to execute Jenkins is through the built in Jetty servlet container. You can execute Jenkins like this:

June 25th, 2018 | Category: Centos RHEL 7 | Leave a comment