Set Date&Time as needed:
1. List all available timezones:
timedatectl list-timezones
2. Update timezone and check:
echo 'ZONE="Europe/Madrid"' > /etc/sysconfig/clock && ln -sf /usr/share/zoneinfo/Europe/Madrid /etc/localtime && date
Monday, August 14, 2017
Saturday, July 8, 2017
Start Adobe Experience Manager AEM in command line
1. Get license jar (e.g. cq-quickstart-6.3.0.jar) and license.properties file from Adobe.
Please make sure you have a valid licensed product.
2. Move the above two files in the same folder
3. Rename jar file to desired run modes and port (e.g. aem-author-4502.jar)
4. Start jar using Java 8.
Example of run command:
java -XX:MaxMetaspaceSize=1024m -Xmx1024M -jar aem-author-4502.jar
5, It takes few minutes to start - once started you can get login screen with admin/admin user.
Please make sure you have a valid licensed product.
2. Move the above two files in the same folder
3. Rename jar file to desired run modes and port (e.g. aem-author-4502.jar)
4. Start jar using Java 8.
Example of run command:
java -XX:MaxMetaspaceSize=1024m -Xmx1024M -jar aem-author-4502.jar
5, It takes few minutes to start - once started you can get login screen with admin/admin user.
Wednesday, June 21, 2017
Use crontab on AWS RedHat
1. Get your script defined and get it into a proper location on the machine:
touch script.sh
chmod +x script.sh
vi script.sh
Example of script copying files to a user home folders:
#!/bin/bash
cd /folder/test-pckg/
chown dest_user:dest_user filename*
mv filename* /home/dest_user/prod-pckg/
2. Add your script to crontab
crontab -e
30 21 * * * /folder/test-pckg/script.sh
The above runs each day at 21:30 local machine time.
3. Verify if it runs under cron tab logs:
cat /var/log/cron
You should grep for a line like the below:
Jun 20 21:30:01 instance-name CROND[12092]: (root) CMD (/folder/script.sh)
touch script.sh
chmod +x script.sh
vi script.sh
Example of script copying files to a user home folders:
#!/bin/bash
cd /folder/test-pckg/
chown dest_user:dest_user filename*
mv filename* /home/dest_user/prod-pckg/
2. Add your script to crontab
crontab -e
30 21 * * * /folder/test-pckg/script.sh
The above runs each day at 21:30 local machine time.
3. Verify if it runs under cron tab logs:
cat /var/log/cron
You should grep for a line like the below:
Jun 20 21:30:01 instance-name CROND[12092]: (root) CMD (/folder/script.sh)
Sunday, May 28, 2017
Get cURL to not show progress bar
It's very simple, just add -s parameter:
curl -s http://domain.com
curl -s http://domain.com
AEM curl command to get JMX status of replication queue - pending items
Syntax is the following:
curl -u admin:admin -X GET http://IP:PORT/system/console/jmx/com.adobe.granite.replication%3Aid%3D%22publishagentname%22%2Ctype%3Dagent
It gets all fields, to parse it, you can use the bellow
curl -u admin:admin -X GET http://IP:PORT/system/console/jmx/com.adobe.granite.replication%3Aid%3D%22publishagentname%22%2Ctype%3Dagent | grep "QueueNumEntries" | cut -d ">" -f5 | cut -d "<" -f1'
curl -u admin:admin -X GET http://IP:PORT/system/console/jmx/com.adobe.granite.replication%3Aid%3D%22publishagentname%22%2Ctype%3Dagent
It gets all fields, to parse it, you can use the bellow
curl -u admin:admin -X GET http://IP:PORT/system/console/jmx/com.adobe.granite.replication%3Aid%3D%22publishagentname%22%2Ctype%3Dagent | grep "QueueNumEntries" | cut -d ">" -f5 | cut -d "<" -f1'
Saturday, May 27, 2017
Linux - check every few seconds if file size grows using Watch command
Complete syntax:
watch -n 5 ls -lh filename
Output (error.log is the filename):
watch -n 5 ls -lh filename
Output (error.log is the filename):
Monday, May 8, 2017
Office 365 - Check O365 quota via outlook.office.com
From under Settings->Options->General->My Account as described in below picture:
Subscribe to:
Posts (Atom)