#!/bin/bash

 

# gain apt lock.

sudo rm -rf /var/lib/dpkg/lock
sudo rm -rf /var/cache/apt/archives/lock
sudo rm -rf /var/lib/apt/lists/lock


# configure apt proxy.
cat>/etc/apt/apt.conf<<EOF
Acquire::http::proxy "http://child-prc.intel.com:913/";
Acquire::https::proxy "https://child-prc.intel.com:913/";
EOF


# update software list
echo password | sudo -S apt-get update


# install software
sudo -S apt-get install -y vim ssh ffmpeg libav-tools

 

# enlarge swap memory
filename=/swapfile
if [ ! -f "$filename" ];
then
memory=128
sudo fallocate -l ${memory}G ${filename}
sudo chmod 600 ${filename}
sudo mkswap ${filename}
sudo swapon ${filename}
echo "/swapfile swap swap defaults 0 0" >>/etc/fstab
fi

 

 

 

 

 

相关文章:

  • 2022-12-23
  • 2021-10-17
  • 2021-11-20
  • 2021-10-22
  • 2021-09-12
  • 2021-06-18
  • 2021-08-01
  • 2021-10-12
猜你喜欢
  • 2021-06-18
  • 2021-06-13
  • 2022-12-23
  • 2021-11-04
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案