Linux实用命令杂集

  • Post author:
  • Post category:linux


杂记:


1. linux crontab laravel

:

* * * * * /usr/bin/php /var/www/api.xxx.com/artisan schedule:run >> /dev/null 2>&1


2. rpm下载安装

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

yum -y install mysql57-community-release-el7-10.noarch.rpm


3. mysql修改root初始密码,创建可远程登录新用户密码


ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘OMXlX222222222’;

grant all privileges on *.* to ‘dbusername’@’%’ identified by ‘0X=C!1i3333ddd’ with grant option;

flush privileges;


4. nginx与php-fpm两种通信方式: unix socket方式要比tcp的方式快,而且消耗资源少

listen = /run/php-fpm/www.sock

upstream php-fpm {


server unix:/run/php-fpm/www.sock;

}

unix:/run/php-fpm/www.sock;

fastcgi_pass unix:/run/php-fpm/www.sock;

fastcgi_pass 127.0.0.1:9000;


5. laravel storage 文件夹权限修改

chmod -R 777 /var/www/xxxx-prod/user/xxxx_user_api/storage


6. 将网站某个文件夹及子文件夹内容备份一份并重命名

cp -r /var/www/admin.xxxxx.com /var/www/admin.xxxxx.com_backup



版权声明:本文为eureka_eureka原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。