User Tools

Site Tools


userspace:howto_use_the_scripts_-_a_short_description

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
userspace:howto_use_the_scripts_-_a_short_description [2011/12/16 13:12]
Thomas_H
userspace:howto_use_the_scripts_-_a_short_description [2021/08/23 08:37] (current)
Line 3: Line 3:
 ===== ...use the listed scripts ===== ===== ...use the listed scripts =====
  
-written by  //[[hungerharke@gmx.de|Thomas_H]] 2011/12/16 12:50//+written by  //[[hungerharke@gmx.de|Thomas_H]] 2011/12/16 12:50// \\ 
 +edited by //[[hungerharke@gmx.de|Thomas_H]] 2019/02/27 09:50// 
  
 Welcome to the wiki, initiated by users using opsi very proudly and successful. If you want to use Opsi (**O**pen **P**C **S**erver **I**ntegration) be aware, that this system is - like many other servers - none "out of the box". So get rid of any illusion, that you simply install opsi and right after installing you can install every software and operating system. Some work has to be done before you can do this! And nevertheless there are very(!) good instructions and manuals for opsi it's your's to create the most contents and packages for future installations. Welcome to the wiki, initiated by users using opsi very proudly and successful. If you want to use Opsi (**O**pen **P**C **S**erver **I**ntegration) be aware, that this system is - like many other servers - none "out of the box". So get rid of any illusion, that you simply install opsi and right after installing you can install every software and operating system. Some work has to be done before you can do this! And nevertheless there are very(!) good instructions and manuals for opsi it's your's to create the most contents and packages for future installations.
Line 9: Line 10:
 This wiki shall help to avoid much work to be done twice, because once a package is created successfully, the scripts can - and should - be published here. Remember: others invested lots of time to create these scripts, they spended time to publish them here and you save lots of time by using these scripts. So help others by publishing your own scripts, if you have to create some. This wiki shall help to avoid much work to be done twice, because once a package is created successfully, the scripts can - and should - be published here. Remember: others invested lots of time to create these scripts, they spended time to publish them here and you save lots of time by using these scripts. So help others by publishing your own scripts, if you have to create some.
  
-This Howto is mostly for the newbies, starting with opsi, trying out the features. With this little Howto they should have the first success by creating a package, without knowing the "why" or "what" in the scripts. The "why" and "what" is something, you will have to learn later and let me say, yes you'll **have** to learn it, otherwise you always will need the help of other users.+This Howto is for the newbies in first line, starting with opsi, trying out the features. With this little Howto they should have the first success by creating a package, without knowing the "why" or "what" in the scripts. The "why" and "what" is something, you will have to learn later and let me say, yes you'll **have** to learn it, otherwise you always will need the help of other users.
  
-Of course: best is at last to get some training, you can get informations about training on opsi [[http://www.opsi.org/en/support|here]]. Commercial support is also avail.+Of course: best is at last to get some training, you can get informations about training on opsi [[https://uib.de/en/support-training/support/|here]]. Commercial support is also avail.
  
  
 ==== Some words before beginning... ==== ==== Some words before beginning... ====
  
-    * Read the manuals! We expect that you already have installed and configured your opsi-server on the manual named "Getting Started"+    * Read the manuals! We expect that you already have installed and configured your opsi-server on the manual named [[http://download.uib.de/opsi4.0/doc/html/en/opsi-getting-started/opsi-getting-started.html#opsi-getting-started-softwintegration-create-opsi-package|"Getting Started"]]
     * The published scripts are tested and they all work     * The published scripts are tested and they all work
-    * If software is free, so you should find links above the scripts where to get it. If a software is free, and there is no link, so you can add it as a member of the [[http://forum.opsi.org/|forum]] (register yourself)+    * If software, which should be installed is free, so you should find links above the scripts where to get it. If a software is free, and there is no link, so you can add it as a member of the [[http://forum.opsi.org/|forum]] (register yourself)
     * Commercial software has to be bought from the manufacturer and has not to be asked for in the [[http://forum.opsi.org/|forum]] ;)     * Commercial software has to be bought from the manufacturer and has not to be asked for in the [[http://forum.opsi.org/|forum]] ;)
     * If a script don't work, so ask politely in the [[http://forum.opsi.org/|forum]]. The error often is to be found between the screen and the chair.     * If a script don't work, so ask politely in the [[http://forum.opsi.org/|forum]]. The error often is to be found between the screen and the chair.
Line 52: Line 53:
     * wget (if not installed)     * wget (if not installed)
  
-Me for myself created a folder named "/opsi-packages" in the root-directory for creating the packages. My account is a member of opsi-admin and the folder has rwx-rights for group opsi-admin course. Such a folder has many advantages and after creating your packages, you should keep it! Software is changing nearly every day and it's much easier to change the setup.exe and to repack, than to start again and again creating folders, calling the opsi-newprod, etc.+Me for myself use the folder named "opsiproducts" in the home-directory for creating the packages. My account is a member of opsi-admin and the folder has rwx-rights for group opsi-admin course. Such a folder has many advantages and after creating your packages, you should keep it! Software is changing nearly every day and it's much easier to change the setup.exe and to repack, than to start again and again creating folders, calling the opsi-newprod, etc. 
 + 
 +//**A remark from bell**: 
 +"I think, it's easier to pack by using a share, so you can mount it on a testclient. I am usually programming on Windows-Client, because it's easier for me and I can test the packets directly. I have installed Notepad++ with syntaxhiglighting for opsi on the client I am creating the packets and I've linked the .ins-files with winst. So I have an entry in the contextmenu for the .ins-files, linked to Notepad++ that enables me to open these files by a doubleclick. 
 + 
 +By this you can test the scripts until they function and create at last the packet."// \\ 
 +(Of course this is more a solution for experienced users, who knows, what "shares" are, what synthaxhighlighning and winst are)
  
 First follow the instructions on the manual "Getting Started", chapter 4.2 "Creating an opsi package". On the example of TightVNC (a remote-control-software) we will create a localboot-package. First follow the instructions on the manual "Getting Started", chapter 4.2 "Creating an opsi package". On the example of TightVNC (a remote-control-software) we will create a localboot-package.
 Localboot means, the pc starts from it's own HDD. Localboot means, the pc starts from it's own HDD.
  
-After entering some informations on the product-information-screen you enter exactly the names "setup.ins" and "uninstall.ins" in the "product-scripts"-screen. Most scripts listed here have a "delsub.ins". This is a subroutine, that will be called by setup.ins or uninstall.ins. You will not enter delsub.ins in the product-scripts-screen.+For creating a new packet we start by changing to our directory, where we want to store our builds in future. 
 +If our directory should be "/home/opsiproducts" (like my example) so we first create this directory and change to it. 
 + 
 +<code> 
 +mkdir /home/opsiproducts 
 +cd /home/opsiproducts 
 +</code> 
 + 
 +Remark from the [[https://forum.opsi.org/viewtopic.php?f=7&t=3182|forum]], added by [[d.oertel]]: 
 + 
 +''"pack opsi products in /home/opsiproducts only. 
 + 
 +The three most important reasons are:\\ 
 +1. because of the rights on this foilder diffrent persons (if not root) can work in this folder.\\ 
 +2. The command'' <code>opsi-setup --set-rights</code> ''knows this folder and sets the correct rights. A /home/mydir/opsi-install would be ignored. This is important, because the opsi-mackage-manager gives the package to opsiconfd while installation and interrupts on missing rights on the folder.\\ 
 +3. This folder is shared as 'opsi_workbench', which makes it easier to update the products using a Windows-Client.\\ 
 + 
 +It's also described in the handbook: 
 +http://download.uib.de/opsi4.0/doc/html/en/opsi-getting-started/opsi-getting-started.html#opsi-getting-started-softwintegration-create-opsi-package-handling'' 
 + 
 +Then we begin by entering the first command for creating an opsi-packet: 
 +<code> 
 +opsi-newprod 
 +</code> 
 + 
 +We'll have to go trough some screens. The first is the "product-information-screen". In this screen we enter some informations, for example 
 +<code> 
 +product id = tightvnc 
 +product name = TightVNC 
 +</code> 
 + 
 +the you follow the screens, you enter exactly the names "setup.ins" and "uninstall.ins" in the "product-scripts"-screen. Most scripts listed here have a "delsub.ins". This is a subroutine, that will be called by setup.ins or uninstall.ins. You will not enter delsub.ins in the product-scripts-screen.
  
 We will not create any dependencies at this moment. Dependencies are needed if a software needs another package before getting installed. For example: CDBurnerXP needs .NetFX installed. So you can define, that the package ".NetFX" will be installed first, before opsi install the CDBurnerXP-Software. Opsi will follow the dependencies, installing .NetFX first and then CDBurnerXP. We will not create any dependencies at this moment. Dependencies are needed if a software needs another package before getting installed. For example: CDBurnerXP needs .NetFX installed. So you can define, that the package ".NetFX" will be installed first, before opsi install the CDBurnerXP-Software. Opsi will follow the dependencies, installing .NetFX first and then CDBurnerXP.
Line 68: Line 106:
  
 <code winst> <code winst>
---- tightvnc +│ 
-   | - CLIENT_DATA +├ tightvnc 
-   | - OPSI +├ CLIENT_DATA 
-   | |- control +├ OPSI 
-   | |- postinst +│ ├ control 
-   | |- preinst +│ ├ postinst 
-   | - SERVER_DATA+│ └ preinst 
 +└ SERVER_DATA
 </code> </code>
  
-Change now to the folder "CLIENT_DATA":+Change now to the folder "/home/opsiproducts/tightvnc/CLIENT_DATA":
 <code> <code>
-minhas-tirith:/opsi-packages/tightvnc # cd CLIENT_DATA+cd CLIENT_DATA
 </code>  </code> 
  
Line 85: Line 124:
 ==== Getting the setup-program ==== ==== Getting the setup-program ====
  
-First we need to download the setup-program, you will mostly find a link in the top-section of each script where we can get it. If not, the software might not be free. In our example we will find TightVNC at http://www.tightvnc.com/download.php+First we need to download the setup-program, you will mostly find a link in the top-section of each script where we can get it. If not, the software might not be free. In our example we will find TightVNC at http://www.tightvnc.com/download.php \\
 Follow the link and watch for the self-installing package for Windows. Do a rightclick on the link and copy the URL of the file. Follow the link and watch for the self-installing package for Windows. Do a rightclick on the link and copy the URL of the file.
  
Line 91: Line 130:
  
 <code> <code>
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # wget "http://www.tightvnc.com/download/2.0.4/tightvnc-2.0.4-setup.exe"+wget "http://www.tightvnc.com/download/2.0.4/tightvnc-2.0.4-setup.exe"
 </code> </code>
 (Attention! The Version-Number 2.0.4 might have changed, when you read this HOWTO!) (Attention! The Version-Number 2.0.4 might have changed, when you read this HOWTO!)
Line 100: Line 139:
  
 <code> <code>
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # touch setup.ins +touch setup.ins 
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # joe setup.ins+joe setup.ins
 </code> </code>
  
Line 116: Line 155:
  
 <code> <code>
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # touch uninstall.ins +touch uninstall.ins 
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # joe uninstall.ins+joe uninstall.ins
 </code> </code>
  
Line 123: Line 162:
  
 <code> <code>
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # touch delsub.ins +touch delsub.ins 
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # joe delsub.ins+joe delsub.ins
 </code> </code>
  
Line 132: Line 171:
  
 <code> <code>
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # touch Tightvnc_win7.reg+touch Tightvnc_win7.reg
 </code>  </code> 
  
Line 148: Line 187:
  
 <code> <code>
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # cd ..+cd ..
 </code> </code>
 +
 +now we should be in /home/opsiproducts/tightvnc
  
 and pack it by using opsi-makeproductfile. and pack it by using opsi-makeproductfile.
  
 <code> <code>
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # opsi-makeproductfile+opsi-makeproductfile
 </code> </code>
  
Line 161: Line 202:
  
 <code> <code>
-minhas-tirith:/opsi-packages/tightvnc/CLIENT_DATA # opsi-package-manager -i *.opsi+opsi-package-manager -i *.opsi
 </code> </code>
  
userspace/howto_use_the_scripts_-_a_short_description.1324041121.txt.gz · Last modified: 2021/08/23 08:37 (external edit)