Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3 | daniel-mar | 1 | How to install StackMan Terminal Edition |
2 | ---------------------------------------- |
||
3 | |||
4 | 1. Create a new Linux user, for example |
||
5 | |||
6 | sudo useradd stamuser |
||
7 | sudo groupadd stamuser |
||
8 | |||
9 | 2. Copy the stam program archive to the user's folder and unpack it |
||
10 | |||
11 | su stamuser |
||
12 | cd ~ |
||
13 | tar -xvf stackmanager_linux.tar.gz |
||
14 | sudo chown -r stamuser:stamuser ~stamuser/stam |
||
15 | |||
16 | 3. Optional: If you want to avoid direct shell access, you make stam the default shell. For example, the user's entry in /etc/passwd could look like this: |
||
17 | |||
18 | stamuser:x:1002:1004:StackMan Terminal Edition,,,:/home/stamuser:/home/stamuser/stam/stam |
||
19 | |||
20 | 4. Create a MySQL database (and users) and import the following SQL dump: |
||
21 | |||
22 | stam_entries.sql |
||
23 | |||
24 | 5. Copy the default configuration file to the home directory of the user and edit it (add the MySQL data). |
||
25 | |||
26 | Method 1: |
||
27 | |||
28 | su stamuser |
||
29 | cp ~/stam/defaults/.stam_config ~ |
||
30 | nano ~/.stam_config |
||
31 | |||
32 | Method 2: |
||
33 | |||
34 | su stamuser |
||
35 | ~/stam/write_stam_config |
||
36 | |||
37 | 6. Copy the nanorc file (for syntax highlighting) and, if necessary correct the path to stam.nanorc to the absolute path of your user: |
||
38 | |||
39 | su stamuser |
||
40 | cp ~/stam/nanorc/.nanorc ~ |
||
41 | rnano ~/.nanorc |
||
42 | |||
43 | You can test the syntax highlight with this command: |
||
44 | |||
45 | nano ~/stam/nanorc/test.stam |
||
46 | |||
47 | 7. Optional: If you want to create a live-backup on a external media (e.g. floppy disk or USB flash drive), you can create a symlink for the second history file |
||
48 | |||
49 | sudo mkdir /mnt/fdd |
||
50 | sudo mount -o umask=0000,gid=1004,uid=1002 /dev/sda /mnt/fdd |
||
51 | su stamuser |
||
52 | touch /mnt/fdd/stam_history |
||
53 | ln -s /mnt/fdd/stam_history ~/.stam_history_mir |
||
54 | |||
55 | --- |
||
56 | |||
57 | Additional notes: |
||
58 | |||
59 | - If you want to run *.stam scripts, you have to correct the shebang to the correct location of the stam executable (#!/.../stam), and make the files executable (chmod +x test.stam) |
||
60 | |||
61 | - You can begin with running ~/stam/stam and enter "-help" to view all available commands. |