NetBox phần mềm quản lý cơ sở hạ tầng mạng miễn phí

 NetBox là một phần mềm quản lý cơ sở hạ tầng mạng miễn phí được tạo ra bởi DigitalOcean 

Nó được sử dụng để quản lý các thông tin như IPAM, DCIM, ảo hóa, kết nối mạng và nhiều hơn nữa 

NetBox hoạt động như một ứng dụng web dựa trên khuôn khổ Django và sử dụng cơ sở dữ liệu PostgreSQL để lưu trữ tất cả các thông tin cần thiết 

Nó được sử dụng để quản lý và điều hành cơ sở hạ tầng mạng dựa trên nhu cầu của người dùng nhằm phát hiện lỗi và cải thiện 

NetBox là một công cụ quản lý hạ tầng mạng miễn phí và mạnh mẽ 



Here is a tutorial on how to install and configure NetBox on Ubuntu 20.04 12345.

To begin, you will need to install some dependencies required by NetBox. You can install all of them by running the following command:

sudo apt-get install nginx git gcc supervisor python3 python3-dev python3-pip python3-setuptools build-essential libxml2-dev libxslt1-dev libffi-dev graphviz libpq-dev libssl-dev zlib1g-dev -y

Next, you will need to install and configure PostgreSQL database for data storage. You can install it with the following command:

sudo apt-get install postgresql postgresql-contrib -y

After that, you can create a database and user for NetBox with the following commands:

sudo su - postgres
psql
CREATE DATABASE netbox;
CREATE USER netbox WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;
exit

Then, you can download the latest version of NetBox from the Git Hub repository using the following command:

cd /opt/
git clone -b master https://github.com/digitalocean/netbox.git

Next, you can generate Django SECRET Key by running the following command:

cd /opt/netbox/netbox/
./generate_secret_key.py

After that, you can set up the default policies by using the following commands:

sudo ufw default deny incoming
sudo ufw default allow outgoing

If you want to allow incoming SSH connections, you can use the following command:

sudo ufw allow ssh

You can also allow incoming connections on specific ports by using the following command:

sudo ufw allow <port>/<protocol>

For example, to allow incoming HTTP traffic, you can use the following command:

sudo ufw allow 80/tcp

Finally, you can start the UFW firewall by using the following command:

sudo ufw enable

I hope this helps!

#1 OpenStack Yoga yêu cầu cài đặt

 

This is the exmaple of Cloud Computiong by OpenStack Yoga.
Install some services that some components of OpenStack needs for system requirements on here.
This example is based on the emvironment like follows.
        eth0|10.0.0.30 
+-----------+-----------+
|    [ Control Node ]   |
|                       |
|  MariaDB    RabbitMQ  |
|  Memcached            |
+-----------------------+

[1]
[2]

apt -y install mariadb-server
vi /etc/mysql/mariadb.conf.d/50-server.cnf
systemctl restart mariadb
mysql_secure_installation
# set root password
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

# remove anonymous users
Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

# disallow root login remotely
Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

# remove test database
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

# reload privilege tables
Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

root@nghialt-server:~# 
apt -y install software-properties-common

root@nghialt-server:~# 
add-apt-repository cloud-archive:yoga

root@nghialt-server:~# 
apt update

root@nghialt-server:~# 
apt -y upgrade
Install RabbitMQ, Memcached.
apt -y install rabbitmq-server memcached python3-pymysql
# add a user to RabbitMQ
# set any password for [password]

root@nghialt-server:~# 
rabbitmqctl add_user openstack password

Creating user "openstack" ...
root@nghialt-server:~# 
rabbitmqctl set_permissions openstack ".*" ".*" ".*"

Setting permissions for user "openstack" in vhost "/" ...
root@nghialt-server:~# 
vi /etc/mysql/mariadb.conf.d/50-server.cnf
# line 28 : change

bind-address = 
0.0.0.0
# line 40 : uncomment and change
# default value 151 is not enough on Openstack Env

max_connections = 
500