Hej
Jeg må erkende at det hænder at jeg af og til må lave en ny reinstallation og på ny installere mine programmer igen. Det er jeg liidt træt af. Hvad gør I? Findes der en god mulighed for systemgendannelse for udvalgte datoer m.m? Eller kan man på enkelt vis geninstallere alle sine programmer ved køre det som et samlet job i form af python eller batch via terminalen? Jeg kører backup på min home-mappe, men bør jeg udvide det til andre, hvis det er et alternativ på at gemme min opsætning?
Systemgendannelse eller reinstall af applikationer - Hvad gør I?
-
- Indlæg: 71
- Tilmeldt: 18. aug 2012, 10:30
Systemgendannelse eller reinstall af applikationer - Hvad gør I?
"We´re ugly, but we have the music" - Leonard Cohen
-
- Admin
- Indlæg: 20878
- Tilmeldt: 15. nov 2009, 15:04
- IRC nickname: AJenbo
- Geografisk sted: Vanløse, København
Re: Systemgendannelse eller reinstall af applikationer - Hvad gør I?
System indstillinger gemmes i /etc så hvis du vil have dem med skal du tage backup af den også. Der er også nogle programmer der gemmer data i andre mapper som (mysql databasen ligger eks i /var/libs).
Jeg laver nogle gange et lille batch script med en apt kommando til at installere de programmer jeg bruger. eks:
Jeg laver nogle gange et lille batch script med en apt kommando til at installere de programmer jeg bruger. eks:
Kode: Vælg alt
sudo apt install codelite docker-composer geany php7.0-cli php-codesniffer
-
- Indlæg: 71
- Tilmeldt: 18. aug 2012, 10:30
Re: Systemgendannelse eller reinstall af applikationer - Hvad gør I?
Super info. Det bliver helt sikker også det jeg går efter. @ AJenbo jeg kan se du har docker-composer angivet. Kører du Django framework?
"We´re ugly, but we have the music" - Leonard Cohen
-
- Admin
- Indlæg: 20878
- Tilmeldt: 15. nov 2009, 15:04
- IRC nickname: AJenbo
- Geografisk sted: Vanløse, København
Re: Systemgendannelse eller reinstall af applikationer - Hvad gør I?
Nej, hvis jeg selv skal vælge er det normalt Lumen, men man kan jo køre nærmest alt i docker
P.s. jeg hade glemt at skrive " install " i mit eksempel, det er rettet nu (tak Klaus).
P.s. jeg hade glemt at skrive " install " i mit eksempel, det er rettet nu (tak Klaus).
-
- Admin
- Indlæg: 10725
- Tilmeldt: 26. apr 2008, 19:27
- IRC nickname: Christian_Arvai
- Geografisk sted: Holeby - Lolland
Re: Systemgendannelse eller reinstall af applikationer - Hvad gør I?
Jeg installere programmer via script.
Brug det ikke ukritisk, da der også slettes standardprogrammer.
Brug det ikke ukritisk, da der også slettes standardprogrammer.
Kode: Vælg alt
#!/bin/sh
# Opstartscript til Ubuntu* 32/64 bit
# Skrevet af Christian Arvai
# Kommando til at starte scriptet:
# sudo mv ~/installscript.sh /usr/local/bin && sudo chmod +x /usr/local/bin/installscript.sh && installscript.sh
# Kommando til at udskifte dette script med en nyere udgave (med samme navn):
# sudo rm -rf /usr/local/bin/installscript.sh && sudo mv ~/installscript.sh /usr/local/bin && sudo chmod +x /usr/local/bin/installscript.sh
# TIL ANDRE DER LÆSER / BRUGER DETTE SCRIPT
# Dette script er lavet til min egen personlige opsætning af Ubuntu og kan, Pga. de store ændringer i opsætningen, ikke anbefales til brug af andre, men man kan selvfølgeligt bygge det om efter eget behov.
echo "Tilføjelser af softwarekilder og ppa'er."
echo ""
# Tilføjelser af softwarekilder
# Tilføjelser af ppa'er
sudo apt-get update -y && sudo apt-get upgrade -y
sudo add-apt-repository ppa:mozillateam/firefox-next
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update -y
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Install af aptitude."
echo ""
sudo apt-get install -y aptitude
echo ""
echo "Udført"
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Opdatering af systempakker."
echo ""
sudo dpkg --configure -a
sudo apt-get check -y
sudo updatedb
sudo aptitude update -y
sudo aptitude safe-upgrade -y
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Opgradering af kernel."
echo ""
echo ""
sudo aptitude install -y linux-image-generic linux-headers-generic
sudo aptitude update -y
sudo aptitude safe-upgrade -y
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Installering af programmer, som kræver"
echo "at man godkender licenser under install."
echo ""
# install af programmer - som kræver at man skal godkende licenser under install
sudo aptitude install -y ttf-mscorefonts-installer
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Install Vedr. Java og Flash."
echo ""
# install af Flash
sudo aptitude install -y adobe-flashplugin
# install af Java (inkl ppa)
sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo mkdir -p /usr/lib/mozilla/plugins && sudo apt-get install -y oracle-java8-installer
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Install Vedr. Grafik."
echo ""
sudo aptitude install -y gimp gimp-data-extras gimp-plugin-registry gimp-texturize gimp-resynthesizer inkscape freecad gpaint xpaint tuxpaint f-spot dia
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Install Vedr. Internet."
echo ""
sudo aptitude install -y deluge-torrent xchat unity-mail lernid chromium-browser skype filezilla
# aktivering af Firewall
sudo ufw enable
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Install Vedr. Kontor."
echo ""
sudo aptitude install -y libreoffice-base libreoffice-l10n-da
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Install Vedr. Lyd og Video."
echo ""
sudo aptitude install -y vlc vlc-plugin-pulse totem-plugins-extra sound-juicer soundconverter winff oggconvert audacity avidemux acidrip ogmrip k3b mencoder ffmpeg ffmpeg2theora dvdauthor dvdstyler gaupol gtk-recordmydesktop cheese camorama pavucontrol asunder gnome-mplayer kino pitivi openshot isomaster
echo ""
# install af codecs til afspilning af dvd
sudo /usr/share/doc/libdvdread4/install-css.sh
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo "Install Vedr. Læringsprogrammer."
echo ""
sudo aptitude install -y tuxtype tuxtype-data-nonfree tuxmath klavaro
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Install Vedr. Programmering."
echo ""
sudo aptitude install -y bluefish bless
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Install Vedr. Systemværktøjer."
echo ""
sudo aptitude install -y gmountiso clamav clamtk sysinfo gnome-schedule cryptkeeper dconf-tools gconf-editor bleachbit gparted gpart gufw synaptic psensor fslint testdisk
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Install Vedr. Tilbehør."
echo ""
sudo aptitude install -y shutter convertall parcellite virtualbox
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
# echo "Install Vedr. Videnskab."
# echo ""
# sudo aptitude install -y
# echo ""
# echo "Udført."
# echo ""
# echo ""
# echo ""
# echo ""
# echo ""
echo "Install af programmer som ikke direkte er i menuerne."
echo ""
sudo aptitude install -y nautilus-image-converter scrot gphoto2 gphotofs bootchart bum gthumb powertop glipper cups-pdf xpdf seahorse rar p7zip p7zip-full alien php5-cli sqlitebrowser sqlite pastebinit build-essential wine ppa-purge libc6-i386 lib32z1 ia32-libs nmap inxi
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Installering af pakker til skrivebordmiljø og Gnome."
echo ""
# sudo aptitude install -y gnome-panel gnome-tweak-tool compizconfig-settings-manager compiz-plugins-extra gnome-themes-extras gnome-raw-thumbnailer gnome-extra-icons community-themes xscreensaver xscreensaver-data xscreensaver-data-extra xscreensaver-gl-extra
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo "Install af evt eksisterende .deb-filer i hjemmemappen."
echo ""
# cd ~/ && sudo dpkg -i *.deb
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Blokkering af seneste filer i Gnome."
echo ""
# sudo rm -rf ~/.local/share/recently-used.xbel ; mkdir ~/.local/share/recently-used.xbel
# Kan genskabes med: sudo rm -rf ~/.local/share/recently-used.xbel
echo ""
echo "Udført"
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Blokkering af seneste filer i Unity."
echo ""
# sudo chmod 555 ~/.local/share/zeitgeist/activity.sqlite
# Kan genskabes med: sudo chmod 777 ~/.local/share/zeitgeist/activity.sqlite
echo ""
echo "Udført"
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Få den gamle scrollbar tilbage."
echo ""
sudo aptitude remove -y overlay-scrollbar liboverlay-scrollbar3-0.2-0 liboverlay-scrollbar-0.2-0
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo "Få den gamle programmenulinje tilbage."
echo ""
# sudo aptitude remove -y appmenu-gtk indicator-applet-appmenu indicator-appmenu
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
# echo "Flyt minimize,maximize,close til højre. "
# echo ""
# gconftool-2 -s -t string /apps/metacity/general/button_layout ":maximize,minimize,close"
# Kan genskabes med: gconftool-2 -s -t string /apps/metacity/general/button_layout "close,minimize,maximize:"
# echo ""
# echo "Udført"
# echo ""
# echo ""
# echo ""
# echo ""
# echo ""
echo "Få kontrol over Ubuntu's opstartsprogrammer igen."
echo ""
mkdir -p ~/.config/autostart
cd ~/.config/autostart
cp /etc/xdg/autostart/*.desktop .
sed -i "s/NoDisplay=true/NoDisplay=false/g" *.desktop
cd ~/
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo "Tilføj/Fjern opstartsprogrammer."
echo ""
# tilføj
# rm -rf ~/.config/autostart/dropbox.desktop ; mv ~/skjulte_mapper/dropbox.desktop ~/.config/autostart
# rm -rf ~/.config/autostart/checkgmail.desktop ; mv ~/skjulte_mapper/checkgmail.desktop ~/.config/autostart
# rm -rf ~/.config/autostart/gmail-notify.desktop ; mv ~/skjulte_mapper/gmail-notify.desktop ~/.config/autostart
# rm -rf ~/.config/autostart/transmission.desktop ; mv ~/skjulte_mapper/transmission.desktop ~/.config/autostart
# rm -rf ~/.config/autostart/deluge.desktop ; mv ~/skjulte_mapper/deluge.desktop ~/.config/autostart
# rm -rf ~/.config/autostart/dropbox.desktop ; mv ~/skjulte_mapper/dropbox.desktop ~/.config/autostart
# rm -rf ~/.config/autostart/gmail-notify.desktop ; mv ~/skjulte_mapper/gmail-notify.desktop ~/.config/autostart
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo "Opsætning af standardprogrammer."
echo ""
# Added Associations
echo "[Added Associations]" > ~/.local/share/applications/mimeapps.list
echo "application/x-cd-image=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "video/x-matroska=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "video/x-flv=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "video/x-msvideo=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "video/mpeg=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "video/mp4=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "video/x-ms-wmv=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "audio/mpeg=totem.desktop;vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "audio/x-vorbis+ogg=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "audio/flac=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "application/octet-stream=bless.desktop;file-roller.desktop;vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "text/plain=bless.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "audio/x-ms-wma=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "video/x-ms-asf=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "inode/directory=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "text/x-nfo=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "video/x-ogm+ogg=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "application/x-sqlite3=bluefish.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "video/quicktime=vlc.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "application/octet-stream=vlc.desktop;gedit.desktop;" >> ~/.local/share/applications/mimeapps.list
echo "" >> ~/.local/share/applications/mimeapps.list
# Default Applications
echo "[Default Applications]" >> ~/.local/share/applications/mimeapps.list
echo "application/x-bittorrent=transmission-gtk.desktop" >> ~/.local/share/applications/mimeapps.list
echo "video/x-matroska=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "video/x-flv=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "video/x-msvideo=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "video/mpeg=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "video/mp4=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "video/x-ms-wmv=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "audio/mpeg=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "audio/x-vorbis+ogg=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "audio/flac=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "application/octet-stream=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "audio/x-ms-wma=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "video/x-ms-asf=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "video/x-ogm+ogg=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo "video/quicktime=vlc.desktop" >> ~/.local/share/applications/mimeapps.list
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo "Oprettelse af mapper og flytning af filer."
echo ""
# oprettelse af mapper
mkdir ~/PDF
# flytning af filer
# rm -rf ~/.mozilla && mv ~/skjulte_mapper/.mozilla ~
# mv ~/skjulte_mapper/.notifier.conf ~
# mv ~/skjulte_mapper/.gnome3 ~
# mv ~/skjulte_mapper/.checkgmail ~
# mv ~/skjulte_mapper/.Skype ~
# mv ~/skjulte_mapper/.xchat2 ~
# mv ~/bleachbit ~/.config
# mv ~/deluge ~/.config
# mv ~/transmission ~/.config
mv ~/skrivebords_baggrund.jpg ~/Billeder
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Sletning af unødvendige mapper og programmer."
echo ""
# sletning af mapper
# sudo rm -rf ~/Eksempler ~/Videoklip ~/Offentligt ~/Skabeloner ~/skjulte_mapper
# sletning af programmer
sudo aptitude purge -y gnome-orca ekiga evolution-common indicator-messages gwibber empathy unity-webapps-amazoncloudreader
echo ""
echo "Udført"
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Aktivering af scripts."
echo ""
sudo mv ~/opryd.sh /usr/local/bin && sudo chmod +x /usr/local/bin/opryd.sh
sudo mv ~/clean.sh /usr/local/bin && sudo chmod +x /usr/local/bin/clean.sh
sudo mv ~/scan.sh /usr/local/bin && sudo chmod +x /usr/local/bin/scan.sh
sudo mv ~/installspil.sh /usr/local/bin && sudo chmod +x /usr/local/bin/installspil.sh
sudo mv ~/shotdown.sh /usr/local/bin && sudo chmod +x /usr/local/bin/shotdown.sh
sudo mv ~/screen5.sh /usr/local/bin && sudo chmod 777 /usr/local/bin/screen5.sh
sudo mv ~/screen10.sh /usr/local/bin && sudo chmod 777 /usr/local/bin/screen10.sh
sudo mv ~/screen20.sh /usr/local/bin && sudo chmod 777 /usr/local/bin/screen20.sh
sudo mv ~/screen30.sh /usr/local/bin && sudo chmod 777 /usr/local/bin/screen30.sh
sudo mv ~/screen40.sh /usr/local/bin && sudo chmod 777 /usr/local/bin/screen40.sh
sudo mv ~/screen50.sh /usr/local/bin && sudo chmod 777 /usr/local/bin/screen50.sh
sudo mv ~/screen60.sh /usr/local/bin && sudo chmod 777 /usr/local/bin/screen60.sh
mv ~/resize_400x300 ~/.gnome2/nautilus-scripts && chmod +x ~/.gnome2/nautilus-scripts/resize_400x300
mv ~/resize_640x480 ~/.gnome2/nautilus-scripts && chmod +x ~/.gnome2/nautilus-scripts/resize_640x480
mv ~/resize_1024x768 ~/.gnome2/nautilus-scripts && chmod +x ~/.gnome2/nautilus-scripts/resize_1024x768
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Ændring af interval mellem harddisk tjek under opstart af ubuntu."
echo "Bemærk at der vil komme fejlmeldinger, dette sker der intet ved !"
echo ""
sudo tune2fs -c5000 -i12m /dev/sda1
sudo tune2fs -c5000 -i12m /dev/sda2
sudo tune2fs -c5000 -i12m /dev/sda3
sudo tune2fs -c5000 -i12m /dev/sda4
sudo tune2fs -c5000 -i12m /dev/sda5
sudo tune2fs -c5000 -i12m /dev/sda6
sudo tune2fs -c5000 -i12m /dev/sda7
sudo tune2fs -c5000 -i12m /dev/sda8
sudo tune2fs -c5000 -i12m /dev/sda9
sudo tune2fs -c5000 -i12m /dev/sda10
sudo tune2fs -c5000 -i12m /dev/sda
sudo tune2fs -c5000 -i12m /dev/sdb
sudo tune2fs -c5000 -i12m /dev/sdc
sudo tune2fs -c5000 -i12m /dev/sdd
sudo tune2fs -c5000 -i12m /dev/sde
sudo tune2fs -c5000 -i12m /dev/sdf
sudo tune2fs -c5000 -i12m /dev/sdg
sudo tune2fs -c5000 -i12m /dev/sdh
sudo tune2fs -c5000 -i12m /dev/sdi
sudo tune2fs -c5000 -i12m /dev/sdj
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Afsluttende opdatering af systempakkerne."
echo ""
sudo dpkg --configure -a
sudo updatedb
sudo aptitude update -y
sudo aptitude safe-upgrade -y
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "Oprydning af systemet."
echo ""
sudo rm -rf ~/var/cache/apt/archives/*.deb
sudo apt-get autoremove -y --force-yes
sudo aptitude clean -y
sudo aptitude autoclean -y
echo ""
echo "Udført."
echo ""
echo ""
echo ""
echo "Kørslen af scriptet er nu gennemført."
echo ""
echo "Denne computer lukker ned om 5 minutter !"
echo ""
sudo sleep 300
sudo poweroff
Med venlig hilsen Christian
"We can only see a short distance ahead, but we can see plenty there that needs to be done." -- Alan Turing
"We can only see a short distance ahead, but we can see plenty there that needs to be done." -- Alan Turing
-
- Indlæg: 71
- Tilmeldt: 18. aug 2012, 10:30
Re: Systemgendannelse eller reinstall af applikationer - Hvad gør I?
Hej Anders
Mange tak for deling af din metode. Kommer helt sikker til at skele til din opsætning der.
Mange tak for deling af din metode. Kommer helt sikker til at skele til din opsætning der.
"We´re ugly, but we have the music" - Leonard Cohen