Setup Asterisk server for telephone validation and cleaning

Prepare a computer with PCI slot

Consider the cost and compatibility, normally I will use Dell desktop or server.

Install telephony interface cards into your computer

Telephony interface cards are PCI or PCI Express expansion cards that connect computers running Asterisk directly to legacy phone lines, phones and phone systems. The cards convert the legacy signaling and media into Asterisk’s internal formats.

I chosen Digium cards, because Asterisk is provided by Digium. A lot of cheaper alternative cards, I just don’t want to facing compatible issue.

More details for telephony interface cards:
http://www.asterisk.org/products/telephony-interface-cards

Digium telephony interface cards products:
https://www.digium.com/products/telephony-cards

Download and install AsteriskNOW

Simple, just refer to this link:
https://wiki.asterisk.org/wiki/display/AST/Installing+AsteriskNOW

Configuration

  1. Login FreePBX Administration via http://<server-ip>
  2. Update Connectivity > DAHDi Config > Global Settings
    • Select Language: <your preferred language>
    • Enable Busy Detect: Yes
    • Other Global Dahdi Settings: callprogress = yes
  3. Update Connectivity > DAHDi Config > System Settings
    • Tone Region: <select your country or compatible>
  4. Update Connectivity > DAHDi Config > Modprobe Settings
    • Opermode: enable, <select your country or compatible>
  5. Click save config andRestart  Dahai and asterisk
  6. Update Settings > Advanced Settings
    1. Country Indication Tones: <select your country or compatible>

Test Asterisk Manager

Default Asterisk Manager User: admin
Default Asterisk Manager Password: amp111

http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Originate

Dialplan for Asterisk Manager

File: /etc/asterisk/extensions_custom.conf

How to Install NGINX and PHP 7.3 with PHP-FPM on RHEL/CentOS 7

Basic Server Setup

Setup Default PHP Version

Setup NGINX and PHP-FPM

Update Configuration

Create Virtual Hosts

Setup Firewall (Optional)

SELinux Settings (Optional for SELinux enabled)

Reboot after Setup

How to Install MySQL 8.0 on RHEL/CentOS 7

Basic Server Setup

Setup MySQL 8.0

Setup Firewall (Optional)

Reboot after Setup

Optional Settings for MySQL 8.0

Disable MySQL Strict Mode

Reference: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html

Fix MySQL Password Expired

To establish a global policy such that passwords never expire.

Update /etc/my.cnf

Reference: https://dev.mysql.com/doc/refman/8.0/en/password-management.html#password-expiration-policy

Install and Secure Redis on CentOS 7

 

Redis Installation

Add the EPEL repository, and update YUM

 

Install Redis

 

Start Redis and setup automatically start Redis on boot

 

Verify the Installation

If Redis is running, it will return: PONG

 

Redis Configuration

Password settings

find and uncomment the requirepass line in the configuration file, and replace master_password with a secure password

 

Firewall settings

 

Local Benchmark Test

 

Check Redis Version

 

Setup PHP session to Redis

 

 

How to fix MySQL connection error: Authentication plugin ‘caching_sha2_password’ cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found

The problem is some MySQL clients not yet support new password encryption method.

 

Just change the user password encryption back to legacy version, then problem will be fixed.

The following SQL update specific user to legacy encryption:

 

Also, you can change the default authentication plugin to legacy version.

Update /etc/my.cnf and add the following line after [mysqld]:

 

 

Install wkhtmltopdf & wkhtmltoimage to CentOS with Chinese & Asian fonts support

Install dependencies

 

Install wkhtmltopdf and wkhtmltoimage

p.s. you can find more versions in the following link:

https://github.com/wkhtmltopdf/wkhtmltopdf/releases

 

Install  Chinese & Asian fonts support

 

References

https://wkhtmltopdf.org/

MySQL ERROR 1366 (HY000): Incorrect integer value: ” for column ‘id’ at row 1 Problem & Fix

 

Problem:

MySQL throw the following error message on insert or update statement executed

 

Why?

Try to update string value into integer column, and strict sql mode is enabled.

Mainly occurred on MySQL 5.x or above.

 

How to Fix:

1. Disable strict sql mode

Update /etc/my.cnf , and remove STRICT_TRANS_TABLES from sql-mode

 

References:

https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_strict_trans_tables

Too many process sidekiq 4.2.7 gitlab-rails [0 of 25 busy]

I am running a small GitLab server for my personal use, but GitLab default concurrency settings up to 25.

So I try to update the max concurrency to free server resource.

 

Update Configuration

Add or update the value

 

Restart the Service

 

 

Most Simple and Fastest Way to Backup and Restore a MySQL Database (mysqldump & mysql client)

How to mysqldump and mysql to backup and restore a database:

Backup to .sql file

 

Restore from .sql file

 

Suggested to run the command in database server to get the fastest speed.

 

References:

https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html

How to Install NGINX and PHP-FPM on RHEL/CentOS 7

Basic Server Setup

 

 

 

Setup NGINX and PHP-FPM

 

 

Update Configuration

 

 

 

 

 

Create Virtual Hosts

 

 

 

 

Setup Firewall (Optional)

 

SELinux Settings (Optional for SELinux enabled)

 

Reboot after Setup