Proxmox
October 27, 2024 |
Download: https://www.proxmox.com/en/downloads
How to install Proxmox in Virtual Box: https://getlabsdone.com/how-to-install-proxmox-ve-on-virtualbox-step-by-step/
- Enter Country and timezone
Download: https://www.proxmox.com/en/downloads
How to install Proxmox in Virtual Box: https://getlabsdone.com/how-to-install-proxmox-ve-on-virtualbox-step-by-step/
Right click Genymotion in Desktop > Properties > Compatibility > Check Run this program run as Administrator
2. If you can't Drag&Drop file into Emulator, remove Administator.
Ref:
https://www.cloudhosting.lv/eng/faq/Mikrotik-L2TP-IPsec-VPN-Server-Step-by-Step-configuration
Step 1: PPP > Interface > L2TP Server
Step 2: IP> Pool > Add
Make VPN Pool
Enter Name: VPNStep 3: PPP > Profile
Step 5: Firewall > Filter Rule (Important step)
- Allow port: 1701, 500, 4500
- Chain: input
- Protocol: udp
- Dst Port: 1701, 500, 4500
- Action: Accept
If you have any question, please send to me: hoquoctri@live.com
Thanks;
1. Install HomeBrew
Ref: https://brew.sh/
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If MacOS can't found brew command
$ echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
2. Install NVM (Node Version Management)
You can install vary node version in PC and easy switch between node version
$ brew install nvm
$ nvm --version
$ nvm install --lts // Install Node latest version
$ nvm install <node_version>
$ nvm use <node version>
Note: if nvm command not found, add line below to ./zshrc
source $(brew --prefix nvm)/nvm.sh
3. Install Yarn command
$ brew install yarn
4. How to show NPM Scripts in Visual Studio Code
Go to View > Open View > Select NPM Script
5. Install Many Java Verison in Mac OS
$ /usr/libexec/java_home -V // All Java Installed will show here
6. Install Many Java Version nin MacOS by SDKMAIN
Ref : https://sdkman.io/usage
// Download SDK
$ curl -s "https://get.sdkman.io" | bash
// Change SDK Man
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
// Check SDK version
$ sdk version
// List packages
$ sdk list or sdk list <package_name>
// Install Java
$ sdk install java
$ sdk install java 8.0.42
// Set use special version
$ sdk use scala 3.4.2
// Set default version
$ sdk default scala 3.4.2
// Check Current version
$ sdk current java
Ref:
https://github.com/fabOnReact/react-native-wear-connectivity?tab=readme-ov-file
I. Create React Native Project on Android
#Remove previous cli
$ npm uninstall -g react-native-cli @react-native-community/cli
#Init project
npx @react-native-community/cli@latest init AwesomeProject
#Edit package.json; Run on Default Port 8081 & Select Device
II. Create React Native Project on WearOS
#Remove previous cli
$ npm uninstall -g react-native-cli @react-native-community/cli
#Init project
npx @react-native-community/cli@latest init AwesomeProject
#Edit package.json , Run on Port 8082 & Select Device
Try test app:
Wear Device:
MariaDB - Config Galera Cluster in RockyOS
I. Install MariaDB
Ref:
1. https://www.digitalocean.com/community/tutorials/how-to-install-mariadb-on-centos-7
2. https://centlinux.com/install-mariadb-galera-cluster-on-linux/
II. Install Galera Cluster
-- Install Galera Pacakges
$ dnf -y install mariadb-server-galera
-- Open firewall
$ $firewall-cmd --add-service=mysql
$ firewall-cmd --add-port={3306/tcp,4567/tcp,4568/tcp,4444/tcp}
$ firewall-cmd --runtime-to-permanent
-- Config Node as below
$ vi /etc/my.cnf.d/galera.cnf
-- Stop/Start Maria Server again. If not, we can reboot servers
-- Check Galera work or not
$mysql -uroot -p
SQL:
- SHOW STATUS LIKE 'wsrep_%'" // Show all parameter
- show global status like 'wsrep_cluster_size'; /. Show Cluster Node Number
We can test that by creating a new database in node #1 and checking on node #2.
is updating...
0
and add 1 to each additional valueType | Predicate |
---|---|
string | typeof s === "string" |
number | typeof n === "number" |
boolean | typeof b === "boolean" |
undefined | typeof undefined === "undefined" |
function | typeof f === "function" |
array | Array.isArray(a) |
//BAD
function isBetween(a1: number, a2: number, a3: number): boolean {
return a2 <= a1 && a1 <= a3;
}
//GOOD
function isBetween(value: number, left: number, right: number): boolean {
return left <= value && value <= right;
}
//BAD
class Subs {
...
}
//GOOD
class Subscription {
...
}
2.3 - Avoid mental mapping
//BAD
const u = getUser();
const s = getSubscription();
const t = charge(u, s);
//GOOD
const user = getUser();
const subscription = getSubscription();
const transaction = charge(user, subscription);
2.3 - Don't add unneed context
//BAD
type Car = {
carMake: string;
carModel: string;
carColor: string;
}
//GOOD
type Car = {
make: string;
model: string;
color: string;
}
2.4 - Naming Convention
- Use camelCase for variable and function names.
- Use camelCase of class members, interface members, methods and methods parameters.
- Use PascalCase for class names and interface names.
// BAD
class foo { }
//GOOD
class Foo { }
- Use PascalCase for enums and camelCase for enum members.
//BAD
enum notificationTypes {
...
}
//GOOD
enum NotificationTypes {
...
}
2.4 - Naming Boolean
- Don't use negative names for boolean variables.
// BAD
const isNotEnabled = true;
// GOOD
const isEnabled = true;
- A prefix like is, are, or has helps every developer to distinguish a boolean from another variable by just looking at it
//BAD
const enabled = true;
//GOOD
const isEnabled = true;
2.5 - Use typescript aliases
-- This will avoid long relative paths when doing imports.
// BAD
import { UserService } from '../../../services/UserService';
// GOOD
import { UserService } from '@services/UserService';
2.6 - Component Structure
Use the following component structure:
- Input properties (i.e. @Input() product: OrderItemModel)
- Output properties (i.e. @Output() changeMade = new EventEmitter(true))
- ViewChild / ViewChildren (i.e. @ViewChild(ChildDirective) child!: ChildDirective)
- HostBinding properties (i.e. @HostBinding('class.valid') get valid() { return this.control.valid; })
- data members (i.e. public isBeingRemoved = false)
- constructor
- lifecycle hooks (following their execution order)
- getters/setters
- event handlers
- other methods
Use the following component accessors order:
- private
- protected
- public
Install Bugzilla on CentOS 8/Rocky
I. Install Packages
Ref:
Step 1: Install EPEL packages:
Ref: https://docs.fedoraproject.org/en-US/epel/
$ dnf config-manager --set-enabled crb
$ dnf install epel-release
Step 2: Install bugzilla required packages:
$ dnf install git httpd httpd-devel mariadb-devel gcc mariadb-server mod_perl mod_perl-devel 'perl(autodie)' 'perl(CGI)' 'perl(Date::Format)' 'perl(DateTime)' 'perl(DateTime::TimeZone)' 'perl(DBI)' 'perl(DBD::mysql)' 'perl(DBIx::Connector)' 'perl(Digest::SHA)' 'perl(Email::MIME)' 'perl(Email::Sender)' 'perl(fields)' 'perl(JSON::XS)' 'perl(List::MoreUtils)' 'perl(Math::Random::ISAAC)' 'perl(Memoize)' 'perl(Safe)' 'perl(Template)' 'perl(URI)'
$ dnf install gd-devel graphviz patchutils 'perl(Apache2::SizeLimit)' 'perl(Authen::Radius)' 'perl(Authen::SASL)' 'perl(Cache::Memcached)' 'perl(Encode)' 'perl(Encode::Detect)' 'perl(File::Copy::Recursive)' 'perl(File::MimeInfo::Magic)' 'perl(File::Which)' 'perl(GD)' 'perl(GD::Graph)' 'perl(GD::Text)' 'perl(HTML::Parser)' 'perl(HTML::Scrubber)' 'perl(IO::Scalar)' 'perl(JSON::RPC)' 'perl(LWP::UserAgent)' 'perl(MIME::Parser)' 'perl(mod_perl2)' 'perl(Net::LDAP)' 'perl(Net::SMTP::SSL)' 'perl(SOAP::Lite)' 'perl(Test::Taint)' 'perl(XMLRPC::Lite)' 'perl(XML::Twig)'
Step 3: Download and install bugzilla package
$ cd /var/www/html/
$ git clone --branch release-X.X-stable https://github.com/bugzilla/bugzilla
Ex: X.X is version
Step 4: Install Perl required Package
$ cd /var/www/html/bugzilla/ && ./install-module.pl Chart::Lines Daemon::Generic Email::Reply HTML::FormatText::WithLinks PatchReader Template::Plugin::GD::Image TheSchwartz
$ ./install-module.pl --all // install all perl module
$./checksetup.pl --check-modules // check require module
Some problems when install:
Problems #1: Can't locate CPAN.pm in @INC
Solution:
$ yum -y install perl-CPAN
==============
Problems #2: No POSTGRES_HOME defined, cannot find automatically
No 'Makefile' created TURNSTEP/DBD-Pg-3.18.0.tar.gz
/usr/bin/perl Makefile.PL LIB="/var/www/html/bugzilla/lib" INSTALLMAN1DIR="/var/www/html/bugzilla/lib/man/man1" INSTALLMAN3DIR="/var/www/html/bugzilla/lib/man/man3" INSTALLBIN="/var/www/html/bugzilla/lib/bin" INSTALLSCRIPT="/var/www/html/bugzilla/lib/bin" INSTALLDIRS=perl -- NOT OK
Solution:
$ yum install postgresql-devel
II. Config Apache
# Edit config file
$ /etc/httpd/conf/httpd.conf
and follow Bugzilla Guide
III. Install Mariab DB
Ref: https://bugzilla.readthedocs.io/en/latest/installing/mysql.html#mysql
How to Install Mariab DB : https://www.digitalocean.com/community/tutorials/how-to-install-mariadb-on-centos-7
$mysql -uroot -p
-- Create DB
CREATE DATABASE IF NOT EXISTS bugs CHARACTER SET = ‘utf8’;
Change MariaDB Configuration:
// Allow Large Attachments and Many Comments
$ /etc/my.cnf.d/mariadb-server.cnf
[mysqld] # Allow packets up to 16M max_allowed_packet=16M
[mysqld] # Allow small words in full-text indexes ft_min_word_len=2
III. Setup Buzilla Config
// Run setup again
$ ./checksetup.pl
// Enter your administrator information
IV - Test Bugzilla
$ cd /var/www/html/bugzilla
$ ./testserver.pl http://localhost/
or access bugzilla front page in web browser.
Note: Must allow port 80 in firewall.
V - Bugzilla Basic Setup
4.1 - Access Bugzilla via : http://<your_ip>/bugzilla/
4.2 - Config Email
Administrator > Parameter > Email menu :
The domain name of the server (Parameter: smtpserver)
The username and password to use (Parameters: smtp_username and smtp_password)
Whether the server uses SSL (Parameter: smtp_ssl)
The address you should be sending mail ‘From’ (Parameter: mailfrom)
is updating...
Share With YouSoftware Engineer Email: hoquoctri@live.com Skype: hoquoctri.it.tdt |