Default Spec Sheet
ec2-user | default user name |
---|---|
need the key | pass |
22 | ssh port |
Common Post-Install Application Spec Sheet
/var/www/html | Apache html root |
---|---|
/etc/httpd/conf/httpd.conf | Apache server config |
sudo service httpd restart | Apache server restart command |
chmod 400 /path/my-key-pair.pem
ssh -i /path/my-key-pair.pem ec2-user@your_domain_or_free_amazonaws.com
cd /var/www/html
Note
Basic | |
---|---|
AMI username | bitnami |
htdoc location: | /opt/bitnami/apps/wordpress/htdocs |
http.conf | /opt/bitnami/apache2/conf/httpd.conf |
ftp | your_domain.com; user: bitnami; port 22; with key installed in ftp client |
Advanced | |
ssh | ssh -i /path_to_the_key.pem bitnami@your_domain.com |
restart apahce | sudo /opt/bitnami/ctlscript.sh restart apache |
sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1
sudo /opt/bitnami/ctlscript.sh restart apache
ref: https://docs.bitnami.com/aws/how-to/bitnami-remove-banner/
php -v
ps -e -o pid,user,group,cmd | grep php
root | /opt/bitnami |
---|---|
server | apache2/, mysql/, postgresql/, apache-tomcat |
language | php/, python/, ruby/, tcl/ |
app | apps/phpMyAdmin/, apps/drupal/, apps/joomla/, apps/redmine/ |
Backup important file list in current instance
Shut down current instance
Start new instance fresh
Detail Steps
Note
How to use ec2 instance to unzip and send unzip content to S3 Method A
How to use ec2 instance to unzip and send unzip content to S3 Method B
aws s3 sync . s3://my-bucket/path --acl public-read
ref:
df -h
du -sh .
du -sh *
ls -lh
apache2/logs error_log-*.gz access_log-*.gz
// https://docs.bitnami.com/aws/apps/orocrm/administration/use-pagespeed/ // apache2/var/cache/mod_pagespeed/ // if you dont use that feature, just delete all inside // rm -rf * // restart apache // (for bitnami: sudo /opt/bitnami/ctlscript.sh restart apache)
mysql -u root -p
SELECT table_schema AS "Database", ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
SELECT TABLE_NAME AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)" FROM information_schema.TABLES WHERE table_schema = "database_name" ORDER BY (data_length + index_length) DESC;