ubuntu18.04网络配置、gcc安装、ssh配置
ubuntu新机器网络配置
vim /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
ens33:
dhcp4: no
addresses: [192.168.0.11/24]
gateway4: 192.168.0.1
netplan apply
关闭apparmor
systemctl stop apparmor
离线安装gcc
-
下载gcc及其依赖包
rm -rf /var/cache/apt/archives sudo apt-get -d install gcc-4.8 sudo apt-get -d install binutils-doc gcc-4.8-locales gcc-4.8-multilib gcc-4.8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan0-dbg libtsan0-dbg libquadmath0-dbg glibc-doath0-dbg glibc-doc
-
将 /var/cache/apt/archive 压缩打包到内网机器中
-
在内网机器中解压缩后安装
cd /root/archives sudo dpkg -i *.deb
允许ssh root登录
vim /etc/ssh/sshd_config
PermitRootLogin yes
systemctl restart sshd