Coder Social home page Coder Social logo

tgui_install's Introduction

Installation script for TacacsGUI

There is no need to worry about dependencies, packages or libraries now. All you need is clear Ubuntu 20.04.x. I hope it will be intuitive for you and you will enjoy installation process.

Requerements:

  1. Clear Ubuntu 20.04.x (I personally recommend that the ISO be downloaded from Ubuntu's official cd mirrors. )

Script does three steps:

  1. (Optional) Set Interface Settings (you have to do that only once)
  2. Install Dependencies (! Internet Required !) #Corrections made to the installer script to ensure that the install goes smooth on Ubuntu 20.04.#
  3. Install Frameworks, Libraries, Web Interface and so on (! Internet Required !)

Prepare and run your script

  • Move to home, delete old data (if it is) and download latest release (or just copy/past):

cd ~; sudo rm -r tgui_install*; wget https://github.com/tacacsgui/tgui_install/releases/download/2.0.2/tgui_install.tar.gz

  • Unpack and move to unpacked files:

mkdir tgui_install; tar -xvf tgui_install.tar.gz -C ~/tgui_install/ --strip-components 1; cd ./tgui_install

  • Make it executable and run:

sudo chmod 755 ./tacacsgui.sh ; sudo ./tacacsgui.sh

OR

sudo chmod 755 ./tacacsgui.sh ; sudo ./tacacsgui.sh silent

silent run fast installation process.

Step 1. Set Interface Settings 📡

If it is you first installation, you have to prepare network interface for communication. From the main menu your choice is 3, Network Settings.

###############################################################
##############   TACACSGUI Installation Script    ##############
###############################################################

ver. 1.0.0

##############     List of available options    ##############

1) Install TacacsGUI       5) Clear and Refresh Menu
2) Re-install TacacsGUI    6) Write to Log file
3) Network Settings        7) Quit
4) Test the System

Please enter your choice (5 to clear output): 3

Now you have to select interface that will be the main one. Now you have to select interface that will be the main one. To show all available interfaces choose 1 (Show Interface List) and then choose 3 (Configure interface), type selected interface and finish network configuration settings. I hope it will be very intuitive for you and you will get success.

###############################################################
##############   TACACSGUI Network Settings Script    #########
###############################################################

ver. 1.0.0

##############     List of available options    ##############

1) Show Interface List      4) Clear and Refresh Menu
2) Show Interface Settings  5) Back to Main Menu
3) Configure interface

Please enter your choice (4 to clear output):

To return to Main Menu select 5.

Step 2. Install Dependencies 🙈

From the Main Menu select option number 1, Install TacacsGUI (or Re-install TacacsGUI if required). On this step you doesn't need to do anything, just see as the script resolve all boring stuff. There are some checks on this step:

  1. Check network settings. If you did not do Step 1, script will notify you and this step will exit.
  2. Check installed packges. If some package missing, script will try to download and install it.
  3. Check connectivity to github.com.
  4. Check connectivity to packagist.org (Composer).
  5. Check connectivity to tacacsgui.com.
  6. Check tac_plus daemon existence. If tac_plus does not installed, script will try to install it for you. There is an archive inside of this package, downloaded from the Marc's Huber site (now it is DEVEL.201903091339.tar.bz2).
  7. Check PHP version. Now it is the latest version - 7.3. If your server does not have it, the script will try to resolve that issue for you.
  8. Check Pip. I can't just pass by Python, hope it will take more places in the project. As in the previous checks it will be installed if you don't have it yet.
  9. Check Composer. If you don't have it yet or have old version, it will installed.
  10. Check root access to two files: /opt/tacacsgui/tac_plus.sh and /opt/tacacsgui/main.sh. Do you know how to use sudo visudo? Don't worry script will do that for you.
  11. Check Ubuntu version. Unfornunately, only 18.04.x supported.

Ok. That all. If you finally see menu of Step 3, it means Step 2 was finished successfully! 😎

Step 3. Install Frameworks, Libraries, Web Interface and so on 🔨

It is here your help is needed. Script will ask you MySQL root password and if it is the first installation password for the tgui_user. ❗ Password containing special characters like !,&,*,/ and so on will destroy the script, it is a bug. Please, set alphanumeric password, to avoid it. Sorry for inconvenience.:exclamation:

###############################################################
##############   TACACSGUI Installation    #########
###############################################################

ver. 1.0.0


Start Installation
Check database...
Try to get root password to MySQL...Not Found
Enter root password to mysql:
Done. Correct password
Remember root password? (y/n): n
Test existence of tgui database...tgui database was created
Test existence of tgui_log database...tgui_log database was created
...
bla bla bla, some boring stuff
...
Tacacs Daemon setup...
tac_plus.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install enable tac_plus
Daemon apploaded
Test Daemon work...Done
Final Check...Check main libraries...Done. Congratulation!
Press any key to exit...

If you see the last three lines, like above, it is a time to check Web Interface! There are two ways:

  • https://<your ip address>:4443
  • http://<your ip address>:8008

After installation I recommend to upgrade your system, use command sudo apt-get full-upgrade -y for that.

Hope you will enjoy installation process and you does not meet any trouble. Although I have edited some parts of the installation script, I'd rather you donate to Aleksey. If you want to help, you are welcome! Also you can be my Patron on Patreon, you can stimulate me do updates more often.

Best Regards, Aleksey

tgui_install's People

Contributors

bhaukaalbaba avatar gurkin33 avatar tacacsgui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tgui_install's Issues

Развертывание в docker

Добрый день!
Есть ли возможность выложить docker stack разнесенный по микросервисам?

More Databese engine ad other web server

It would be nice if in installation not only mysql was detected but mariadb too and option to chose between apache and nginx;

this will especially help in implementing HA in feature (nginx have loadbalancer and proxy inside)

Installation on Debian 10

Hey gurkin33,

I just want to let you know, this a great project and I've used your appliance in my home lab here and there! I know your documentation says Ubuntu only at the moment, but I was wondering what the possibility would be to get this on Debian since Ubuntu is based off of Debian. I've started installing your appliance with some modifications to a Debian VM, I've had to manually add Ubuntu package keys and some repositories. So far I've gotten the web page running but I cannot authenticate with the first time user to finish the MYSQL deployment.

Overall I was just wondering what tied this into being a Ubuntu appliance only. I prefer to use Debian in my home lab since it hasnt given me issues unlike Ubuntu..

Kind Regards,

Matthew

Installation Key not generated for OVA import

I imported the OVA into Google Cloud and have the system running. I am having a problem with the TACACSGUI user add function and would like to submit a support ticket.

I am registered on the support site and need to enter the Installation Key to activate the support site.

I found the installation key under /opt/tgui_data/tgui.key but it is an empty file.

How can this key be generated?

PyCairo Issues during Install

When running TACGUI install via script on a fresh 18.04.6 Ubuntu virtual machine (with changes outlined below) errors similar to what is below are presented (about 10 - 12 iterations). All variations of error refer to the inability to create wheels for pycairo.

Changes made directly after clean install of Ubuntu 18.04.6 image downloaded today from Ubuntu and prior to installing TACGUI:

  1. modifying /etc/ssh/sshd_config to allow SSH via PubCert only
  2. running apt update/upgrade
  3. disabling apparmor
  4. creating tacgui:tacgui/adding to sudo group
  5. replacing UFW with FIREWALLD

Error received during scripted install:
ERROR: Failed building wheel for pycairo
Failed to build pycairo
ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects
command: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpoo4ja83u

WARNING: Discarding https://files.pythonhosted.org/packages/0b/fd/56ac6898afc5c7f5718026103bd8f0b44714b6f79ac20d7eb8990c9a7eab/PyGObject-3.32.0.tar.gz#sha256=a4d6f6d8e688d28e07119fc83aabc6e7aad02057f48b2194089959d03654f695 (from https://pypi.org/simple/pygobject/). Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-vip7j6fe/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo Check the logs for full command output.

ubuntu 18.04 в docker: ошибка при проверке на запуск сервиса

Пробую поставить сервис в докере, при установке ругается на то, что сервис не запущен и выходит. В контейнере при проверке состояния сервиса нет строчки "Active: active (running)"

root@e397e1ba3318:/# /etc/init.d/tac_plus status
tac_plus (19) is running.
root@e397e1ba3318:/# service tac_plus status
tac_plus (19) is running.

Для себя пока делаю так:

Из install.sh удаляем проверку на запуск демона. Меняем эту строчку:
if [[ $(service tac_plus status | grep "Active: active (running)" | wc -l) -eq 0 ]]; then
на эту:
if [[ $(service tac_plus status | grep "is running" | wc -l) -eq 0 ]]; then

FROM ubuntu:18.04

# Логин и пароль в gui по умолчанию tacgui/tacgui

ENV DEBIAN_FRONTEND noninteractive
ENV MYSQL_PASSWORD SJdsk339JdwQ
ENV INSTALL_DIR tgui_install

RUN apt update \
 && apt install -y tzdata locales curl nano procps iputils-ping sudo supervisor git mysql-server software-properties-common systemd \
 && echo "Europe/Moscow" > /etc/timezone  \
 && dpkg-reconfigure -f noninteractive tzdata \
 && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
 && locale-gen \
 && rm -rf /var/cache/apt/* \
 && rm -rf /var/lib/apt/lists/* \
 && rm -rf /tmp/*

ENV LANG en_US.UTF-8

# Supervisord
COPY config/supervisor.conf /etc/supervisor/conf.d/supervisor.conf

COPY gui/ /tmp

RUN echo $MYSQL_PASSWORD >> /tmp/${INSTALL_DIR}/tmp/.tgui_mysql \
 && service mysql start && service mysql status \
 && sleep 60 \
 && mysqladmin -u root password $MYSQL_PASSWORD \
 && /tmp/${INSTALL_DIR}/tacacsgui.sh silent \
 && rm -rf /var/cache/apt/* \
 && rm -rf /var/lib/apt/lists/* \
 && rm -rf /tmp/*

# Переводим логи в stdout
RUN find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Cc]ustom[Ll]og/#CustomLog/g' {} \; \
 && find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Ee]rror[Ll]og/#ErrorLog/g' {} \;  \
 && sed -i -e 's/LogLevel\ warn/LogLevel\ crit/g' /etc/apache2/apache2.conf \
 && rm -f /var/log/apache2/{error.log,access.log} \
 && ln -sf /proc/self/fd/1 /var/log/apache2/{error.log,access.log}

# volumes
VOLUME ["/var/lib/mysql"]

# Tacacs
EXPOSE 49 8008

CMD ["/usr/bin/supervisord"]


supervisor.conf

[supervisord]
nodaemon=true

[program:apache]
command=/usr/sbin/apache2ctl -DFOREGROUND
process_name=%(program_name)s_%(process_num)02d
numprocs=1
autostart=true
autorestart=true
startsecs=0
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0

[program:mysql]
autostart=true
autorestart=true
startretries=3
process_name=%(program_name)s
user=mysql
redirect_stderr=true
command=/usr/bin/pidproxy /tmp/mysql.pid /usr/bin/mysqld --datadir=/var/lib/mysql --pid-file=/tmp/mysql.pid
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
environment=PATH=/usr/local/sbin:/usr/bin:/bin:/usr/local/bin

[program:tacacs]
command 		    = /etc/init.d/tac_plus start
autostart 		  	= true
autorestart 	  	= false
startretries	  	= 0
startsecs		    = 0
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0

Stuck Saving

After an issue with drive space which has been corrected, my primary server is stuck applying changes. It remains this way after a reboot as well. The Test and Apply buttons just spin.

Не устанавливается, просит MYSQL

Привет!
При установке выдает ошибку:
The following packages have unmet dependencies:
mysql-server : Depends: mysql-server-8.0 but it is not going to be installed

Однако, у меня установлена mariadb mysql Ver 15.1 Distrib 10.3.38-MariaDB
Как-нибудь можно адаптировать установочный скрипт под неё?

What are the Ubuntu versions supported?

Hi,

I'm confused.

Requirements say:

  1. Clear Ubuntu 18.04.x (you can download iso here)

Step 2. Install Dependencies say:

  1. Check Ubuntu version. Unfornunately, only 16.04.x supported.

What is the recommend Ubuntu version to install tacacsgui?

Thanks!

Ubuntu 18.04.2 LTS no longer use ifupdown

root@tacacs-01:~/tgui_install# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

root@tacacs-01:~/tgui_install# more /etc/network/interfaces
# ifupdown has been replaced by netplan(5) on this system. See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
# sudo apt install ifupdown

That affect interfaces.sh scripts

Recent Ubuntu LTS 22.04 - missing dependencies

I try to instal tacacsgui on Ubuntu 22.04.

Package lwres is unavailable. Manually installing lwresd_9.10.3.dfsg.P4-8_amd64.deb from file claims more dependencies.

root@tacacsgui:~/download# apt install lwresd_9.10.3.dfsg.P4-8_amd64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package lwresd_9.10.3.dfsg.P4-8_amd64.deb
root@tacacsgui:~/download# apt install ./lwresd_9.10.3.dfsg.P4-8_amd64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'lwresd' instead of './lwresd_9.10.3.dfsg.P4-8_amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 lwresd : Depends: libbind9-140 (= 1:9.10.3.dfsg.P4-8) but it is not installable
          Depends: libdns162 (= 1:9.10.3.dfsg.P4-8) but it is not installable
          Depends: libisc160 (= 1:9.10.3.dfsg.P4-8) but it is not installable
          Depends: libisccc140 (= 1:9.10.3.dfsg.P4-8) but it is not installable
          Depends: libisccfg140 (= 1:9.10.3.dfsg.P4-8) but it is not installable
          Depends: liblwres141 (= 1:9.10.3.dfsg.P4-8) but it is not installable
          Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
          Recommends: libnss-lwres but it is not installable
E: Unable to correct problems, you have held broken packages.

Any hints how to install this on recent secure distro?

how to change database for tacacsgui and use postgresql not mysql to start tacacsgui

  1. I have a docker images which can successfully run tacacsgui and it's database(tgui,tgui_log) is a remote DB, not local. I changed the /opt/tacacsgui/web/api/config.php, to make DB_HOST become anther db that is also a docker and they are in the same docker bridge , then run systemctl apache2 restart, last check the web interfaces got server error without input anything.
  2. If I want to use postgresql to start tacacsgui, how to change the configfile?

Error - Slim Framework not installed!!!

Hi,

I tried to install tacacsgui on Ubuntu 18.04.5 LTS.

First it showed me an error about PHP:

########### Error! ###########
Error! PHP 7.3 Not Installed!
####################################

After use the commands below, PHP 7.3 was installed successfully

sudo apt-get install software-properties-common

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

Now I'm stuck on this error:

########### Error! ###########
Slim Framework not installed!!!
####################################

This way, frontend don't load correctly:
403 Forbidden - You don't have permission to access this resource.

Is there a way to install Slim Framework automatically?

Thanks!

MySQL root password

With the help of old documentation, I installed tacacsgui
https://tacacsgui.com/documentation_old/install-tacacsgui/

At the step where it asks for root password for MySQL and I could not authenticate with any password here.

###############################################################
##############   TACACSGUI Installation    #########
###############################################################

ver. 1.0.0


Start Installation
Check database...
Try to get root password to MySQL...Not Found
Enter root password to mysql:
###########    Error!    ###########
Incorrect MYSQL root password! Exit.
####################################

just curious if there is a preset password or if it is asking for system root password.

Interfaces with @ on the name

On my current Hypervisor (Proxmox 5.4-3) environment for a lxc container the links inside the container look like:

root@tacacs-01:~/tgui_install# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
27: eth0@if28: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 0e:e7:47:58:e4:ab brd ff:ff:ff:ff:ff:ff link-netnsid 0

The use of @ on the link name affect the name detection on the func_if.sh I was able to modify the "function interface_list" to be able to properly display the interfaces, but still have issues with "function interface_existance"

###############################################################
############## TACACSGUI Network Settings Script #########
###############################################################

ver. 1.0.0

############## List of available options ##############

  1. Show Interface List 4) Clear and Refresh Menu
  2. Show Interface Settings 5) Back to Main Menu
  3. Configure interface

Please enter your choice (4 to clear output): 3

Type the name of interface:
########### Error! ###########
Unrecognized Interface
####################################

Please enter your choice (4 to clear output): 1

Show Interface List

lo
eth0@if28

Please enter your choice (4 to clear output): 3

Type the name of interface: eth0@if28
########### Error! ###########
Unrecognized Interface eth0@if28
####################################

Please enter your choice (4 to clear output): ^C

Fix for:
function interface_list () {
ip link | grep -Po '(?<=[0-9]: )[a-z0-9@]+(?=:)' | sed "s/^/${TABSPACE}/";
}

Any hint who to fix the rest of the functions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.