Editing
Basic Ubuntu Installation
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Basic system prep == Most of the initial configuration is now contained in a script that can be executed directly from the config server as root on the target system: curl -s http://config/config/ubuntu-basic-config.sh | bash -x | tee config.out wget -qO - http://config/config/ubuntu-basic-config.sh | bash -x | tee config.out The contents of this script are included here for reference, though updates to the script may occur without updates to this page: <pre>#!/bin/bash # # script to do the basic install of a Ubuntu workstation # # Assumptions: # - this is run as root immediately after the install has completed # - the hostname has been set as desired before this script is run # - an administrator account 'ewilliam' was created during installation # # invoke using one of these commands: # # wget -qO http://config/config/debian-basic-config.sh | bash # curl -s http://config/config/debian-basic-config.sh | bash # CONFIG=http://config/config # sometimes the install leaves the cdrom lines in the sources.list file -- remove them sed -i 's/^deb cdrom/#deb cdrom/' /etc/apt/sources.list # first -- install all the basic necessities (some may already be there) apt-get update apt-get install -y net-tools zsh nfs-common aptitude git curl vim openssh-server # the ssmtp package is not officially supported under buster # download the package from stretch and install #SSMTP_DEB=ssmtp_2.64-9_amd64.deb SSMTP_DEB=ssmtp_2.64-8+b2_amd64.deb wget http://http.us.debian.org/debian/pool/main/s/ssmtp/${SSMTP_DEB} apt-get install -y ./${SSMTP_DEB} apt-mark hold ssmtp # now get all the updates apt-get -y upgrade # make sudo passwordless for group wheel echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/91-wheel-NOPASSWD chmod 440 /etc/sudoers.d/91-wheel-NOPASSWD usermod -aG sudo ewilliam # now that zsh is installed, make it the default chsh -s /bin/zsh chsh -s /bin/zsh ewilliam # copy the standard zsh config files curl -s $CONFIG/common/zshrc -o /root/.zshrc curl -s $CONFIG/common/zshrc -o /home/ewilliam/.zshrc chown ewilliam.ewilliam /home/ewilliam/.zshrc # load ssh known_hosts from the config server mkdir -p /root/.ssh curl -s $CONFIG/ssh/known_hosts -o /root/.ssh/known_hosts mkdir -p /home/ewilliam/.ssh curl -s $CONFIG/ssh/known_hosts -o /home/ewilliam/.ssh/known_hosts chown -R ewilliam.ewilliam /home/ewilliam/.ssh # get backup scripts curl -s $CONFIG/common/backup -o /etc/cron.daily/backup curl -s $CONFIG/common/rsync_backup.sh -o /usr/local/bin/rsync_backup.sh chmod +x /usr/local/bin/rsync_backup.sh /etc/cron.daily/backup # configure log server curl -s $CONFIG/common/99-remotelog.conf -o /etc/rsyslog.d/99-remotelog.conf systemctl restart rsyslog # enable mail to the central email server # unlike the CentOS version of the ssmtp package, this doesn't recognize the /etc/aliases file # to make it work, the hostname needs to be set to 'williams.localnet' and the mail server must be at 'mail' sed -i 's/^hostname=.*$/hostname=williams.localnet/' /etc/ssmtp/ssmtp.conf # get the standard /etc/hosts file curl -s $CONFIG/hosts -o /etc/hosts # install more supporting stuff apt-get install -y gpg apt-transport-https # install metricbeat, using the standard config file on the config server #wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - #echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list #apt-get install -y metricbeat #curl -s $CONFIG/common/metricbeat.yml -o /etc/metricbeat/metricbeat.yml #chmod 640 /etc/metricbeat/metricbeat.yml #sudo systemctl enable --now metricbeat # install webmin wget -qO - https://download.webmin.com/jcameron-key.asc | sudo apt-key add - echo "deb https://download.webmin.com/download/repository sarge contrib" | sudo tee -a /etc/apt/sources.list.d/webmin.list apt-get update apt-get install -y webmin # install the host/known_hosts synchronization curl -s $CONFIG/host_check.sh -o /etc/cron.hourly/host_check chmod +x /etc/cron.hourly/host_check # provide a daily list of packages that need updating curl -s $CONFIG/debian/0-apt-upgradeable -o /etc/cron.daily/0-apt-upgradable chmod +x /etc/cron.daily/0-apt-upgradable # install other status checks curl -s $CONFIG/common/ssd-endurance > /etc/cron.weekly/ssd-endurance chmod +x /etc/cron.weekly/ssd-endurance # now reboot reboot</pre>
Summary:
Please note that all contributions to WilliamsNet Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WilliamsNet Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Commons
Architecture
How-To
Systems
Hardware
SysAdmin
Kubernetes
OpenSearch
Special
Pages to create
All pages
Recent changes
Random page
Help about MediaWiki
Formatting Help
Tools
What links here
Related changes
Special pages
Page information