-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALLATION
289 lines (202 loc) · 7.33 KB
/
INSTALLATION
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
Debian Installation
===================
===================
STEP. Preparation
=================
- Download small Debian ISO-image.
- Burn it to CD OR
Open VMWare Virtual Machine and choose "Create New Virtual Machine". Pick ISO Image.
STEP. Execute installation
==========================
- Install only base system
STEP. Add i386 multiarch support (AMD64 machines only)
======================================================
dpkg --add-architecture i386
STEP. Prepare apt
=================
- Edit /etc/apt/sources.list, it should look like following:
# Main (stable)
deb http://ftp.ie.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.ie.debian.org/debian/ jessie main contrib non-free
# Main (unstable)
#deb http://ftp.ie.debian.org/debian/ unstable main contrib non-free
# Security (stable)
deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib
# Main-updates (stable)
deb http://ftp.ie.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.ie.debian.org/debian/ jessie-updates main contrib non-free
# Multimedia (stable)
deb http://www.deb-multimedia.org jessie main non-free
#Backports (stable)
deb http://http.debian.net/debian jessie-backports main
- Edit /etc/apt/apt.conf to increase default cache-size
APT::Cache-Limit "1000000000";
STEP. apt update && upgrade
==========================
apt-get update
apt-get upgrade
apt-get dist-upgrade
STEP. Install important core software
=====================================
apt-get install sudo vim openssh-server firehol
STEP. Give primary user unlimited sudo access
=============================================
adduser zamar sudo
- Edit file /etc/sudoers according to the following diff:
< %sudo ALL=(ALL:ALL) ALL
---
> %sudo ALL=NOPASSWD: ALL
STEP. Change setting for vim
============================
- Edit /etc/vim/vimrc according to the following diff:
< "syntax on
---
> syntax on
< "set showcmd " Show (partial) command in status line.
< "set showmatch " Show matching brackets.
< "set ignorecase " Do case insensitive matching
< "set smartcase " Do smart case matching
< "set incsearch " Incremental search
< "set autowrite " Automatically save before commands like :next and :make
---
> set showcmd " Show (partial) command in status line.
> set showmatch " Show matching brackets.
> set ignorecase " Do case insensitive matching
> set smartcase " Do smart case matching
> set incsearch " Incremental search
> set autowrite " Automatically save before commands like :next and :make
> set shiftwidth=4
> set tabstop=4
> set expandtab
> set ignorecase
> set bg=dark
STEP. Configure && restart firewall
===================================
- Edit /etc/firehol/firehol.conf. It should look like following:
version 5
interface eth0 home
policy reject
protection strong 4/sec
server ssh accept
client all accept
- After editing configuration, restart firewall:
/etc/init.d/firehol restart
STEP. Disable CTRL+ALT+DEL
==========================
- Edit /etc/inittab according to the following diff:
< ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
---
> ca:12345:ctrlaltdel:/bin/echo "CTRL+ALT+DEL is disabled"
STEP. Set static IP-address
===========================
- Configure router (192.168.1.1) to always give same IP-address/MAC and
- Use simple /etc/network/interfaces definition:
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
OR
- Configure /etc/network/interfaces:
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.205
netmask 255.255.255.0
gateway 192.168.0.254
# dns-nameservers 192.168.0.254
STEP. Update list of known hosts
================================
Example diff for /etc/hosts
> 192.168.1.100 meripeto
STEP. Setup deb-multimedia repository
=====================================
apt-get install deb-multimedia-keyring
apt-get update
STEP. Install mplayer and set hardware specific configuration
=============================================================
apt-get install mplayer
Example diff for /etc/mplayer/mplayer.conf
> fs=yes
> vm=no
> zoom=no
> monitoraspect=4:3
> ontop=yes
> framedrop = yes
> cache = 8192
> cache-min = 15.0
> slang = en #fi
> alang = en
STEP. For virtual machine, remove package which keeps sending RAID status notices every two hours
=================================================================================================
apt-get remove mpt-status
STEP. Setup cron to automatically download package updates every morning
========================================================================
crontab -e (as root)
Insert the following line:
22 6 * * * apt-get update && apt-get --download-only --assume-yes dist-upgrade
STEP. Personalize X
===================
- To get the right look for xterm, create file '~/.Xdefaults' with the following content:
xterm*width: 111
xterm*height: 40
xterm*background: Black
xterm*foreground: Wheat
xterm*cursorColor: Orchid
xterm*reverseVideo: false
xterm*reverseWrap: true
xterm*font: fixed
xterm*fullCursor: true
xterm*scrollTtyOutput: off
xterm*scrollKey: on
xterm*titleBar: false
- To always start fluxbox when executing 'startx', edit/create file '~/.xinitrc' to have the following content:
#!/bin/sh
exec startfluxbox
STEP. Install VNC-Server
========================
- Install:
sudo apt-get install vnc4server
- Configuring a new user:
vnc4server
- To start:
vncserver :1 -geometry 1440x900
- To stop:
vncserver -kill :1
- To safely connect:
Start putty connection with tunneling enabled
Use vncviewer to connect at localhost:5901
STEP. Configure USB headset
================================
- Make sure that your usb headset is recognised by using:
lsusb
cat asound/cards
- Make snd-usb-audio as a default choice
cat /etc/modprobe.d/sound.conf
alias snd-card-0 snd-hda-intel
options snd-usb-audio index=0
options snd-hda-intel index=1
STEP. Set up Alternatives for GCC
=================================
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.5 60 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-3.5 --slave /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-3.5
sudo update-alternatives --config clang
sudo update-alternatives --config gcc
STEP. Don't go to sleep when laptop lid is closed
=================================================
1) Add the following line in /etc/systemd/logind.conf
HandleLidSwitch=ignore
2) Restart systemd-logind
sudo restart systemd-logind
STEP. Bring in Personal programs and scripts
============================================
- Clone https://github.com/zamar/admin repository with 'git clone'
- Install things src/ script/ config/ directories
STEP. Use myprogs to install remaining packages
==============================================================
- Use 'myprogs init', 'myprogs print', 'myprogs check' and 'myprogs sync' to install all wanted packages