Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Update setup-Linux-debian-9.sh #1034

Merged
merged 22 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c63a86d
Update setup-Linux-debian-9.sh
Nov 18, 2021
4960d81
Update setup-Linux-debian-9.sh
Nov 19, 2021
9e9c855
Merge branch 'develop' of https://github.com/slacgismo/gridlabd into …
JimmyLeu76 Jan 18, 2022
c741193
add setup-Linux-debian-11.sh
JimmyLeu76 Jan 18, 2022
a016b42
add --enable-share
JimmyLeu76 Jan 19, 2022
281b471
remove temporary test Dockerfile
JimmyLeu76 Jan 19, 2022
582b1e9
add install latex
JimmyLeu76 Jan 19, 2022
43d40d4
comment out unnecessary installation to speed up test in windows debian
JimmyLeu76 Jan 19, 2022
ac436ed
set default timezone to fix window wsl/debian timezone missing issue
JimmyLeu76 Jan 19, 2022
1b5c25d
change debian 10 setup
JimmyLeu76 Jan 19, 2022
67bbef5
change timezone los angeles
JimmyLeu76 Jan 19, 2022
b708052
pass validataion on windows/wsl/debian:11,restore natural_docs , mono…
JimmyLeu76 Jan 19, 2022
c0522c2
remove temporary Dockerfile
JimmyLeu76 Jan 19, 2022
7e9c6fa
delete setup-Linux-debian-11.sh in this PR and move to new PR
JimmyLeu76 Jan 19, 2022
f080635
update set local timezone from
JimmyLeu76 Jan 20, 2022
77c7ae4
add condition to determine local timezone. If local timezone is Etc/.…
JimmyLeu76 Jan 20, 2022
c2000da
update comments
JimmyLeu76 Jan 20, 2022
f328f91
add install dialog
JimmyLeu76 Jan 21, 2022
7f149b0
fix arrow key broken in shell dialog seleciton
JimmyLeu76 Jan 21, 2022
36db951
add setup timezone from web, if httpcode is not 200, set as deault ti…
JimmyLeu76 Jan 24, 2022
08ff871
pass installation docker/debian9
JimmyLeu76 Jan 24, 2022
65f1ff4
update check if /etc/timezone exit
JimmyLeu76 Jan 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions build-aux/setup-Linux-debian-10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,35 @@
# Install needed system tools
# update first
apt-get -q update
apt-get -q install tzdata -y


apt-get install tzdata -y
apt-get install curl -y
apt-get install apt-utils -y

# "Etc" will cause installation error
if [ ! -f /etc/timezone -o "$(cat /etc/timezone | cut -f1 -d'/')" == "Etc" ]; then
# get time zone from URL
URL="https://ipapi.co/timezone"
response=$(curl -s -w "%{http_code}" $URL)
http_code=$(tail -n1 <<< "${response: -3}") # get the last 3 digits
if [ $http_code == "200" ]; then
time_zone=$(sed 's/.\{3\}$//' <<< "${response}") # remove the last 3 digits
echo "successful get timezone from $URL , Set time zone as $time_zone"
ln -fs /usr/share/zoneinfo/$time_zone /etc/localtime
else
echo "Can not get timezone from $URL , http_code is $http_code "
echo "Set default time zone as UTC/GMT. "
ln -fs /usr/share/zoneinfo/UTC/GMT /etc/localtime
fi

export DEBIAN_FRONTEND=noninteractive
apt-get install -y tzdata
dpkg-reconfigure --frontend noninteractive tzdata
fi

apt-get -q install software-properties-common -y
apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl -y
apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev -y

# install system build tools needed by gridlabd

Expand All @@ -28,7 +53,7 @@ apt-get install xz-utils -y

# Install python 3.9.6
# python3 support needed as of 4.2
if [ ! -x /usr/local/bin/python3 -o "$(/usr/local/bin/python3 --version)" != "Python 3.9.6" ]; then
if [ ! -x /usr/local/bin/python3 -o "$(/usr/local/bin/python3 --version | cut -f2 -d.)" != "Python 3.9" ]; then
echo "install python 3.9.6"
cd /usr/local/src

Expand All @@ -46,11 +71,13 @@ if [ ! -x /usr/local/bin/python3 -o "$(/usr/local/bin/python3 --version)" != "Py
ln -sf /usr/local/bin/pydoc3.9 /usr/local/bin/pydoc
ln -sf /usr/local/bin/idle3.9 /usr/local/bin/idle
ln -sf /usr/local/bin/pip3.9 /usr/local/bin/pip3
/usr/local/bin/python3 -m pip install --upgrade pip
/usr/local/bin/python3 -m pip install matplotlib Pillow pandas numpy networkx pytz pysolar PyGithub scikit-learn xlrd boto3
/usr/local/bin/python3 -m pip install IPython censusdata
fi


# install latex
apt-get install texlive -y

# doxgygen
apt-get -q install gawk -y
Expand Down
86 changes: 65 additions & 21 deletions build-aux/setup-Linux-debian-9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,38 @@
# Install needed system tools
# update first
apt-get -q update
apt-get -q install tzdata -y

# install python 3.7
apt-get install tzdata -y
apt-get install curl -y
apt-get install apt-utils -y


# "Etc" will cause installation error
if [ ! -f /etc/timezone -o "$(cat /etc/timezone | cut -f1 -d'/')" == "Etc" ]; then
# get time zone from URL
URL="https://ipapi.co/timezone"
response=$(curl -s -w "%{http_code}" $URL)
http_code=$(tail -n1 <<< "${response: -3}") # get the last 3 digits
if [ $http_code == "200" ]; then
time_zone=$(sed 's/.\{3\}$//' <<< "${response}") # remove the last 3 digits
echo "successful get timezone from $URL , Set time zone as $time_zone"
ln -fs /usr/share/zoneinfo/$time_zone /etc/localtime
else
echo "Can not get timezone from $URL , http_code is $http_code "
echo "Set default time zone as UTC/GMT. "
ln -fs /usr/share/zoneinfo/UTC/GMT /etc/localtime
fi

export DEBIAN_FRONTEND=noninteractive
apt-get install -y tzdata
dpkg-reconfigure --frontend noninteractive tzdata
fi

apt-get -q install software-properties-common -y
apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl -y
cd /tmp
curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
tar -xf Python-3.7.3.tar.xz
cd Python-3.7.3
./configure --enable-optimizations --enable-shared CXXFLAGS="-fPIC"
make -j10 altinstall
cd /usr/local/bin
ln -s python3.7 python3
ln -s python3.7m-config python3-config
ln -s pip3.7 pip3

# install python libraries by validation
pip3 -q install --upgrade pip
pip -q install pandas matplotlib mysql-client Pillow
apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev -y

# install system build tools needed by gridlabd

apt-get -q install git -y
apt-get -q install unzip -y
apt-get -q install autoconf -y
Expand All @@ -33,8 +44,40 @@ apt-get -q install cmake -y
apt-get -q install flex -y
apt-get -q install bison -y
apt-get -q install libcurl4-gnutls-dev -y
apt-get -q install libncurses5-dev -y
apt-get -q install subversion -y
apt-get -q install util-linux -y
apt-get install liblzma-dev -y
apt-get install libbz2-dev -y
apt-get install libncursesw5-dev -y
apt-get install xz-utils -y

# Install python 3.9.6
# python3 support needed as of 4.2
if [ ! -x /usr/local/bin/python3 -o "$(/usr/local/bin/python3 --version | cut -f2 -d.)" != "Python 3.9" ]; then
echo "install python 3.9.6"
cd /usr/local/src

curl https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz | tar xz
# tar xzf Python-3.9.6.tgz
cd Python-3.9.6

./configure --prefix=/usr/local --enable-optimizations --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions CFLAGS="-fPIC"

make -j $(nproc)
make altinstall
/sbin/ldconfig /usr/local/lib
ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3
ln -sf /usr/local/bin/python3.9-config /usr/local/bin/python3-config
ln -sf /usr/local/bin/pydoc3.9 /usr/local/bin/pydoc
ln -sf /usr/local/bin/idle3.9 /usr/local/bin/idle
ln -sf /usr/local/bin/pip3.9 /usr/local/bin/pip3
/usr/local/bin/python3 -m pip install --upgrade pip
/usr/local/bin/python3 -m pip install matplotlib Pillow pandas numpy networkx pytz pysolar PyGithub scikit-learn xlrd boto3
/usr/local/bin/python3 -m pip install IPython censusdata
fi

# # install latex
apt-get install texlive -y

# doxgygen
apt-get -q install gawk -y
Expand All @@ -51,12 +94,13 @@ if [ ! -x /usr/bin/doxygen ]; then
make install
fi

# mono
apt-get -q install curl -y
# # mono

if [ ! -f /usr/bin/mono ]; then
cd /tmp
apt install apt-transport-https dirmngr gnupg ca-certificates -y
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu wheezy/snapshots/4.8.0 main" | tee /etc/apt/sources.list.d/mono-official.list
echo "deb https://download.mono-project.com/repo/debian stable-bustergrid main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
apt-get -q update -y
apt-get -q install mono-devel -y
fi
Expand Down