How to use packages that depend on Node.js core modules in React Native.
See the [node-libs-react-native][node-libs-react-native] library as a convenience for implementing this method.
| # 生成 dhparam.pem 文件, 在命令行执行任一方法: | |
| # 方法1: 很慢 | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 | |
| # 方法2: 较快 | |
| # 与方法1无明显区别. 2048位也足够用, 4096更强 | |
| openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096 |
第一步,创建一个存放备份的文件夹:
比如 mkdir /alidata/backup
第二步,新建一个自动备份的脚本:
#!/bin/sh
NAME='mxlzb' # 手动修改为待备份项目的数据库名
DATE=`date +%Y%m%d%H%M%S`| ## Install NGINX | |
| ## when installing on Amazon Linux AMI, use: | |
| $ sudo yum install nginx -y | |
| ## when installing on Amazon Linux 2 AMI, use | |
| $ sudo amazon-linux-extras install nginx1.12 -y | |
| ## Install PHP and PHP-FPM | |
| # for PHP version 7.1 use php71 and php71-fpm instead | |
| $ sudo yum install php -y | |
| $ sudo yum install php-fpm -y |
| # UPDATED 17 February 2019 | |
| # Redirect all HTTP traffic to HTTPS | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name www.domain.com domain.com; | |
| return 301 https://$host$request_uri; | |
| } | |
| # SSL configuration |
| #!/bin/bash | |
| # Raspberry Pi ZRAM script | |
| # Tuned for quad core, 1 GB RAM models | |
| # put me in /etc/init.d/zram.sh and make me executable | |
| # then run "sudo update-rc.d zram.sh defaults" | |
| modprobe zram | |
| echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams | |
| echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm |
#前言 由于大家都懂的, 国内使用go get的时候, 经常会各种失败, 如果有vpn的话, 打开vpn, 问题就解决了, 但vpn其实挺不灵活的.
相对来说shadowsock则灵活得多.
#解决方案 shadowsock + Privoxy
思路就是, 使用shadowsock建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.
| primary: | |
| image: mongo:3.0 | |
| volumes: | |
| - ./p:/data | |
| ports: | |
| - "27017:27017" | |
| # Our current version of docker-compose doesn't allow extra_hosts which would be the best way | |
| # to add curcular dependency container links in this case. We cant upgrade docker-compose | |
| # without upgrading docker to 1.7, and we can't do that without upgrading the kernel on our | |
| # CentOS VM's. As such we are using the hostname hask below to allow primary and secondary |
| .module-cache |