2024年最全debian技术--搭建debian软件仓库(4),2024年最新2024年字节跳动+京东+美团面试总结

先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前在阿里

深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年最新Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
img
img
img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上运维知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

需要这份系统化的资料的朋友,可以点击这里获取!

6.配置软件包管理器

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
问题及反思

1.解决root用户没法连接xshell的问题
在这里插入图片描述
systemctl restart sshd
2.在安装的时候不配置网络速度会更快,
1)中途退出安装重新安装的方法
在这里插入图片描述
按F10,再次进入安装界面,配置网络那里选择”现在不进行网络配置“
2)进行网卡配置

vim  /etc/network/interfaces
#The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.0.0.100
netmask 255.255.255.0
gateway 10.0.0.2

ifup eth0

3)配置dns

vim /etc/resolv.conf
search unassigned-domain
nameserver 10.0.0.2

4)连接网卡
在这里插入图片描述
5)启动网络
/etc/init.d/networking restart

三.debian配置

1.更新软件源

https://mirrors.tuna.tsinghua.edu.cn/help/debian/
在这里插入图片描述

root@debian:~# vi /etc/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ jessie main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ jessie-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ jessie-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security jessie/updates main contrib non-free

root@debian:~# apt install apt-transport-https
root@debian:~# apt-get update

2.安装常用软件

root@debian:~# apt-get install vim lsof tree -y

3.使用ll命令

root@debian:~# vim .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.

# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022

# You may uncomment the following lines if you want `ls' to be colorized:
 打开这一行:
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
打开这一行:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
root@debian:~# source .bashrc

4.创建用户

root@debian:~# useradd lbzy
root@debian:~# mkdir /home/lbzy
root@debian:~# chown -R lbzy:lbzy /home/lbzy
root@debian:~# vim /etc/passwd
lbzy:x:1001:1002::/home/lbzy:/bin/sh
把这一行改为
lbzy:x:1001:1002::/home/lbzy:/bin/bash
root@debian:~# su - lbzy
lbzy@debian:~$
原因:
在centos7中:[root@web01 ~]# ll /bin/sh
lrwxrwxrwx. 1 root root 4 Nov 16 04:49 /bin/sh -> bash  软链接是直接到bash
在debian中:root@debian:~# ll /bin/sh
lrwxrwxrwx 1 root root 4 11月 8 2014 /bin/sh -> dash

5.配置仓库

5.1 环境准备
服务端:debian-100      ip地址:10.0.0.100
客户端:debian-200      ip地址:10.0.0.200

5.2 安装部署nginx
在服务端:
root@debian-100:~# vim /etc/nginx/nginx.conf
user www;                                 #修改这一行
#include /etc/nginx/sites-enabled/*       #删除这一行 
mail ...                                  #删掉mail后面的部分
 
root@debian-100:~# groupadd www -g 888
root@debian-100:~# useradd www -u 888 -g 888 -M -s /sbin/nologin
root@debian-100:~# mkdir -p /data/mydeb/
root@debian-100:/etc/nginx/conf.d# cat > /etc/nginx/conf.d/apt-deb.conf<<EOF
> server {
> listen 8080;
> server_name localhost;
> autoindex on;
> location / {
> index index.html index.htm;
> root /data/mydeb/;
> }
> }
> EOF
root@debian-100:~# chown -R www:www /data/
root@debian-100:~# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@debian-100:~# systemctl restart nginx(因为默认已经启动,所以这里必须使用restart)

访问成功:
http://10.0.0.100:8080
在这里插入图片描述

5.3 搭建仓库
服务端搭建仓库:
root@debian-100:/etc/nginx/conf.d# apt-get clean
root@debian-100:~# apt-get install -d screen
root@debian-100:~# apt-get install -d curl
root@debian-100:~# apt-get install -d wget
在官网查找https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/
安装依赖:
apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
添加软件仓库:
add-apt-repository \ "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian \ $(lsb_release -cs) \ stable"
查看:
root@debian-100:~#apt-get update 
root@debian-100:~#apt-get install -d docker-ce        #-d只下载不安装
root@debian-100:~# tree /var/cache/apt/archives/

root@debian-100:~# mv /var/cache/apt/archives/ /data/mydeb/
root@debian-100:~# cd /data/mydeb/
root@debian-100:/data/mydeb# ls
archives
root@debian-100:/data/mydeb# mv archives/* .
root@debian-100:/data/mydeb# mv archives /var/cache/apt/
创建目录索引:
root@debian-100:/data/mydeb# apt-get install dpkg-dev
把最新的软件包更新加载在这个包里Packages.gz,客户端可以直接下载:(每次更新都要执行这条命令,客户端才可以直接下载更新的信息)
root@debian-100:/data/mydeb# dpkg-scanpackages ./ /dev/null | gzip -9c > Packages.gz

客户端验证:
root@debian-200:~# vim /etc/apt/sources.list
deb http://10.0.0.100:8080/ /
root@debian-200:~# apt-get update
忽略 http://10.0.0.100:8080 InRelease
忽略 http://10.0.0.100:8080 Release.gpg
忽略 http://10.0.0.100:8080 Release
获取:1 http://10.0.0.100:8080 Packages [14.6 kB]
忽略 http://10.0.0.100:8080 Translation-zh_CN
忽略 http://10.0.0.100:8080 Translation-zh
忽略 http://10.0.0.100:8080 Translation-en
下载 14.6 kB,耗时 0秒 (241 kB/s)
正在读取软件包列表... 完成
root@debian-200:~# apt-cache search docker-ce
docker-ce - Docker: the open-source application container engine
root@debian-200:~# systemctl start docker


### 最后的话

最近很多小伙伴找我要Linux学习资料,于是我翻箱倒柜,整理了一些优质资源,涵盖视频、电子书、PPT等共享给大家!

### 资料预览

给大家整理的视频资料:

![](https://img-blog.csdnimg.cn/img_convert/432e2bcd3a97b2a4d02bfd1780aa8833.png)

给大家整理的电子书资料:

  

![](https://img-blog.csdnimg.cn/img_convert/cde8eba801b649b3912b407e3af94607.png)



**如果本文对你有帮助,欢迎点赞、收藏、转发给朋友,让我有持续创作的动力!**

**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**

**[需要这份系统化的资料的朋友,可以点击这里获取!](https://bbs.csdn.net/forums/4f45ff00ff254613a03fab5e56a57acb)**


**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**

转发给朋友,让我有持续创作的动力!**

**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**

**[需要这份系统化的资料的朋友,可以点击这里获取!](https://bbs.csdn.net/forums/4f45ff00ff254613a03fab5e56a57acb)**


**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值