记录我的一些生活写照、无聊的牢骚、内心世界的活动 注册 | 登陆

TurnKey Linux系统安装后简单优化

TurnKey Linux系统安装后简单优化


介绍:
TurnKey Linux 的Debian的版本对应关系:是基于 Debian 的虚拟应用程序库,它将一些最好的开放源码软件集成到完备可用的解决方案中。每一个虚拟应用程序都为易用性进行了优化,并能在数分钟内就部署在裸机、虚拟机及云中。每一个虚拟应用都可以光盘镜像或是虚拟机镜像的形式获得。最新core版本是turnkey-core-17.1-bullseye-amd64.iso,是以Debian11为基础的,可以用Debian11的源安装软件。core版本是未安装其他APP的基础版本,可以以它为基础构建自己的服务器。目前TurnKey Linux系统仅支持legacy启动,物理机安装时候新机器可以切换到legacy启动,如果仅有UEFI启动,则无法使用本系统。
以下为TurnKey Linux 的Debian的版本对应关系(以下均为X64版本):
XML/HTML代码
  1. turnkey-core-14.2-jessie-amd64.iso                   Debian8
  2. turnkey-core-15.0-stretch-amd64.iso                  Debian9
  3. tturnkey-core-16.1-buster-amd64.iso                  Debian10
  4. turnkey-core-17.1-bullseye-amd64.iso                 Debian11
安装:
下载最新的turnkey-core-17.1-bullseye-amd64.iso,虚拟机载入安装系统,以下均为此版本实例。
启动虚拟机后,默认进入分区界面,一般选择 Guided - use entire disk(向导,整个磁盘),如果有特殊需求可以选择LVM或者手动Manual。然后下面全都选择 YES , 一路回车,直到重启,完成安装。
重启后出现第一个需要输入的是root密码,输入两次,下面的安装选项,全都 skip 跳过,直到出现confconsole控制台,显示本地的IP等信息。(转移从17版本开始,系统密码要求复杂才可以确认,尽量使用大小写加上数字或者符号,否则无法继续安装。)

配置:
在confconsole控制台,回车后进入登录模式,输入root和刚设置的密码,进入系统。
然后输入 confconsole 回车,进入GUI 模式设置系统基本配置。
Networking:DHCP(自动获取IP)StaticIP(固定IP)设置后 Apply 马上生效,无需重启系统。
Region config:Locales(选择zh_CN开头的4个,空格选择,然后下一步选择 zh_CN.UTF-8 为默认)Tzdata(Asia-Shanghai 设置中国时区,以便时间同步)
Reboot(重启系统)Shutdown(关机)Quit(退出confconsole的GUI)

网络通了以后可以SSH远程登录,配置系统参数。
修改默认源地址,因为默认源地址为国外,速度比较慢,所以改成国内快的源,安装软件方便,以下以中科大源为例:
中科大源地址:

修改并添加以下地址到 /etc/apt/sources.list.d/sources.list (Debian11原版地址为 /etc/apt/sources.list ),security.sources.list一般禁用,可以改名为security.sources.list.disabled。
XML/HTML代码
  1. deb http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
  2. deb-src http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
  3. deb http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
  4. deb-src http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
  5. deb http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
  6. deb-src http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
  7. deb http://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
  8. deb-src http://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
常用软件安装
XML/HTML代码
  1. #更新源
  2. apt-get -y update
  3. #升级软件
  4. apt-get -y upgrade
  5. #安装常用软件
  6. apt-get -y install  htop nload ncdu wget curl  tar gzip  bzip2 xz-utils  unzip net-tools sudo
  7. #安装编译所需的软件
  8. apt-get -y install  build-essential
  9. #卸载man-db
  10. apt-get -y remove man-db
设置终端支持中文
XML/HTML代码
  1. sed -i '$a \export LC_ALL="zh_CN.UTF-8"' /etc/profile
  2. sed -i '$a \export LC_CTYPE="zh_CN.UTF-8"' /etc/profile
  3. sed -i '$a \export LANG="zh_CN.UTF-8"' /etc/profile
  4. source  /etc/profile
Webmin管理:
TurnKey Linux安装后默认自带Webmin管理软件,用户名密码为系统的账号密码。
XML/HTML代码
  1. https://IP:12321/ - System control panel
  2. https://IP:12320/ - Web based command line terminal
TurnKey Linux本身就是国外一个非常好用的为虚拟化定制的系统,精简安全,ISO才300多M,安装速度快,整个国产两三分钟搞定。支持物理机虚拟机,非常好用。 
一键安装Docker(官方):
XML/HTML代码
  1. curl -sSL https://get.docker.com/ | sh
一键安装docker-compose
XML/HTML代码
  1. curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  2. chmod +x /usr/local/bin/docker-compose
或者命令安装
XML/HTML代码
  1. apt-get -y install docker-compose
一键安装portainer中文版
XML/HTML代码
  1. docker run -d --restart=always --name="portainer" -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data 6053537/portainer-ce
一键安装网络测速容器
XML/HTML代码
  1. docker run -d --restart=always --name="speedtest-x" -p 88:80 -it badapple9/speedtest-x
  2. docker run -d --restart=always --name="speedtest" -p 99:80 -it adolfintel/speedtest
  3. docker run -d --restart=always --name="homebox" -p 89:3300  -it xgheaven/homebox
支持ARM64
XML/HTML代码
  1. docker run -d --restart=always --name="speedtest-x" -p 88:80 -it stilleshan/speedtest-x
修改系统时区
XML/HTML代码
  1. timedatectl set-timezone  Asia/Shanghai
修改Docker容器的时区
XML/HTML代码
  1. /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  2. echo 'Asia/Shanghai' >/etc/timezone
其他后续补充

« 上一篇 | 下一篇 »

发表评论

评论内容 (必填):