其他分享
首页 > 其他分享> > 整理的debian装机步骤

整理的debian装机步骤

作者:互联网

整理的debian装机步骤

整理的debian装机步骤

第一步:断网(禁止更新,最小化安装)

配置源



https://mirrors.tuna.tsinghua.edu.cn/help/debian/

vi /etc/apt/sources.list

deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib


# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-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/ buster-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free

如果遇到无法拉取 https 源的情况,请先使用 http 源并安装:

sudo apt install apt-transport-https ca-certificates

需要安装的一些常用工具


apt-get install openssh-server ssh vim wget

启动ssh
debian 开启SSH
1、修改sshd_config文件,命令为:vi /etc/ssh/sshd_config 
2、将#PasswordAuthentication no的注释去掉,并且将NO修改为YES  //我的kali中默认是yes
3、将#PermitRootLogin yes的注释去掉 //我的kali中默认去掉了注释
4、启动SSH服务,命令为:/etc/init.d/ssh start // 或者service ssh start
5、验证SSH服务状态,命令为:/etc/init.d/ssh status
6. 添加开机自启动   update-rc.d ssh enable

关闭则为:
update-rc.d ssh disabled
自启动需要重启生效

debian中默认不存在sudo命令解决方法


1.使用su安装sudo
$su
#apt-get install sudo
2.给账户设置管理员权限
#vim /etc/sudoers
3.添加一行,其中”username”替换为登陆账户的名称,输入时不加引号
"username" ALL=(ALL) ALL


chmod u+w /etc/sudoers
xxx ALL=(ALL:ALL) ALL

sudo apt-get install net-tools

exit
reboot

phpstudy-linux面板(小皮面板)
https://www.xp.cn/linux.html#install-show

python3-pip


sudo apt-get install python3 python3-pip

pip3 --version

sudo  apt install build-essential python3-dev python3-setuptools

wd@debian:~$ pwd
/home/wd
wd@debian:~$ mkdir .pip
wd@debian:~$ vim .pip/pip.conf

添加内容:

[global]
index-url=http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com

nginx

nginx -t                         # 查看nginx状态
nginx -s reload            # 重新载入配置文件
nginx -s reopen           # 重启 Nginx
nginx -s stop               # 停止 Nginx



标签:non,buster,mirrors,步骤,装机,deb,main,debian
来源: https://blog.csdn.net/wuduan675068994/article/details/116715612