Previously i wrote a post about how to limit the bandwidth during an rsync operation.
Another parameter which you could alter is whether you want to delete the extra files in the destination folder.
rsync --delete -v -e ssh /home/ykyuen/* ykyuen@remote-server:/home/ykyuen/
Reference: Juan Valencia’s website – Synchronizing folders with rsync
In Linux, we use the iptabes to manage different firewall rules.
1. List all the rules.
When a new rpm is added to a yum repository server, the cache in the client machine makes the new rpm unreachable. To check for update of repositories, run the following command in the client.
Then you can try to search for your new rpm by
- yum list <new rpm package>
Reference: How do I get yum to see updates to a local repo without cleaning cache?
Working on the Puppet manifest to install the newrelic-sysmond package to all the nodes. I want to host the newrelic-sysmond.rpm on the company repository server but in that case the i have to re-sign the rpm.
What i need to do is to download the rpm from the New Relic repository, move it to the RPM build server and run the following command.
- rpm --resign newrelic-sysmond-18.104.22.1687-1.x86_64.rpm
You will be prompted to enter the passphrase and that’s it.
Reference: Maximum RPM – Signing Packages
We can use PowerShell as a SSH client. If your SSH server requires key authentication, you can use the following command to add your private key before you could establish the SSH connection.
I have installed Sublime Text 3 with the Git package but it keeps prompting Git command not found in the PATH variable. Before i update the PATH, i have to figure out where is my Git command.
In Linux, we can get the path of a specific command by which [comamnd].
ex. ~$ which git
We can use the --bwlimit to limit the bandwidth being used by the rsync command. Here is an example which transfer the local files to a remote server using ssh+rysnc.
rsync --bwlimit=100 -v -e ssh /home/ykyuen/* ykyuen@remote-server:/home/ykyuen/
The bandwidth is limited to 100kb/s.
The Apache Commons Lang library could help you to determine the running OS type. Here is an simple example.
In the Ant build.xml, i need to make sure the JBoss server is started before running the test cases. There are 2 possible approaches.
- Using twiddle.sh to check the status
- Monitoring server.log until “Started in” is written on it
I took the 2nd approach. Here is an example output log when the JBoss server is started successfully.
Mess up with the PHP dependencies in different environments? Composer is a PHP dependency manager where all the dependencies information are stored in the JSON file called composer.json. Similar to the pom.xml if you are using Maven in Java.
This example is done on a Windows machine. You could refer to Composer website if you are using Mac or Linux.
1. Download and install the Composer as stated in the Composer website.