Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the script code of Debian installation

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about how to write the Debian installation script code. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

The code is as follows:

#! / bin/bash

SUCCESS=0

Function checkInst ()

{

# apt-get-y-force-yes install

For item in $1

Do

Echo "install =" ${item} "="

# printf "hello% .5s\ n" message

Apt-get-y-- force-yes install ${item}

If ["$?"-ne $SUCCESS]

Then

Echo "ERROR Install" ${item}

Read line1

Fi

Done

}

Tools= "ftp telnet nmap tftp ntpdate screen lsof manpages manpages-dev manpages-posix manpages-posix-dev strace ltrace chkconfig"

Xdesktop= "xserver-xorg-core xfce4 xfce4-terminal xfburn thunar-archive-plugin gdm"

Editor= "galculator vim vim-gtk medit rdesktop xvnc4viewer filezilla claws-mail claws-mail-i18n claws-mail-tnef-parser claws-mail-html2-viewer"

Xtools= "ristretto fbreader p7zip-full arj zip mscompress file-roller stardict-gtk iptux"

Chineseinput= "fcitx"

Mediatools= "alsa-base alsa-utils mplayer mencoder smplayer ffmpeg"

Develops= "astyle ctags cxref ccache gettext poedit gdb cppcheck build-essential graphviz intltool valgrind"

Fssupport= "fusesmb smbclient smbfs ntfs-3g sshfs openssh-client openssh-server"

Nettools= "ethtool wireless-tools wicd mtools dosfstools pppoe"

Sniffer= "wireshark"

Desk3d= "compiz compiz-fusion-plugins-extra compiz-fusion-plugins-main compiz-fusion-bcop compizconfig-settings-manager cairo-dock-compiz-icon-plugin"

Others= "rpm qbittorrent"

Curlpkg= "aria2 axel curl mpg321 easymp3gain-gtk jp2a nmon arping conky libnotify-bin inotify-tools dia dnsutils"

CheckInst "${tools}"

CheckInst "${xdesktop}"

CheckInst "${editor}"

CheckInst "${xtools}"

CheckInst "${chineseinput}"

CheckInst "${mediatools}"

CheckInst "${develops}"

CheckInst "${fssupport}"

CheckInst "${sniffer}"

CheckInst "${nettools}"

CheckInst "${others}"

CheckInst "${desk3d}"

CheckInst "${curlpkg}"

Apt-get install firmware-realtek firmware-linux-nonfree firmware-linux-free libqt4-opengl

Apt-get-y-- force-yes remove vim-tiny nano tasksel tasksel-data jfbterm zhcon-- purge

Apt-get-y-- force-yes remove aumix ttf-arphic-ukai ttf-arphic-uming iceweasel-- purge

Apt-get autoremove-purge-y-force-yes

Apt-get upgrade-y-force-yes

This is how the Debian installation script code shared by the editor is written. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 224

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report