百变贝贝 | Bettys blog

Web Name: 百变贝贝 | Bettys blog

WebSite: http://www.juyimeng.com

ID:32438

Keywords:

贝贝,百变,blog,

Description:

systemctl unmask firewalld #执行命令,即可实现取消服务的锁定systemctl mask firewalld # 下次需要锁定该服务时执行systemctl start firewalld.service #启动防火墙systemctl stop firewalld.service #停止防火墙systemctl reloadt firewalld.service #重载配置systemctl restart firewalld.service #重启服务systemctl status firewalld.service #显示服务的状态systemctl enable firewalld.service #在开机时启用服务systemctl disable firewalld.service #在开机时禁用服务systemctl is-enabled firewalld.service #查看服务是否开机启动systemctl list-unit-files|grep enabled #查看已启动的服务列表systemctl failed #查看启动失败的服务列表firewall-cmd使用firewall-cmd state #查看防火墙状态firewall-cmd reload #更新防火墙规则firewall-cmd state #查看防火墙状态firewall-cmd reload #重载防火墙规则firewall-cmd list-ports #查看所有打开的端口firewall-cmd list-services #查看所有允许的服务firewall-cmd get-services #获取所有支持的服务/usr/lib/firewalld/services#区域相关firewall-cmd list-all-zones #查看所有区域信息firewall-cmd get-active-zones #查看活动区域信息firewall-cmd set-default-zone=public #设置public为默认区域firewall-cmd get-default-zone #查看默认区域信息firewall-cmd zone=public add-interface=eth0 #将接口eth0加入区域public#接口相关firewall-cmd zone=public remove-interface=eth0 #从区域public中删除接口eth0firewall-cmd zone=default change-interface=eth0 #修改接口eth0所属区域为defaultfirewall-cmd get-zone-of-interface=eth0 #查看接口eth0所属区域用例firewall-cmd query-port=8080/tcp # 查询端口是否开放firewall-cmd add-port=80/tcp permanent #永久添加80端口例外(全局)firewall-cmd remove-port=80/tcp permanent #永久删除80端口例外(全局)firewall-cmd add-port=65001-65010/tcp permanent #永久增加65001-65010例外(全局)firewall-cmd zone=public add-port=80/tcp permanent #永久添加80端口例外(区域public)firewall-cmd zone=public remove-port=80/tcp permanent #永久删除80端口例外(区域public)firewall-cmd zone=public add-port=65001-65010/tcp permanent #永久增加65001-65010例外(区域public)firewall-cmd reload #重启防火墙(修改配置后要重启防火墙) 参照这个文章的配置, https://www.ecsoe.com/archives/38.html 一次成功先安装了nginx+ssl,再安装v2ray,调整配置。yum -y updatebash (curl -L -s https://install.direct/go.sh)systemctl enable v2rayvi /etc/nginx/conf.d/v2ray.confserver { listen 443 ssl; server_name example.com; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; error_page 497 https://$host$request_uri;location /ray { proxy_pass http://127.0.0.1:10000; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade proxy_set_header Host $http_host;Swift_TransportExceptionExpected response code 250 but got code 550 , with message 550 5.7.1 Request not taken sender domain mismatch ! 其实说的比较清楚了。是Request not taken sender domain mismatch但是web.php已经修改了,找了半天,发现config\params.php下面的adminEmail也要修改成一致的才行。1、小米路由器要开启ssh2、ssh到小米路由器,编辑/etc/samba/smb.conf.template 文件,将其中的interfaces那一行改为interfaces = br-lan eth0.23、编辑/etc/config/firewall文件,在文件最后添加以下内容:config rule 'samba_udp' option src 'wan' option dest_port '137 138' option proto 'udp' option target 'ACCEPT' option name 'samba_incoming_udp'config rule 'samba_tcp' option src 'wan' option dest_port '139 445' option proto 'tcp' option target 'ACCEPT' option name 'samba_incoming_tcp'4、执行/etc/init.d/samba restart命令重启samba服务5、执行/etc/init.d/firewall restart命令重启防火墙用\\xxx.xxx.xxx.xxx 访问试试。xxx是小米路由器的wan ip地址 本脚本原版来自 lnmp.org,修改如下:不需要写每个日志文件,除了error日志,其他的都自动切割不按照年月分目录,放在一个目录,这样好处理点。用法就是放在服务器上 chmod +x,然后加到crontab里cat /root/bin/cut_nginx_logs.sh#!/bin/bash#function:cut nginx log files for lnmp#author: http://lnmp.org#modified by http://www.juyimeng.com/lnmp-nginx-log-cut-per-day-rotation.html#set the path to nginx log fileslog_files_path= /home/wwwlogs/ #log_files_dir=${log_files_path}$(date -d yesterday + %Y )/$(date -d yesterday + %m )log_files_dir=${log_files_path}bak/#set nginx log files you want to cut#get log files list,exclude error.loglog_files_name=($(/bin/find $log_files_path -maxdepth 1 -name *.log |grep -v error| awk -F/ '{ print $NF }'))#set the path to nginx.nginx_sbin= /usr/local/nginx/sbin/nginx #Set how long you want to savesave_days=15#############################################Please do not modify the following script #############################################mkdir -p $log_files_dirlog_files_num=${#log_files_name[@]}#cut nginx log filesfor((i=0;i $log_files_num;i++));domv ${log_files_path}${log_files_name[i]} ${log_files_dir}$(date -d yesterday + %Y%m%d_%s )_${log_files_name[i]}#delete $save_days ago nginx log filesfind $log_files_path -mtime +$save_days -exec rm -rf {} \;#reload nginx$nginx_sbin -s reload k2定时脚本[email protected]:~# crontab -l0 1 * * * /etc/shadowsocks/update.sh /var/log/shadowsocks_watchdog.log 2 1*/10 * * * * /etc/shadowsocks/checknet.sh /var/log/shadowsocks_watchdog.log 2 10 1 * * 7 echo /var/log/shadowsocks_watchdog.log更新ip地址[email protected]:~# cat /etc/shadowsocks/update.shwget -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv4/ \{ printf( %s/%d\n , $4, 32-log($5)/log(2)) }' /etc/chinadns_chnroute.txt \ /etc/init.d/shadowsocks restart /etc/init.d/chinadns restart[email protected]:~#检查网络状态,发现有问题就重启[email protected]:~# cat /etc/shadowsocks/checknet.sh#!/bin/shLOGTIME=$(date +%Y-%m-%d %H:%M:%S )wget --spider --quiet --tries=1 --timeout=10 www.google.co.jpif [ $? == 0 ]; then echo '['$LOGTIME'] No Problem.' exit 0 wget --spider --quiet --tries=1 --timeout=10 www.baidu.com if [ $? == 0 ]; then echo '['$LOGTIME'] Problem decteted, restarting shadowsocks.' /etc/init.d/shadowsocks restart /etc/init.d/chinadns restart else echo '['$LOGTIME'] Network Problem. Do nothing.'[email protected]:~#

TAGS:贝贝 百变 blog 

<<< Thank you for your visit >>>

Websites to related :
Primo Tempo

  Primo Tempo 1.01 Three dimensional sound work composed by Thomas Bottini + Dominique Lacloche 16 min, audio HEADPHONES OBLIGATORY voices: Tala Hadid +

Home Kings High School

  Open Night - 30th JulyCome and join us to discover who we are and what we do at King's.We start in the Performing Arts Centre on Bay View Road at 6:30

arbindsingh.com | Imparting educ

  Hi ! friends! I am Arbind Kumar Singh, a post graduate in mathematics and a highly energetic, dedicated and enthusiastic faculty specialized in mathem

Information Processing Lab

  Main research thrust of our current work is in the multimedia signal processing, multimedia networking and machine learning areas. A specific focus is

Basement 2 Finish

  I am extremely pleased with my finished basement. From our initial meeting, to the completion of my basement project every item we discussed was imple

Dům a zahrada bazar - Bazoš.cz

  Hlinikova vez - TOP - [23.7. 2020]9x modra tyc12x cervena tyc3x2m ram3x2m ram s zebrikem1x1m ram1x1m ram s zebrikem4x kolecko4x stabilizator3x podlaha

Acosta Farms Wholesale Nursery

  It has been over 50 years since Alcides Acosta planted his first avocado grove in Miami, Florida. For decades now, he and his family have come to own

Pálmavilág - Kezdőlap

  Madagaszkár szigetéről származó, mérsékelten fagytűrő pálma.BŐVEBBEN Szabad termesztésű, eredeti élőhelyről származó spanyol import

Bert Monroy

  Creating what you see! As a photo-realist painter, I have often been asked why I don't just take a photograph. Good question, when you consider my pai

Athens Drive High School Band

  No Marching Band Rehearsal in JulyJuly 13, 2020Dear Marching Band student and parent,Last Friday, July 10, WCPSS posted the following announcement:A

ads

Hot Websites