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
[mysqld] | |
interactive_timeout = 600 | |
max_allowed_packet = 256M | |
query_cache_limit = 512K | |
query_cache_size = 62M | |
innodb_log_buffer_size = 32M | |
innodb_log_file_size = 431M | |
innodb_buffer_pool_size = 2728M | |
expire_logs_days = 3 |
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
webroot=/home/runcloud/webapps | |
cd $webroot | |
for d in *; | |
do | |
domaindir=$(basename $d) | |
[[ $domaindir =~ ^(22222|html|www)$ ]] && continue #自行修改要排除備份上傳的webapps | |
echo "*******************************" | |
echo "Transfer files for '$domaindir'" | |
echo "*******************************" | |
ls $webroot/"$domaindir"/wp-content && cd $webroot/"$domaindir"/wp-content && wp db export backup.sql --allow-root && rsync -avz --exclude 'updraft' --exclude 'cache' --delete --bwlimit=627 $webroot/"$domaindir" backup:000 && rm $webroot/"$domaindir"/wp-content/*.sql |
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
# by Jack Wu 優易教學網 https://www.yogoeasy.com | |
read -p "Clone FROM which domain: " domain1 | |
#read -p "Clone TO which domain: " domain2 | |
read -p "To which Remote VPS: " vps | |
read -p "RunCloud webapp name: " appname | |
# | |
for i in languages themes plugins uploads | |
do | |
echo $i | |
sleep 1 |
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
# by Jack Wu 優易教學網 https://www.yogoeasy.com | |
read -p "Enter web application NAME for this WordPress: " appname | |
echo "************************************************" | |
echo "設定wp-config.php (關掉WP Cron之後要設定cronjob)" | |
echo "************************************************" | |
sed -i "2i define( 'DISABLE_WP_CRON', true );" /home/runcloud/webapps/$appname/wp-config.php && sed -i "3i define( 'WP_MEMORY_LIMIT', '256M' );" /home/runcloud/webapps/$appname/wp-config.php && sed -i "4i define( 'WP_POST_REVISIONS', 10 );" /home/runcloud/webapps/$appname/wp-config.php | |
chown runcloud:runcloud /home/runcloud/webapps/$appname/wp-config.php | |
echo "********************************************" |
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
# by Jack Wu 優易教學網 https://www.yogoeasy.com | |
# set date | |
echo "********************************************" | |
echo "set date" | |
echo "********************************************" | |
timedatectl set-timezone Asia/Taipei | |
#root SSH key | |
mkdir /root/.ssh | |
wget https://www.dropbox.com/s/用你自己的/id_rsa.pub --no-check-certificate |
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
Jul 3 09:12:36 web2 kernel: [ 0.000000] Linux version 4.15.0-24-generic (buildd@lgw01-amd64-056) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018 (Ubuntu 4.15.0-24.26-generic 4.15.18) | |
Jul 3 09:14:55 web2 kernel: [ 0.000000] Linux version 4.15.0-24-generic (buildd@lgw01-amd64-056) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018 (Ubuntu 4.15.0-24.26-generic 4.15.18) | |
Jul 3 12:28:18 web2 kernel: [ 0.000000] Linux version 4.15.0-24-generic (buildd@lgw01-amd64-056) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018 (Ubuntu 4.15.0-24.26-generic 4.15.18) | |
Jul 3 12:34:38 web2 kernel: [ 0.000000] Linux version 4.15.0-24-generic (buildd@lgw01-amd64-056) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018 (Ubuntu 4.15.0-24.26-generic 4.15.18) | |
Jul 3 15:25:21 web2 kernel: [ 0.000000] Linux version 4.15.0-24-generic (buildd@lgw01-amd64-056) (gcc versio |
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://www.yogoeasy.com | |
#1.下載Let's encrypt | |
sudo apt-get update | |
sudo apt-get install git | |
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
---------------------------------------------------------------------------------------- | |
#2. 申請證書 Root Domain (subdomain刪掉後面的-d www.$domain) | |
#網站根目錄資料夾請按照實際狀況填寫 |
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
echo "**********************************************" | |
echo "Get Let's Encrypt by myself without EasyEngine" | |
echo "**********************************************" | |
read -p "Enter domain: " domain | |
/opt/letsencrypt/letsencrypt-auto certonly --agree-tos --email yourname@gmail.com --webroot -w /var/www/$domain/htdocs -d $domain | |
# by https://www.yogoeasy.com |
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
<?php | |
/* 將Divi Library的模組用shortcode的方式插入文章 */ | |
function showmodule_shortcode($moduleid) { | |
extract(shortcode_atts(array('id' =>'*'),$moduleid)); | |
return do_shortcode('[et_pb_section global_module="'.$id.'"][/et_pb_section]'); | |
} | |
add_shortcode('showmodule', 'showmodule_shortcode'); | |
//by 優易教學網 https://www.yogoeasy.com |
NewerOlder