备查

年龄大了 写这里留着自己查阅

tasksel debian安装桌面
cat /etc/issue 看系统版本
tar cfz vpser.tar.gz tool /* 把tool目录打包且压缩为vpser.tar.gz文件
tar xzvf FileName.tar.gz /* 解压.tar.gz 和 .tgz
gzip -d ge.tar.gz
tar xvJf *.tar.xz
tightvncserver 启动vnc
/usr/local/nginx/conf/nginx.conf
curl -O https://d.xxxx.xyz/get-pip.py && python get-pip.py
pip install pyinstaller==3.2.1

dd if=/dev/zero of=/swapfile bs=1k count=204800 && mkswap /swapfile && swapon /swapfile && echo “/var/swapfile swap swap defaults 0 0″ >> /etc/fstab && apt-get install wget curl -y && wget http://soft.vpser.net/lnmp/lnmp1.8.tar.gz -cO lnmp1.8.tar.gz && tar zxf lnmp1.8.tar.gz && cd lnmp1.8 && LNMP_Auto=”y” DBSelect=”2″ DB_Root_Password=”xiaoyaoking” InstallInnodb=”y” PHPSelect=”10″ SelectMalloc=”1″ ./install.sh lnmp

wget -O finecms.zip “http://nb.baidupcs.com/file/f49d88c4e3e36bbadc524908219467e5”

export http_proxy=192.168.1.86:7070
export https_proxy=192.168.1.86:7070

安装 phpRedisAdmin
git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git && cd phpRedisAdmin && git clone https://github.com/nrk/predis.git vendor

dd debian10
bash <(wget –no-check-certificate -qO- ‘https://moeclub.org/attachment/LinuxShell/InstallNET.sh’) -d 10 -v 64 -a -p “7758258”

mysqldump -u root -p test_db > test_db.sql
mysql -u root -p test_db < test_db.sql

mysqldump -u root -p –all-databases > all_db.sql
mysqldump -uroot -p –all-databases | gzip -9 – > /root/backup/alldb_.sql.gz

/usr/local/lib/python2.7/dist-packages

ls /usr/bin/python*
ln -s /usr/local/mysql/bin/mysql_config /usr/bin/mysql_config
ln -s /usr/bin/python2.7 /usr/bin/python

ln -s /usr/bin/python3 /usr/bin/python

crontab -e

chmod -R 777
chown -R www /home/wwwroot 更改文件拥有者
chgrp -R www /home/wwwroot/xxx.com/web 递归切换用户组为 www

chmod -R 755 /home/wwwroot/

chown -R www /home/cache/ && chgrp -R www /home/cache/
chown -R www /home/wwwroot/ && chgrp -R www /home/wwwroot/
chown -R nginx /home/wwwroot/ && chgrp -R nginx /home/wwwroot/
chown -R www /home/ftproot/ && chgrp -R www /home/ftproot/
chown -R mysql /usr/local/mysql/var && chgrp -R mysql /usr/local/mysql/var

移除跨目录: chattr -i /网站目录/.user.ini

终止指定名称的进程
ps -ef | grep chromium | grep -v grep | cut -c 9-15 | xargs kill -9

pem转 pub
ssh-keygen -y -f aws_ec2.pem > aws_ec2.pem.pub

mysql 批量替换
UPDATE `tab` SET content = REPLACE(content, ‘aaaaa’, ‘bbbbb’)

linux 可执行文件压缩 gzexe 文件名,无扩展名需要改为 .SH

先执行:/usr/local/nginx/sbin/nginx -t 检查配置是否正常,
如果显示:the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok configuration file /usr/local/nginx/conf/nginx.conf test is successful 则正常,否则按错误提示修改配置。

再执行 kill -HUP `cat /usr/local/nginx/nginx.pid` 使配置生效,域名解析生效后就可以访问xiaoyaoking.com了。

/usr/local/nginx/sbin/nginx -s reload 重启即可。


/usr/local/nginx/conf/
/usr/bin/unzip -o -q /home/www/blog-xxxx.zip -d /home/www/xxxx.info/


/usr/bin/ 常用程序

2) 即时生效,重启后失效service 方式
开启: service iptables start
关闭: service iptables stopiptables方式查看防火墙状态:
/etc/init.d/iptables status暂时关闭防火墙:
/etc/init.d/iptables stop重启iptables:
/etc/init.d/iptables restart

LNMP状态管理命令:

/root/lnmp restart
/etc/init.d/nginx reload
LNMP状态管理: /root/lnmp {start|stop|reload|restart|kill|status}
Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
Memcached状态管理:/etc/init.d/memcached {start|stop|restart}
PHP-FPM状态管理:/etc/init.d/php-fpm {start|stop|quit|restart|reload|logrotate}
PureFTPd状态管理: /etc/init.d/pureftpd {start|stop|restart|kill|status}
ProFTPd状态管理: /etc/init.d/proftpd {start|stop|restart|reload}

如重启LNMP,输入命令:/root/lnmp restart 即可,单独重启mysql:/etc/init.d/mysql restart

LNMPA状态管理命令:

LNMPA状态管理: /root/lnmp {start|stop|reload|restart|kill|status}
Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
Memcached状态管理:/etc/init.d/memcached {start|stop|restart}
PureFTPd状态管理: /etc/init.d/pureftpd {start|stop|restart|kill|status}
ProFTPd状态管理: /etc/init.d/proftpd {start|stop|restart|reload}
Apache状态管理:/etc/init.d/httpd {start|stop|restart|graceful|graceful-stop|configtest|status}

下载文件 wget -c http://soft.vpser.net/lnmp/lnmp0.6.tar.gz
隐藏下载 wget -b -c http://www.xxxx.com/526net_blog.zip -o 526net_blog.log

进入目录 cd lnmp0.6/
执行命令 ./centos.sh
解压zip unzip name.zip
设权限 chmod -R 777
rm -rf mydir /*删除mydir目录*/
—————————————————-
添加主机
进入 root/lnmp 输入
./host.sh

/root/vhost.sh
——————————————————–

统计账号个数:
cat /etc/passwd | wc -l

统计root组权限账号个数,以备攻击:
cat /etc/passwd | grep :0

看看有没有权限读shadow文件:
cat /etc/shadow > shadow.txt

F:\phpStudy\MySQL\bin\mysqldump -uweb -p000000 web > d:\mysqlbak\web_%date:~0,4%%date:~5,2%%date:~8,2%.sql


git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git
cd phpRedisAdmin
git clone https://github.com/nrk/predis.git vendor

发表评论

您的电子邮箱地址不会被公开。