目录
这是blog的展示页面,按时间排序了blog文件下的内容
右边的目录每次展示9篇
滑倒最下面可以翻页看到后面或前面的9篇
Debian安装nextcloud
(初步安装未做安全优化) 安装步骤
apt-get update
apt-get upgrade
apt-get vim zip sudo
apt-get install apache2 mariadb-server libapache2-mod-php7.0
apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring
apt-get install php7.0-intl php7.0-mcrypt php-imagick php7.0-x`ml php7.0-zip
systemctl start apache2
systemctl enable apache2
systemctl start mysql
systemctl enable mysql
reboot
配置MariaDB
mysql_secure_installation 设置数据库
mysql -u root -p
创建名为nextclouddb的数据库
MariaDB [(none)]>CREATE DATABASE nextclouddb;
创建nextcloud用户名和密码
MariaDB [(none)]>CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]>GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextcloud'@'localhost';
重新加载MariaDB权限
MariaDB [(none)]>FLUSH PRIVILEGES;
退出
MariaDB [(none)]>\q 安装NextCloud
wget https://download.nextcloud.com/server/releases/nextcloud-13.0.4.zip
unzip nextcloud-13.0.4.zip
mv nextcloud /var/www/html/
chown -R www-data:www-data /var/www/html/nextcloud
设置配置
vi /etc/apache2/sites-available/nextcloud.conf
Alias / “/var/www/nextcloud/”
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
[IfModule mod_dav.c](file:/home/j/Notes/202207%E4%BB%A5%E5%89%8D%E7%9A%84log/_posts/2018/IfModule%20mod_dav.c) Dav off </IfModule> SetEnv HOME /var/www/nextcloud SetEnv HTTP_HOME /var/www/nextcloud </Directory> 链接配置 ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf 关闭默认配置 a2dissite 000-default a2ensite nextcloud 其他 a2enmod rewrite a2enmod headers a2enmod env a2enmod dir a2enmod mime a2enmod setenvif 重启apache2 systemctl restart apache2 ufw使用 启用 ufw enable 使用方法 ufw allow 80 ssl a2enmod ssl a2ensite default-ssl service apache2 reload 配置php 找到php.ini文件地址 php -i | grep “Loaded Configuration File” 添加 opcache.enable=1 opcache.enable_cli=1 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=10000 opcache.memory_consumption=128 opcache.save_comments=1 opcache.revalidate_freq=1 错误 起因 service apache2 restart Job for apache2.service failed. See “systemctl status apache2.service” and “journalctl -xe” for details. 解决方法 cd /etc/apache2 apache2ctl configtest
btc钱包
导出BTC-qt钱包私钥
walletpassphrase 1234567890 10000 解锁命令 + 钱包密码 + 解锁时间
dumpprivkey xxxxxxxxxxxxxxxxxxxxxxx 导出私钥命令 + 钱包地址 生成钱包
离线钱包生成工具 bitaddress.org 这个工具可以在本地生成钱包同时得到私钥 接收到比特币后 仅凭钱包地址即可在区块链浏览器查询交易和余额情况
upgrade Kali Linux
安装完成后必然是先升级 因为还不会用所以今天就只升级
apt-get update
apt-get upgrade
apt-get dist-upgrade
修改用户root的密码
password root
Firefox设置
用Firefox一段时间了今天在另一台设备上安装重新整理了需要的设置
设置中文
获取Firefox语言包
Mozilla 字典和语言包页面https://addons.mozilla.org/firefox/language-tools/
改变界面语言
about:config
intl.locale.requested
如果没有intl.locale.requested可以自己创建
about:config
这里本来有个表格,当时不好处理就没有放了,可以看下面的链接。
表格来自 https://github.com/TheCreeper/PrivacyFox 并不是完整的还应该参考 https://cybermagicsec.github.io/privacytools-zh/#addons
插件
安装 “Privacy Badger” 阻止被追踪 利用 “uBlock Origin” 来封锁广告与追踪器 利用 “Self-Destructing Cookies” 自动删除 Cookies 使用 “HTTPS Everywhere” 加密连接 利用 “Decentraleyes” 来关闭内容传递网络 利用“NoScript Security Suite”套件完整控制
再也不买不能解bl的手机了
将vs988t刷成us997
1、找一台win电脑安装USB驱动 2、手机接上数据线进入刷机模式
手机进入下载模式(刷机模式),通用方法:关机后按住音量上键插数据线,手机显示“Download mode”后松手,稍等几秒钟,手机会进入“Firmware update”界面
3、安装LGUP_Install_Ver_1_14_3.msi
https://www.mylgphones.com/download-lg-up-software
4、替换LGUP为破解版
https://forum.xda-developers.com/v20/how-to/guide-patch-lgup-to-unlock-features-t3652222
5、刷入下载好的固件
LG所有机型固件下载地址 https://lg-firmwares.com/ 其他 其他
imei查询地址: https://imei.guru/ http://www.lgbbs.com/thread-56343-1-1.html
mac os上直接使用NTFS
sudo nano /etc/fstab
然后把下面的内容写进去,Windows注意改成自己磁盘的名字。如果你的磁盘名字里面有空格,就需要用\040代替空格 把xxxx改成磁盘的名字 如果磁盘名字里面有空格 需要用\040代替空格
LABEL=xxxx none ntfs rw,auto,nobrowse
重装mac os
制作安装盘
https://support.apple.com/en-us/HT201372
安装软件
brew安装常用软件
/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
brew install wireguard-tools wget go node git
brew cask install visual-studio-code riot dejalu android-file-transfer skim vlc appcleaner transmission keepassxc firefox google-chrome
本来还要装macchanger但好像出现了一点问题
app store
Twitterrific reeder Numbers Pages Xcode
其他软件
bitcoin tor gnupg
参考
Mac os上直接使用NTFS Homebrew使用命令 改变MAC地址 在小内存设备上安装bitcoin core钱包 Firefox设置 MacOS 的安全和隐私指南 oh-my-zsh介绍
mac在Debian安装wireguard和使用
Debian服务器端
1、在服务器安装wireguard
echo “deb http://deb.debian.org/debian/ unstable main” > /etc/apt/sources.list.d/unstable.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' > /etc/apt/preferences.d/limit-unstable
apt update
apt install wireguard
2、生成公钥、私钥、共享密钥
sudo mkdir -p /etc/wireguard && sudo chmod 0777 /etc/wireguard
cd /etc/wireguard
umask 077
wg genkey | tee private.key | wg pubkey > public.key | wg genpsk > preshared.key
输出私钥
cat private.key
输出公钥
cat public.key
输出共享密钥
cat preshared.key
3、编辑配置文件
sudo vi wg0.conf
[Interface]
Address = 192.168.1.1/24服务器上的接口
ListenPort = 端口
PrivateKey = 服务器私钥
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
SaveConfig = true
[Peer]
PublicKey = 连接节点公钥(由客户端生成)
AllowedIPs = 192.168.1.2/32 (VPN 隧道的内网 IP 段)
设置服务器的 NAT 流量转发
sudo vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
sudo sysctl -p
在服务器端添加虚拟网卡 wg0,设置隧道 IP 和 iptables 规则
sudo ip link add dev wg0 type wireguard
sudo ip address add dev wg0 192.168.1.1/24
sudo ip link set wg0 up
sudo wg setconf wg0 /etc/wireguard/wg0.conf
sudo iptables -A FORWARD -i wg0 -j ACCEPT
sudo iptables -A FORWARD -o wg0 -j ACCEPT
sudo iptables -t nat -A POSTROUTING -o wg0 -j MASQUERADE
sudo iptables -t nat -A POSTROUTING -o ens4 -j MASQUERADE
如果遇到提示 RTNETLINK answers: Operation not supported很可能就是wireguard模块没有加载 查看模块是否启动
lsmod | grep wireguard
先检查是否升级到最新系统再启动模块,如果报错需要重启
modprobe wireguard
检查wg设置是否正常
sudo wg show
4、设置开启启动
systemctl enable wg-quick@wg0 mac os端
1、安装
/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
brew install wireguard-tools
2、生成公钥、私钥
wg genkey | tee private.key | wg pubkey > public.key
输出私钥
cat private.key
输出公钥
cat public.key
3、编辑配置文件wg0.conf
[Interface]
Address = 192.168.1.3/32 本地接口地址
PrivateKey = 本地客户端私钥
ListenPort = 端口
DNS = 1.1.1.1
[Peer]
PublicKey = 服务器端公司(由服务器端生成)
AllowedIPs = 0.0.0.0/0,::0/0 (VPN隧道的内网IP段)
Endpoint = 远程服务器公网IP和端口
4、启动/关闭
wg-quick up wg0
wg-quick down wg0
Debian创建新用户和设置防火墙
创建新用户
1、登入root账号创建新用户
adduser xx
2、将新创建的用户添加到sudo组使xx用户可以执行超级权限
usermod -aG sudo xx 设置ufw防火墙
防火墙可以确保只允许某些服务链接网络。
1、安装
sudo apt install ufw
2、允许ssh链接
ufw allow OpenSSH
3、启用防火墙
ufw enable
4、查看防火墙状态
ufw status
