In Ubuntu, I can install sysstat
using apt, e.g.
apt-get install sysstat
And then enable it via interactive prompt
dpkg-reconfigure sysstat
But I want automate the process using fully automated shell script, what command I can use?
Service may be configured via update-rc.d
Cron job uses settings from /etc/default/sysstat, string ENABLED="true"
apt-get install sysstat -y
echo 'ENABLED="true"' > /etc/default/sysstat
service sysstat restart
save as say: /root/enSAR.sh
, make executable chmod +x /root/enSAR.sh
, then run as root:
~# sh /root/enSAR.sh
Checked, if you are running Ubuntu, then that should work. Debian uses additional values in /etc/default/sysstat