测试路由器支持IPV6
参考 这里
我用的是TPlink WDR7660 支持IPV6
主要设置桥模式
玩客云刷写固件
参考 这里 还有这里
玩客云固定IP
参考这里
sudo armbian-config
选择Network
选择有线网络->ip
选择static
然后根据自己情况进行设置 点击OK即可
更新国内源
参考这里
证书认证
apt install apt-transport-https ca-certificates
修改source.list
vim /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stretch-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stretch-backports main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
修改armbian.list
# vim /etc/apt/sources.list.d/armbian.list
#deb http://beta.armbian.com stretch main stretch-utils stretch-desktop
deb http://mirrors.tuna.tsinghua.edu.cn/armbian/ stretch main stretch-utils stretch-desktop
如果出现
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
进行如下操作
# touch /etc/apt/apt.conf.d/99verify-peer.conf
# echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }"
然后进行
sudo apt-get update&&upgrade -y
其他配置 可参考这里
硬盘自动挂载 参考这里
sudo fdisk -l
#卸载文件卷
umount /dev/sda(sda以实际为准)
#格式化硬盘位ext4
sudo mkfs -t ext4 /dev/sda
#在根目录创建mnts目录
cd ./
mkdir -p /mnts
#获取磁盘分区,并挂载磁盘到mnts目录
lsblk
mount /dev/sda /mnts/
#获取硬盘的UUID
blkid /dev/sda
#通过winscp编辑 /etc/fstab文件,在fstab最后添加储存设备信息,实现开机自动加载
UUID=xxxx /mnts ext4 defaults 0 0(xxxx为自己储存设备的uuid,ext4为自己储存设备的格式)
#重新加载fstab文件
mount -a
LNMP(linux+nginx+mysql+php)
apt-get -y install nginx
apt install -y mariadb-server
apt install -y php php-fpm php7.0-mysql php7.0-gd php7.0-curl php7.0-mbstring
nano /etc/nginx/sites-enabled/default
nginx 44行添加 index.php
对56~63行部分行去#号处理
重启检查配置是否正确
service nginx restart
配置mariadb
mysql_secure_installation
配置mariadb远程访问权限
mysql -u root -p
#使用123456 登录
use mysql;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
update user set plugin = 'mysql_native_password' where user = 'root';
flush privileges;
exit;
MariaDB修改配置文件允许远程访问
nano /etc/mysql/mariadb.conf.d/50-server.cnf
将bind-address = 127.0.0.1 改为 bind-address = 0.0.0.0
安装 phpadmin(数据库管理软件)
wget -P /var/www/html/ https://files.phpmyadmin.net/phpMyAdmin/4.9.7/phpMyAdmin-4.9.7-all-languages.zip
cd /var/www/html
unzip phpMyAdmin-4.9.7-all-languages.zip
mv phpMyAdmin-4.9.7-all-languages phpmyadmin
rm phpMyAdmin-4.9.7-all-languages.zip
chmod -R 777 phpmyadmin
安装wordpress 参考这里
wget -P /var/www/html/ https://cn.wordpress.org/latest-zh_CN.zip
unzip latest-zh_CN.zip
chmod -R 777 wordpress
rm latest-zh_CN.zip
安装smba
apt-get install -y samba
nano /etc/samba/smb.conf
smbpasswd -a root
#重启smba 服务器
service smbd restart