Using WordPress CLI

Published on Author admin

Using WordPress CLI for managing WordPress instance. Download WordPress CLI: curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar Check it: php wp-cli.phar --info Make it executable: chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp Check it: wp --info Update WP CLI tool: wp cli update Upgrade WordPress using WP CLI: sudo -u apache /usr/local/bin/wp core update --path=/path/to/wordpress/ List WordPress plugins: sudo… Continue reading Using WordPress CLI

Fedora CPU frequency scaling

Published on Author admin

At first install kernel-tools (provides cpupower tool): dnf install kernel-tools Get current CPU governor: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor List available CPU governors: cpupower frequency-info --governors Get current CPU frequency: cpupower frequency-info or lscpu | grep "CPU MHz" Set performance governor: cpupower frequency-set --governor performance Set powersave governor: cpupower frequency-set --governor powersave Kernel documentation: CPUFreq Governors

Using AWS EC2 CLI - part 2

Published on Author admin

Using AWS EC2 CLI - part 2 Script for checking VMs status: https://github.com/openterprise/scripts/blob/master/aws-status.sh Example user data file script: https://github.com/openterprise/scripts/blob/master/aws-user-data.sh #create VM centos aws ec2 run-instances --image-id ami-18f8df7d --security-group-ids sg-ID --subnet-id subnet-ID --count 1 --instance-type t2.micro --key-name KEY-NAME --user-data file://aws-user-data.sh --block-device-mappings 'DeviceName=/dev/sda1,Ebs={VolumeSize=10,DeleteOnTermination=false}' --query 'Instances[0].InstanceId' #stop ALL instances (only those are running) aws ec2 stop-instances --instance-ids `aws… Continue reading Using AWS EC2 CLI - part 2

Nextcloud - upgrade from CLI

Published on Author admin

Upgrading Nextcloud from CLI. /var/www/html/owncloud/ - Nextcloud installation directory apache - HTTP server service user cd /var/www/html/ wget https://download.nextcloud.com/server/prereleases/nextcloud-12.0.1RC4.zip service httpd stop rm owncloud-old/ -rf mv owncloud/ owncloud-old/ unzip nextcloud-12.0.1RC4.zip mv nextcloud/ owncloud/ mv owncloud-old/data/ owncloud/data/ cp owncloud-old/config/config.php owncloud/config/config.php chown apache: owncloud/ -R cd owncloud sudo -u apache php occ upgrade service httpd start