清理Magento文件
sudo rm -rf generated
sudo rm -rf pub/static/*
sudo rm -rf var/view_preprocessed
sudo rm -rf var/cache
sudo rm -rf var/page_cache
重新生成
php -dmemory_limit=3G bin/magento setup:upgrade
编译
php -dmemory_limit=3G bin/magento setup:di:compile
重新部署
php -dmemory_limit=2G bin/magento setup:static-content:deploy -f
生产模式
php bin/magento deploy:mode:set -s production
索引
php bin/magento indexer:reindex
缓理缓存
php bin/magento cache:flush
文件权限
chmod -R 777 ./*
chown -R www ./*
查询文件字符串
find /www/wwwroot/magenoued.com/ -type f -name '*.php'|xargs grep 'abcd'
相关文件查询
find /home/wwwroot/ -mtime -5 -name "*.php" -exec rm -rf {} \;
find / -type f -size +100M
find /srv/www/ -type f -name "*.tar"
find /home/wwwroot/ -name "*.php" -type f -print0 | xargs -0 egrep "(phpspy|c99sh|milw0rm|eval\(gzuncompress\(base64_decoolcode|eval\(base64_decoolcode|spider_bc|gzinflate)" | awk -F: '{print $1}' | sort | uniq
重启varnish
systemctl restart varnish.service
端口占用
netstat -tulpn
清除nginx缓存
rm -rf /www/server/nginx/proxy_cache_dir/*
varnish 配置
vi /etc/varnish/default.vcl
vi /etc/varnish/varnish.params
varnishhist 查看
redis 相关
/srv/program/redis/bin/redis-cli
AUTH password.redis.2016
flushall
nohup 后台处理
nohup php -f /srv/www/html/www.gzeh.com/shell/indexer.php -- -reindex catalog_url >> /srv/www/html/www.gzeh.com/shell/logs/catalog_url.log 2>&1
文件传输
rsync -P abcd.tar [email protected]:/alidata/www/
scp -V abcd.tar [email protected]:/alidata/www/
相关服务器
sudo /etc/init.d/httpd restart
sudo /etc/init.d/httpd reload
nginx -s reload
nginx -t
sudo /etc/init.d/httpd restart
sudo /etc/init.d/httpd reload
service mysql stop
service mysql start
service mysql restart
/etc/init.d/mysql restart
sudo service php-fpm restart
vi /etc/vsftpd/chroot_list
/sbin/service vsftpd restart
/etc/init.d/mariadb restart
/etc/init.d/mariadb stop