-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathSetup Linux.txt
274 lines (236 loc) · 7.24 KB
/
Setup Linux.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
open-vm-tools#
# If you don't already have an installation of Ubuntu 22.04, I suggest you
# iInstall Lubuntu 22.04.5 using lubuntu-22.04.5-desktop-amd64.iso which
# can be downloaded from:
#
# https://cdimage.ubuntu.com/lubuntu/releases/jammy/release/
#
# You may also wish to do that so that the DeepSkyStacker build environment
# doesn't change your existing Ubuntu setup.
#
# I installed it in a VMware Workstation Pro virtual machine.
#
# **********************************************************************
# DO NOT INSTALL VMWare's VM Tools by right clicking on the VM name
# and selecting "Install VMware Tools"
# **********************************************************************
#
# Open a gui terminal and install openssh
#
sudo apt-get install openssh-server
#
# Check if the firewall is running
#
sudo ufw status
#
# if it isn't start it
#
sudo ufw enable
#
# Allow ssh connections
#
sudo ufw allow ssh
#
# Check that all is well
#
sudo systemctl status ssh
#
# You can now close the terminal window ...
#
#
# open an ssh session to it using (e.g.) putty.
#
# If you are asked about overwriting configuration files while the full-upgrade
# is running, accept the default reply which is to simply press enter (No)
#
sudo apt-get update
sudo apt-get full-upgrade
sudo apt-get autoremove
sudo reboot now
#
# Re-connect your ssh session once the system has restarted.
#
#
# *******************************************************************
# Start of section **ONLY* for VMware virtual machine
#
sudo apt-get install open-vm-tools open-vm-tools-desktop
sudo apt-get update
sudo reboot now
#
# Re-connect your openssh session once the system has restarted.
#
# End of section **ONLY** for VMware virtual machine
#
# *******************************************************************
#
sudo apt-get install build-essential libgl1-mesa-dev
sudo apt-get install gdb ninja-build zip cmake
sudo apt-get install libglu1-mesa-dev libxcb-xinerama0 libxcb-cursor0
sudo apt-get install libfontconfig1-dev libfreetype-dev libx11-dev
sudo apt-get install libx11-xcb-dev libxcb-cursor-dev libxcb-glx0-dev
sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev
sudo apt-get install libxcb-randr0-dev libxcb-render-util0-dev libxcb-shape0-dev
sudo apt-get install libxcb-shm0-dev libxcb-sync-dev libxcb-util-dev
sudo apt-get install libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-xkb-dev
sudo apt-get install libxcb1-dev libxext-dev libxfixes-dev libxi-dev
sudo apt-get install libxkbcommon-dev libxkbcommon-x11-dev libxrender-dev
sudo apt-get install cmake-qt-gui
sudo apt-get install gh
#
# Setup to login to github
#
# Choose github.com, HTTPS, Use github credentials, and Login with a web browser
# It will then display an authentication code.
# Then press enter again:
#
BROWSER=false gh auth login
#
# Here's what you should see:
#
? What account do you want to log into? GitHub.com
? What is your preferred protocol for Git operations? HTTPS
? Authenticate Git with your GitHub credentials? Yes
? How would you like to authenticate GitHub CLI? Login with a web browser
! First copy your one-time code: 1C26-43EB
- Press Enter to open github.com in your browser...
! Failed opening a web browser at https://github.com/login/device
exit status 1
Please try entering the URL in your browser manually
#
# Go back the the GUI and open firefox and goto
# https://github.com/login/device
#
# enter your credentials to login to github and then enter the authentication code
#
# Once that has been accepted, return to the ssh session. where you should see
# something like this:
#
✓ Authentication complete. Press Enter to continue...
- gh config set -h github.com git_protocol https
✓ Configured git protocol
✓ Logged in as perdrix52
#
# Download the Qt Online installer for Linux from Qt Website to the Downloads folder
#
cd ~/Downloads
wget https://d13lb3tujbc8s0.cloudfront.net/onlineinstallers/qt-online-installer-linux-x64-4.8.1.run
chmod +x qt-online-installer-linux-x64-4.8.1.run
#
# Now run the installer from a GUI terminal session and install Qt 6.8.2
# (it won't work from the ssh session)
#
# Ensure you install Qt to /opt/Qt and select a Custom Installation
#
# Expand the Qt section and then the Qt 6.8.2 section and expand "Additional Libraries"
#
# Select Desktop, Sources (if you want then), and Qt Charts in the Additional Libraries section
# I also suggest it would be useful to select Qt Debug Information Files
#
./Downloads/qt-online-installer-linux-x64-4.8.1.run
#
# Now return to the ssh session
#
#
# Download CFITSIO from <https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.5.0.tar.gz>
# to your Downloads folder, then untar it, build and install CFITSIO
#
cd ~/Downloads
wget https://github.com/HEASARC/cfitsio/archive/refs/tags/cfitsio4_5_0_20240826.tar.gz
#
# Get the CMake fixes
#
wget https://www.dropbox.com/scl/fi/drt4dcvsn0hd8xaa8ix2y/cfitsio_cmake.tar?rlkey=yrzzdjeo0brnodbbji4g7ku81&dl=1
tar -zxvf cfitsio4_5_0_20240826.tar.gz
cd cfitsio-cfitsio4_5_0_20240826
tar -xvf ../cfitsio_cmake.tar
mkdir build
cmake -B build -G Ninja -DBUILD_SHARED_LIBS=OFF -DUSE_PTHREADS=ON -DUSE_BZIP2=OFF
cd build
ninja
sudo ninja install
#
# Install libjpeg
#
sudo apt-get install libjpeg-dev
#
# Install Exiv2
#
sudo apt-get install exiv2
#
# SmtpClient 2.0 for Qt
#
# Revert to using bluetiger9/SmtpClient-for-Qt as pull request #182 from deepskystacker/SmtpClient-for-Qt was accepted
# on 24th Feb. 2025 (allowing this to build as a static library).
#
cd ~/Downloads
gh repo clone bluetiger9/SmtpClient-for-Qt/SmtpClient-for-Qt
cd SmtpClient-for-Qt
#
# create a build directory
#
mkdir build
cmake -B ./build -G Ninja -DBUILD_SHARED_LIBS=OFF -DCMAKE_PREFIX_PATH:STRING="/opt/Qt/6.8.2/gcc_64"
cd build
ninja
sudo ninja install
#
# Install libinih
#
sudo apt-get install libinih-dev
#
# Install openMP (we'll need to install this as a co-req of our install)
#
sudo apt-get install libomp-dev
#
# Install socat to allow Visual Studio to remote debug CMake
#
sudo apt-get install socat
#
# Get gcc and g++ 13 installed and set symlinks
#
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install --reinstall g++-13 gcc-13
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
#
# Update cmake to 3.30.2
#
cd ~/Downloads
mkdir kitware
wget https://apt.kitware.com/kitware-archive.sh
chmod +x kitware-archive.sh
sudo ./kitware-archive.sh
sudo apt-get purge --auto-remove cmake
sudo apt-get install -y software-properties-common lsb-release
sudo apt-get clean all
sudo apt-get install cmake
#
# Install vcpkg
#
cd ~
sudo apt-get install curl
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.sh
cd ~
#
# Edit .bashrc using (e.g.) nano and and add these lines:
#
export VCPKG_ROOT=~/vcpkg
export PATH=$VCPKG_ROOT:$PATH
#
# You should add them just before the lines that read:
#
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# *************** END OF START OF .bashrc
#
# Install some more pre-reqs for building our dependencies
#
sudo apt-get install mesa-common-dev libxrandr-dev libxxf86vm-dev