[ADD] script installation arch linux
This commit is contained in:
parent
5e51318515
commit
a36592073c
2 changed files with 69 additions and 6 deletions
62
script/install/install_arch_linux.sh
Executable file
62
script/install/install_arch_linux.sh
Executable file
|
|
@ -0,0 +1,62 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
install_package() {
|
||||
local package_name=$1
|
||||
|
||||
# Check package is already installed
|
||||
if pacman -Qs "$package_name" > /dev/null; then
|
||||
echo "$package_name is already installed."
|
||||
else
|
||||
echo "Installation of package $package_name..."
|
||||
yes|yay -S "$package_name"
|
||||
fi
|
||||
}
|
||||
|
||||
# Odoo installation
|
||||
install_package postgis
|
||||
install_package postgresql
|
||||
install_package mariadb
|
||||
install_package libev
|
||||
install_package wkhtmltopdf
|
||||
|
||||
echo "Need password to create symbolic link, create postgres user and install npm :"
|
||||
sudo ln -fs /usr/lib/libldap.so /usr/lib/libldap_r.so
|
||||
|
||||
sudo su - postgres -c "createuser -s ${EL_USER}" 2>/dev/null || true
|
||||
|
||||
echo -e "\n---- Update NPM ----"
|
||||
install_package npm
|
||||
|
||||
sudo npm install npm@latest -g
|
||||
retVal=$?
|
||||
if [[ $retVal -ne 0 ]]; then
|
||||
echo "npm install npm lastest installation error."
|
||||
exit 1
|
||||
fi
|
||||
sudo npm install -g rtlcss
|
||||
retVal=$?
|
||||
if [[ $retVal -ne 0 ]]; then
|
||||
echo "npm install rtlcss installation error."
|
||||
exit 1
|
||||
fi
|
||||
sudo npm install -g less
|
||||
retVal=$?
|
||||
if [[ $retVal -ne 0 ]]; then
|
||||
echo "npm install less installation error."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "\n---- Test tool ----"
|
||||
npm install
|
||||
retVal=$?
|
||||
if [[ $retVal -ne 0 ]]; then
|
||||
echo "npm install prettier + plugin-xml installation error."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# TODO install nginx
|
||||
|
||||
# ERPLibre installation
|
||||
install_package cmake
|
||||
install_package parallel
|
||||
install_package tk
|
||||
|
|
@ -1,17 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ "${OSTYPE}" == "linux-gnu" ]]; then
|
||||
OS=$(lsb_release -si)
|
||||
VERSION=$(cat /etc/issue)
|
||||
if [[ "${OS}" == *"Ubuntu"* ]]; then
|
||||
if [[ "${VERSION}" == Ubuntu\ 18.04* || "${VERSION}" == Ubuntu\ 20.04* || "${VERSION}" == Ubuntu\ 22.04* || "${VERSION}" == Ubuntu\ 22.10* || "${VERSION}" == Ubuntu\ 23.04* || "${VERSION}" == Ubuntu\ 23.10* || "${VERSION}" == Ubuntu\ 24.04* ]]; then
|
||||
source /etc/os-release
|
||||
if [[ "${ID}" == "ubuntu" ]]; then
|
||||
if [[ "${VERSION_ID}" == "18.04" || "${VERSION_ID}" == "20.04" || "${VERSION_ID}" == "22.04" || "${VERSION_ID}" == "22.10" || "${VERSION_ID}" == "23.04" || "${VERSION_ID}" == "23.10" || "${VERSION_ID}" == "24.04" ]]; then
|
||||
echo "\n---- linux-gnu installation process started ----"
|
||||
./script/install/install_debian_dependency.sh
|
||||
else
|
||||
echo "Your version is not supported, only support 18.04, 20.04 and 22.04 - 24.04 : ${VERSION}"
|
||||
echo "Your version is not supported, only support 18.04, 20.04 and 22.04 - 24.04 : ${VERSION_ID}"
|
||||
fi
|
||||
elif [[ "${OS}" == *"Debian"* ]]; then
|
||||
elif [[ "${ID}" == "debian" ]]; then
|
||||
./script/install/install_debian_dependency.sh
|
||||
elif [[ "${ID}" == "arch" ]]; then
|
||||
./script/install/install_arch_linux.sh
|
||||
else
|
||||
./script/install/install_debian_dependency.sh
|
||||
echo "Your Linux system is not supported, only support Ubuntu 18.04 or Ubuntu 20.04 or Ubuntu 22.04 - Ubuntu 23.10 - Ubuntu 24.04 ."
|
||||
|
|
|
|||
Loading…
Reference in a new issue