This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://github.com/Squirrel/Squirrel.Windows/issues/1470 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def strnumber = BUILD_NUMBER // current build number of current job | |
| def intValue = strnumber.toInteger() | |
| Jenkins.instance.getItemByFullName("theOtherJobName").updateNextBuildNumber(intValue) | |
| // def job = Jenkins.instance.getItemByFullName("theOtherJobName") | |
| // job.nextBuildNumber = intValue | |
| // job.save() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To change the default SSH port, the first thing you want to do is backup the current SSH configuration on your system. To do that, run the commands below. | |
| sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak | |
| This creates a new named sshd_config.bak with the current settings of the sshd_config file. If something goes wrong, you can then restore the file from the backup. | |
| Next, run the commands below to open the default SSH configuration file | |
| sudo vi /etc/ssh/sshd_config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Increase A VMware Disk Size (VMDK) Formatted As Linux LVM without rebooting | |
| Mattias Geniar, Friday, August 27, 2010 - last modified: Sunday, July 24, 2016 | |
| To increase the size of your VMware Virtual Machine, you need to do 2 major steps. First, you need to increase the disk's size in your vSphere Client or through the CLI. This will increase the "hardware" disk that your Virtual Machine can see. Then, you need to utilize that extra space by partitioning it. If you're interested in just resizing your Linux LVM, please proceed to step 2. | |
| In this example, I'm increasing a 3GB disk to a 10GB disk (so you can follow using the examples). | |
| I would advise you to read the excellent documention on Logical Volume Management on tldp.org. | |
| Just a small note beforehand; if your server supports hot adding new disks, you can just as easily add a new Hard Disk to your Virtual Machine. You can increase the LVM volume without rebooting your Virtual Machine by rescanning the SCSI bus, more on that later in this article. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. backup and restore server | |
| mongodump --host "192.168.0.44:27123" --archive=prod.20180907.gz --gzip | |
| mongorestore --host "192.168.0.44:27123" --archive=prod.20180907.gz --gzip | |
| 2. Replication | |
| rs.initiate( { | |
| _id : "rs1", | |
| members: [ | |
| { _id: 0, host: "192.168.0.252:27017" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Note: The preceding link was correct as of May 19, 2015. If you find the link is broken, please provide feedback and a VMware employee will update the link. | |
| To create a new virtual disk for an existing Linux virtual machine: | |
| Log in as root on your Linux virtual machine. | |
| Run this command and make note of the sdx entries | |
| ls /dev/sd* | |
| Log in to the vCenter Server using the vSphere Client. | |
| In the vSphere Client inventory, right-click the virtual machine and select Edit Settings. | |
| Click the Hardware tab and click Add. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To extend the logical volume: | |
| Note: These steps only apply to EXT3 file systems. | |
| Caution: VMware recommends to take a complete backup of the virtual machine prior to making these changes. | |
| Power off the virtual machine. | |
| Edit the virtual machine settings and extend the virtual disk size. For more information, see Increasing the size of a virtual disk (1004047). | |
| Power on the virtual machine. | |
| Identify the device name, which is by default /dev/sda, and confirm the new size by running the command: | |
| # fdisk -l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # see How to Install Redis Server on CentOS 7 - http://linoxide.com/storage/install-redis-server-centos-7/ | |
| # --- Compiling --- | |
| $ yum install gcc make tcl | |
| $ REDIS_VER=3.2.3 | |
| $ wget http://download.redis.io/releases/redis-$REDIS_VER.tar.gz | |
| $ tar xzvf redis-$REDIS_VER.tar.gz | |
| $ cd redis-$REDIS_VER | |
| $ make | |
| $ make test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # You might want to put this script in crontab, backup day by day. | |
| # | |
| # $ sudo -u git -H crontab -l | |
| # $ 0 0 1 * * /path/to/your/BackupGitlab.sh | |
| cd /home/git/gitlab | |
| /usr/local/bin/bundle exec rake gitlab:backup:create RAILS_ENV=production |