蓝信的主机调试(虚拟机部分)

思路:1、更改sources.list

2、更新补丁

3、安装net-tools,lvm2,sudo,wget

4、安装vmwaretools

5、设置sudoers

6、设置密码

7、调试hosts.allow和hosts.deny

8、调试lvm的硬盘

9、更改IP

 

 

 

fdisk /dev/sdb
n

w





mkdir /Data
apt-get update

apt-get upgrade

apt-get -y install net-tools  wget sudo lvm2





echo -e "ALL:202.198.16.185\nALL:202.198.16.168" >> /etc/hosts.allow
echo -e "ALL:ALL" >> /etc/hosts.deny

echo "LanXin-app2" > /etc/hostname

sed -i 's/10.100.200.52/10.100.72.81/g'  /etc/network/interfaces

sed -i 's/gateway 10.100.200.1/gateway 10.100.72.1/g' /etc/network/interfaces


more /etc/network/interfaces

reboot

vi /etc/sudoers

**************************


fdisk /dev/sdb

******************

pvcreate /dev/sdb

vgcreate JLU-NIC /dev/sdb1

lvcreate -L 1945G -n LanXin JLU-NIC

mkfs.ext4  /dev/JLU-NIC/LanXin
*************************

mount /dev/JLU-NIC/LanXin /Data


df -lh

vi /etc/fstab


********************








*********************************

debian10 安装后的更新




more /etc/network/interfaces




echo -e "ALL:202.198.16.185\nALL:202.198.16.168" >> /etc/hosts.allow
echo -e "ALL:ALL" >> /etc/hosts.deny

echo "LanXin-Redis-6" > /etc/hostname

sed -i 's/10.100.200.53/10.100.72.185/g'  /etc/network/interfaces

sed -i 's/gateway 10.100.200.1/gateway 10.100.72.1/g' /etc/network/interfaces

sed -i  's/https/http/g' /etc/apt/sources.list

sed -i  's/mirrors.ustc.edu.cn/mirrors.dc.jlu.edu.cn/g' /etc/apt/sources.list

sed -i '/debian-secu/s/^/#/' /etc/apt/sources.list

more /etc/network/interfaces

apt update

apt -y upgrade



更新sourse.list


更新sshd

#sed -i  's/mirrors.ustc.edu.cn/202.198.16.8/g' /etc/apt/sources.list


# sed '/callout/s/^/#/' /tmp/file

posted @ 2023-08-26 20:08  乐乐和笑笑  阅读(15)  评论(0编辑  收藏  举报