Another day in Paradise. So on this beautiful day, I was wondering how I can set up a reverse proxy for Atoma’s test and release tool. Every module of the product runs on different ports and for our clients, it is really a pain in the ass to open up ports on their firewalls. Banking is really secure domain so I was thinking, how I can use a reverse proxy instead of browsing the different modules on nonstandard ports. I use NGINX as a reverse proxy. It is a fast and trusted open-source solution. Here is how I did it.
Category: Linux
After evaluating a model you will get the following message in Moodle:
Launch TensorBoard from command line by typing: tensorboard --logdir='/path_to_your_moodledata/models/4/1566208427/evaluation/coreanalyticstime_splittingquarters/logs/1566583192278/tensor'
Installing
The moodlemlbackend package comes with an older version of TensorFlow package which contains a TensorBoard application where I had problems to view the result. Therefore a new Python virtual environment was installed for running Tensorboard only. With cPanel the Python environment can be set up quickly.
Here is a quick guide on how to launch TensorBoard in cPanel and view the results of the Moodle Analytics models evaluation.
How to Set Proxy in an Ubuntu Terminal?
Yes, because companies like to use proxy but I needed to access the Internet from my Ubuntu running on a VirtualBox.
Just a few steps and access can be established:
- Edit the /etc/environment file with your favorite editor
- Add the following lines
http_proxy="http://myproxy.server.com:8080/" https_proxy="http://myproxy.server.com:8080/" ftp_proxy="http://myproxy.server.com:8080/" no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" HTTP_PROXY="http://myproxy.server.com:8080/" HTTPS_PROXY="http://myproxy.server.com:8080/" FTP_PROXY="http://myproxy.server.com:8080/" NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
Logout and login again.
Apt does not obey the environment variables so we need to set up the proxy setting:
- Edit the /etc/apt/apt.conf file with your favorite editor
- Add the following line:
Acquire::http::proxy "http://myproxy.server.com:8080/";
HTTP proxy is enough most of the times to download packages and updates.
That’s all.
Cheers.
As Citrix XenServer 6.0.2 does not offer template for Debian Wheezy we have to install it in two steps.
First install Debian Squeeze as usual.
Second step is to upgrade Squeeze to Wheezy. Here are the sub-steps:
As it is a new install you do not have to update your system but for sure you can type the following commands:
apt-get update apt-get upgrade apt-get dist-upgrade
Also check that there are no packages are on hold or in any half installed state:
dpkg --audit dpkg --get-selections | grep hold
Now update /etc/apt/sources.list to the following:
# deb http://ftp.hu.debian.org/debian/ wheezy main deb http://ftp.hu.debian.org/debian/ wheezy main deb-src http://ftp.hu.debian.org/debian/ wheezy main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main # wheezy-updates, previously known as 'volatile' deb http://ftp.hu.debian.org/debian/ wheezy-updates main deb-src http://ftp.hu.debian.org/debian/ wheezy-updates main
After this type:
apt-get update
Then perform the upgrade. It is recommended to use a two stage upgrade approach.
apt-get upgrade apt-get dist-upgrade
When it is ready reboot twice. After the first reboot I have found that all filesystems are read only due to an unknown error. After rebooting again everything was ok.
Enjoy your Debian Wheezy.
Links:
Debian: http://www.debian.org/
Debian Wheezy Release Notes: http://www.debian.org/releases/wheezy/amd64/release-notes/
# For some reason I had to start Apache on port 8082, but when I tried to start Apache as root I get:
Permission denied: make_sock: could not bind to address [::]:8082
CentOS use SElinux security, therefore there are pre-defined port that Apache can use. The ports are: 80, 443, 488, 8008, 8009, 8443. So if we want to use another port we should add it. In all sites I’ve found solutions to use the semanage command but when I enter it I got:
-bash: semanage: command not found
A standard installation does not contain semanage so install it by typing:
# yum -y install policycoreutils-python
After that we need to add port 8082.
# semanage port -a -t http_port_t -p tcp 8082
And now we can start Apache with
# /etc/init.d/httpd start