设置权限
chown www:www -R /home/wwwroot/web
chmod 755 -R /home/wwwroot/web
上锁/解锁
chattr +i /home/wwwroot/web/.user.ini
chattr -i /home/wwwroot/web/.user.ini
更新下系统基础环境
apt update && apt upgrade -y
安装点基础的软件
apt install -y wget git zip curl screen
清理下垃圾
apt autoremove
screen启动/返回窗口
screen -S lnmp
screen -R lnmp
ubuntu开启ROOT用户私钥远程登陆
sudo passwd root
vim /etc/ssh/sshd_config
RSAAuthentication yes
PubkeyAuthentication yes
PermitRootLogin yes
sudo service ssh restart
ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
cd .ssh
cat id_rsa.pub >> authorized_keys
为linux增加file swap交换分区
dd if=/dev/zero of=/swapfile bs=1M count=1024
/sbin/mkswap /swapfile
/sbin/swapon /swapfile
/sbin/swapon -s
vi /etc/fstab
/swapfile swap swap defaults 0 0
本文作者:原萌
本文链接:https://yuanmoe.com/archives/linux-code.html
版权声明:未经作者授权禁止转载
学不会