This repository has been archived by the owner on Oct 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstallLinux.txt
308 lines (231 loc) · 9.53 KB
/
InstallLinux.txt
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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
#gsettings set org.gnome.desktop.peripherals.keyboard repeat-interval 30
#gsettings set org.gnome.desktop.peripherals.keyboard delay 250
## SYSTEM SOFT
sudo apt-get install -y wget git vim zsh silversearcher-ag tig kdiff3 curl htop fonts-symbola inkscape webhttrack httrack tree openjdk-8-jdk lynx ffmpeg vlc jq
sudo sh -c "echo 'vm.max_map_count = 262144' >> /etc/sysctl.conf"
## SYSTEM RUBY
sudo apt-get install -y ruby-full
sudo gem install rake sass
## RBENV
sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
## SYSTEM NODE
sudo apt-get install -y nodejs npm
## GIT LFS
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install -y git-lfs
git lfs install
# git lfs fetch # if a repo has already cloned
## PYTHON
sudo apt-get install -y python-setuptools python-dev build-essential
sudo apt install -y python-pip
#upgrade to 3.6
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install -y python3.6
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
sudo update-alternatives --set python /usr/bin/python3.6
sudo apt-get install -y python3-pip
python3 -m pip install --user --upgrade pip==9.0.3
sudo mv /usr/bin/pip /usr/bin/pip2
sudo ln -s /usr/bin/pip3 /usr/bin/pip
## SYSTEM PYTHON PACKAGES
pip --version
sudo pip install virtualenvwrapper awscli pipenv black
# requirements to build twisted
sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev libpq-dev python-dev libldap2-dev libsasl2-dev python3.6-dev
## KEEPASS
sudo apt-get install -y keepassx
# Copy the db key
# Copy the aws cred
## DOTFILES
mkdir ~/Documents/funspace
cd ~/Documents/funspace
git clone https://github.com/casertap/dotfiles.git
cd dotfiles
## GET IMPORTANT
sudo cp `pwd`/dl_from_s3 /usr/local/bin/dl_from_s3
sudo chmod +x /usr/local/bin/dl_from_s3
sudo cp `pwd`/backup_to_s3 /usr/local/bin/backup_to_s3
sudo chmod +x /usr/local/bin/backup_to_s3
#dl_from_s3 bucket path
## POWERLINE
sudo pip install git+git://github.com/Lokaltog/powerline
wget https://github.com/Lokaltog/powerline/raw/develop/font/PowerlineSymbols.otf https://github.com/Lokaltog/powerline/raw/develop/font/10-powerline-symbols.conf
sudo mv PowerlineSymbols.otf /usr/share/fonts/
sudo fc-cache -vf
sudo mv 10-powerline-symbols.conf /etc/fonts/conf.d/
## TMUX
sudo apt-get install -y automake build-essential pkg-config libevent-dev libncurses5-dev
wget https://github.com/tmux/tmux/releases/download/3.1b/tmux-3.1b.tar.g
tar -zxvf tmux-3.1b.tar.gz
cd tmux-3.1b
./configure && make
sudo make install
ln -s ~/Documents/funspace/dotfiles/.tmux.conf ~/.tmux.conf
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
tmux
tmux source ~/.tmux.conf
# Install plugins with Prefix (Ctrl+b) + I
## SUBLIME
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install -y sublime-text
## NVM
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
mkdir ~/.nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install node
nvm install 8
nvm alias default 8
npm install -g tern js-beautify jshint eslint_d prettier eslint-plugin-prettier eslint-config-prettier
## EMACS
sudo apt-get install -y xsel build-essential gcc g++ texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev gnutls-bin libcanberra-gtk-module libcanberra-gtk3-module
wget http://mirrors.kernel.org/gnu/emacs/emacs-26.2.tar.gz
tar -zxvf emacs-26.2.tar.gz
cd emacs-26.2
./configure --with-gnutls=no --with-mailutils
make
sudo make install
cd ..
rm -rf emacs-*
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
ln -s ~/Documents/funspace/dotfiles/.spacemacs ~/.spacemacs
gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40
cd ~/Documents/funspace/dotfiles/
./add_to_spacemacs.sh
## VIM
curl -L https://bit.ly/janus-bootstrap | bash
./add_to_janus.sh
ln -s ~/Documents/funspace/dotfiles/.vimrc.after ~/.vimrc.after
## GO
wget https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.11.2.linux-amd64.tar.gz
mkdir -p ~/go/bin ~/go/src ~/go/pkg
mkdir -p ~/golib/bin ~/golib/src ~/golib/pkg
export GOPATH="$HOME/golib:$HOME/go"
export PATH=$PATH:/usr/local/go/bin
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v golang.org/x/tools/cmd/goimports
## ZSH
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
rm ~/.zshrc
ln -s `pwd`/.zshrc ~/.zshrc
chsh -s /bin/zsh
sudo reboot
## PYTHON SYSTEM VIRTUAL ENV
mkvirtualenv --python=/usr/bin/python3.6 py3
workon py3
pip install yapf flake8 pylint nose mypy
deactivate
## DOCKER
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
sudo usermod -aG docker $USER
grep 'docker' /etc/group
sudo curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo reboot
## DOCKER-NVIDIA
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
sudo service docker restart
# docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
## WINE
sudo dpkg --add-architecture i386
wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -
sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ artful main'
sudo apt-get -y update && sudo apt-get install -y --install-recommends winehq-stable
wine --version
sudo apt-get install -y mono-complete
## MEDION_Photos
mkdir -p ~/.wine/drive_c/installers && mkdir ~/.wine/drive_c/Pictures && mkdir ~/.wine/drive_c/programs
mv ~/Downloads/MEDION_Photos_logiciel_de_commande_Setup.exe ~/.wine/drive_c/installers/
cd ~/.wine/drive_c/installers && wine MEDION_Photos_logiciel_de_commande_Setup.exe
wine ~/.wine/drive_c/programs/medion_photos/MEDION\ Photos\ logiciel\ de\ commande/MEDION\ Photos\ logiciel\ de\ commande.ex
## ADOBE READER DC
sudo apt install -y wine-stable winetricks
winetricks mspatcha
wget https://ardownload2.adobe.com/pub/adobe/reader/win/AcrobatDC/1800920044/AcroRdrDC1800920044_en_US.exe
wine AcroRdrDC1800920044_en_US.exe
## GIMP
sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp
## ADD STARTUP APP
gnome-session-properties
## VPN
sudo apt-get install -y network-manager-openvpn-gnome
wget https://vpn.hidemyass.com/vpn-config/vpn-configs.zip
mkdir ~/.hma
unzip vpn-configs.zip -d ~/.hma
# Import a VPN from Network Manager UI
---------
Metabox install ubuntu FIXES
## Fix usb freeze
On the grub menu of the usb key
- choose: Ubuntu
- press: 'e'
- On the line that contains quiet splash, add: acpi=off
- F10 (reboot with those settings)
## fix startup without nvidia driver
On the grub menu
- choose: Ubuntu
- press: 'e'
- On the line for linux, add: nouveau.modeset=0
- F10 (reboot with those settings)
## NVIDIA
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt-cache search nvidia
sudo apt-get install -y nvidia-driver-415
sudo reboot
#nvidia-smi
#sudo prime-select intel|nvidia|query
sudo prime-select intel
sudo reboot
## go to grub menu
On Startup press ESC
On the grub command type: normal
hit Enter, and then tap ESC until the menu is displayed.
## Sound problem on 18.04
#https://truejournals.com/2017/06/04/linux-on-sager-p8950-clevo-p950hp6/
mv /etc/modprobe.d/alsa-base.conf /etc/modprobe.d/alsa-base.bk
sudo sh -c "echo 'options snd-hda-intel model=no-primary-hp power_save=1' > /etc/modprobe.d/alsa.conf"
sudo reboot
amixer -c 0 sset Headphone 100% unmute
## slow wifi iwlwifi (need update kernel)
#https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1772467
#With the upstream kernel 4.16.18-041618 everything works fine for me. Looks like this is this patch might help: https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git/commit/drivers/net/wireless/intel?id=998ce0330c94eca4b13b8f062b3f0ca9ef9ad6d8
sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install -y ukuu
#run ukuu and update 4.16.18
uname -r
----- MORE ------
## nginx
sudo apt-get install nginx
sudo cp ./nginx/jora.conf /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/jora.conf /etc/nginx/sites-enabled/jora.conf
sudo service nginx restart
## pg
sudo apt-get install -y postgresql-client libpq-dev
## memcached
sudo apt-get install -y libsasl2 libsasl2-dev