Category Archives: Homeschool

Configuring Memcached PHP Libraries On Your Dedicated Server

The dedicated servers at SANGKRIT.net offer you the option to configure your object caching system in the way that suits you best.

The lesson will guide you on how and why configuring Memcached PHP Libraries on your Linux-based dedicated server benefits you.

Memcached is one free object caching system that can be installed on your server for improving the performance of your website. It only works when you install the daemon, install the PHP libraries and configure your PHP application correctly.

You can easily do all that by following these steps:

  1. Login to your SANGKRIT.net account
  2. Visit your My Products page
  3. Click the Servers option
  4. Click Manage
  5. Open WHM

Next, on the WHM panel follow these steps:

  1. From the Software section on the left, select EasyApache 4
  2. Click the Customize button present in the Currently Installed Packages section.
  3. Click PHP Libraries on the left
  4. Type Memcached in the search box
  5. Click the button to install Memcached on the desired versions of PHP
  6. Click the Review button on the left,
  7. Click the Provision button at the bottom of the page

The installation should be complete now.

Apart from this, you should also know that the same modules can also be installed with yum in SSH. But be very conscious about the naming convention i.e. ea-php72-php-memcached. It must be installed on each version of PHP.

The next coming lesson will help you in the process of installing and managing the Memcached Daemon.

How To Quickly Setup Your New CentOS Server At Sangkrit.net?

The new dedicated servers at Sangkrit.net offers you CentOS system that is highly customizable offering you easy to use command panels making it manageable for you to perform important tasks for yourself or your clients.

When you look forward to creating a new CentOS Server space, you need to perform several steps to end up getting a configured server with a working network protocol and SSH access.

This lesson will guide you through the steps for further server setup of CentOS after you purchase a Dedicated Server plan at Sangkrit.net

First of all, setup SSH as explained in this lesson here, then login with your personal account using this command –

ssh root@server-ip

In the above line, type the IP address of your server replacing the ‘server-ip’ text. When you select an SSH key for authentication, the command looks something like this:

ssh root@server-ip -i path/to/ssh/key

Next, upgrade the server package using this command:

dnf update

Once the process is complete, you will need to clean the cache and clear up the disk space by using this command:

dnf clean all

The initial setup of your server is now complete. Next, learn to host your domain name on your server.

Configure Linux Server For The EPEL Repository

In order to have access to some important traffic monitoring controls, you will need to set up your CentOS system to use the EPEL Repository i.e. Extra Packages for Enterprise Linux.

However, this repository is not officially strengthened or endorsed by CentOS. Instead, it is supported by a bunch of Fedora Core enlistees to handle the packages which are normally used by Enterprise Linux professionals, especially the packages that are not included in either CentOS, Fedora Core, or Red Hat Linux Enterprise.

Possible conflicts on CentOS

Hence, sometimes there might be some chances for this repository to bring some conflicts on a server having common dependencies. To overcome such a situation, before deploying it you must test it on a non-production Linux system running the same servers as the production.

Advantages of EPEL Repository

The biggest benefit of operating the EPEL Repository over any other repository with CentOS is that the binaries are never impaired.

Installation & Configuration

Anyone can easily install it via YUM.

[root@user]# yum -y install epel-release

Once installation completes, you will need to update it

[root@user]# yum repolist

At this juncture, the EPEL Repository becomes ready to use.

America Is Out To Make CPC’s Insistence On One China Policy Backfire Democracy Into The Mainland

In a press briefing on Sunday the 1st of August 2022 at the White House, the National Security Council Coordinator for Strategic Communications John Kirby said, “The world has seen the United States government be very clear that nothing has changed — nothing has changed — about our One China policy, which is of course guided by the Taiwan Relations Act, the Three Joint U.S.-PRC Communiqués, and the Six Assurances.”  

On the same day, the US House Speaker Nancy Pelosi set off on a tour of Asia without any mention of Taiwan on her official itinerary, which included Singapore, Malaysia, South Korea and Japan, but landed in Taiwan too in a military plane and said, “Forty three years ago, America made a promise to always stand with Taiwan… today our delegation came to Taiwan to make it unequivocally clear we will not abandon our commitment to Taiwan,” reaffirming that the US won’t ever leave the democracy in Taiwan unguarded. 

In retaliation, China started a series of military operations surrounding the island of Taiwan from Tuesday night.

“We have the determination, ability and confidence to ensure national security,” Taiwan said in a statement.

Initially America was an ally to Taiwan and Pakistan. Pakistan brought democratic America in touch with communist China. Thereafter following the footsteps of capitalist America, China also made its fortune by supplying to Europe. Now cash-rich Communist China has formed an axis with Russia and North Korea firmly in its league. 

America’s adherence to one China policy is clearly in conformity with its adherence to democracy above all so as to the Communist Party of China’s insistence on one China policy backfires democracy into the mainland. Democracy from America seems out for that.  

Managing The Hostname For Your Linux Server

A hostname is a selectable name for your Dedicated Server or VPS host. These are composed of a sequence of labels attached with dots. Here’s how you can change the hostname of your server by following a few easy steps.

  1. Login to your SANGKRIT.net account
  2. Visit your My Products page
  3. Click the Servers option
  4. Click Manage
  5. Select Settings
  6. Next to Hostname, click Change
  7. Enter the new hostname in the Server Hostname field
  8. Click Save.

Remember, the hostname should meet the requirements of an appropriate hostname before you can save it. Once you save your changes, the new hostname will appear in the Settings section and will start to work like the old one.

Managing Ports On Your Server, Nydus & Port 2224

For a server to function smoothly, port 2224 is kept open by default during its provisioning time.

But at the same time, if your VPS or dedicated server affairs don’t complete due to the reason of a blocked port 2224, you can unblock it and try again after a few minutes.

On Windows servers, you can use the Windows Defender Firewall for unblocking the port. And for Linux servers, the steps are given below.

For unblocking ports on a Linux server you can use firewallD. In case you use a different firewall utility, you will need to change the given sample code.

First of all, connect your server via SSH and then run the following command:

sudo firewall-cmd –permanent –zone=public –add-port=2224/tcp

Followed by these commands:

sudo firewall-cmd –reload

sudo firewall-cmd –list-ports

These two commands are for confirming the ports are cleared i.e. unblocked.

Next, What is Nydus?

It refers to a pair of agent applications (nydus-ex and nydus-ex-api) that functions on your dedicated server and communicates with your server dashboard.

They provide resource metrics and perform the server functions that you’ve requested. The agent listens on port 2224.

Since the server dashboard and its upgrades are dependent on Nydus, so blocking port 2224 – or removing Nydus from your server will stop these features.

In a case, if you accidentally or knowingly remove the Nydus components, you are required to restore them from a backup that you have taken before. If you don’t have a backup, you will need to rebuild your server.

Managing Apache & PHP Modules On Your Server

You can install necessary PHP modules for Apache on your VPS and Dedicated Server and then enable them manually.

You can enable, disable, or customize such modules using a tool called EasyApache. By using this tool, the PHP and Apache options are rebuilt on the basis of the options you select.

  1. Login to your SANGKRIT.net account
  2. Visit your My Products page
  3. Click the Servers option
  4. Click Manage
  5. Open WHM

The easiest way to upgrade PHP is through EasyApace which you can find in the software section of WHM:

  1. Lookup for EasyApache using the search box on the left section of WHM
  2. Click to open it then click EasyApache (ApacheUpdate) option
  3. This will open the present time Apache Configuration Profile
  4. Click the gear icon for a customized profile option
  5. You will see Apache wizard guiding you through various steps
  6. Here, select the Apache version
  7. Then, select your PHP versions
  8. Next, from the Short Options List, select the features you like to include in your Apache
  9. You can enable the modules you like to add and you can also disable the modules which you don’t want
  10. For more configuration options you may click the Exhaustive Options List
  11. Finally, select the Save and Build option

In the Exhaustive Options List, you can select or deselect various other modules. There is also an option called Save Only that only saves your profile and doesn’t starts the building process.

To start building you will need to click Save and Build option as explained above. Once you click this option, do not close your browser window and wait for the process to complete.

This may take some time depending on the options you have selected and the power of your server. If you are using a small server with limited resources then you should not enable many options at once and instead enable a few options first and then repeat the process for enabling more modules.

Upgrading PHP On Your Dedicated Server

Before upgrading PHP on your VPS or Dedicated Server, you need to make sure that all applications and websites are compatible with the version of PHP you are switching to.

Next, take a backup of all your websites and apps, then follow the given steps.

  1. Login to your SANGKRIT.net account
  2. Visit your My Products page
  3. Click the Servers option
  4. Click Manage
  5. Open WHM

The easiest way to upgrade PHP is through EasyApace which you can find in the software section of WHM:

  1. Lookup for EasyApache using the search box on the left section of WHM
  2. Click to open it then click EasyApache (ApacheUpdate) option
  3. This will open the present time Apache Configuration Profile
  4. Click the gear icon for a customized profile option
  5. Apache version screen will appear
  6. Select the Apache version you want
  7. Click on the next step button
  8. A screen will appear where you can select the PHP version
  9. Select the PHP version and click the next step button
  10. Follow the next two steps to save, build, and upgrade

The directories you must know:

Directory for the specific references to the PHP directory or extensions:

/usr/local/cpanel/3rdparty/php/version-number/

Directory for the specific references to PHP libraries or extensions:

/usr/local/cpanel/3rdparty/php/version-number/lib

Directory for the specific references to PHP binaries:

/usr/local/cpanel/3rdparty/php/version-number/bin/

Every version of PHP has its own php.ini file which is found in:

/usr/local/cpanel/3rdparty/php/version-number/etc

Every time you edit this file, the changes are not transferred to other PHP versions you upgrade to or switch to. Hence, after an upgrade, you also need to change your php.ini file to match it with your newer version of PHP.

Perform Power Cycle When You Lose Access To Server Boot Options

Power Cycle is an option used to immediately disconnect power from your server to power it up again. This is mostly done when you lose access to rebooting options on your server.

Before performing a power cycle you should know that it does not shut down your server applications gracefully and thus could result in data loss.

If you are a Dedicated Server owner, and you want to turn it off and then restart it forcefully, just follow these steps:

  1. Login to your SANGKRIT.net account
  2. Visit your My Products page
  3. Click the Servers option
  4. Click Manage next to the server you want to restart
  5. Select Server Actions > Power Cycle from the upper-right corner of the page
  6. Click the Request Power Cycle option

Now the power cycle begins and this may take some time, a couple of minutes. Next, when it is finally done the cycle is added to the history list of your server.

The VPS owners need to follow a different set of steps:

  1. Login to your SANGKRIT.net account
  2. Visit your My Products page
  3. Click the Servers option
  4. Click Manage next to the server you want to restart
  5. Select Server Actions > Restart Server

That’s it. These options are useful especially when you are not able to boot your server via SSH. These don’t cause any loss to saved content but you may lose any unsaved files or temporary settings on your server after enforcing a power cycle.

Configuring MySQL Repository On Linux Server CentOS

CentOS offers you no native MySQL package so you need to add it on your own. This you can do by adding a MySQL hosted repository on your Linux System CentOS.

Add the MySQL Yum repository to your system’s repository list. This can be done by installing an RPM that comes with MySQL.

  1. Go to the Download MySQL Yum Repository page (https://dev.mysql.com/downloads/repo/yum/) in the MySQL Developer Zone
  2. Select and download the release package for your platform
  3. Use the yum package manager to install MySQL (yum -y install mysql-server)
  4. Enable the MySQL Daemon Service, use these commands systemctl start mysql followed by systemctl enable mysql

That’s it. Now you may check and make sure that MySQL is up and running, simply use this command – sudo service mysqld status.

Configuring WAF & CDN On Your Dedicated Server & VPS

To configure WAF or CDN, you’ll need to additionally purchase a Website Security alongside your hosting option such as Business Hosting, VPS, or Dedicated Server.

Then, there are a few steps you will need to take to activate the Web Application Firewall(WAF) and Content Delivery Network (CDN) over your websites.

Start by subscribing to a Website Security option. Then, simply login to your Sangkrit.net account, move to the product page, and follow these steps:

  1. Select ‘Manage All’ given next to Website Security and Backups
  2. Select Set Up under Firewall, for the domain, you want to set up WAF and CDN
  3. For hosting users, the setup completes in a few minutes. But the server users need to follow a few more steps which are given below
  4. Use the link supplied under Internal Domains to make sure your site loads correctly
  5. Login to the account where your DNS is hosted and configure the A Record so it points to the Website Firewall using the IP address listed under your Firewall IP address
  6. Once A Record is updated, the Website Security dashboard will update and show that the service has been activated. This can take up to a day to complete

If you have a firewall on your hosting servers like CSF or ModSecurity, you should allowlist some IPs. Because all connections to your server will pass through this firewall and adding associated IPs to your firewall’s allow list is going to prevent your sites from being blocked incorrectly.

These are the addresses you should allow:

192.88.134.0/23, 185.93.228.0/22, 2a02:fe80::/29, 66.248.200.0/22, 208.109.0.0/22

Once WAF is activated, the Content Delivery Network (CDN) automatically starts working.

Reprovisioning Your Linux VPS or Dedicated Server

In the previous lessons of System Engineering, you have learned how to startup working with VPS or Dedicated Server. Now sometimes it happens with the newbies that they mess up with config on their server and in that case when no return is possible or you don’t know the solution you can just rebuild your server to give yourself a fresh start.

For reverting to a clean setup on your Linux Server, you can rebuild it which is also called reprovisioning. This reprovisioning process is done to return your server to a newly purchased state.

Reprovisioning erases all problematic code and content on your server’s hard drive, including all backups, files, everything and this cannot be undone.

To start, simply login to your SANGKRIT.net account and follow these steps:

  1. Visit your My Products page
  2. Click Servers
  3. Next to your server, click Manage
  4. On the upper-right corner, click Server Actions
  5. Select Rebuild Server

Now, follow the prompts on the rebuild your server screen, and then re-set-up your server by following these steps:

  1. Next to your server, click Manage
  2. Enter a name for your server in the Server name field
  3. Select an OS and data center location (if available) and then click Next
  4. Complete the fields for making a username and password
  5. Click Finish

It takes sometimes and your server is rebuilt, configured, and restarted and then you may log in to your server and do whatever you like doing.

China’s Playing Pakistan Can Make India Recognize Taiwan

India and China should better refrain from wasting their historic chances against each-other as this has been a favourite game plan of the West that the two neighbours are getting entrapped to play. Contrarily by coming together they can consolidate their prospects even better instead of spoiling everything in struggling with each-other.

Provocative measures are not going to serve the two neighboring countries. China’s playing Pakistan can make India recognize Taiwan. Is this even worth trying? Whereas India-China Informal Summits independently possess all the potential to drive the world the way that suits best to the peoples of two countries. Not enjoying this understanding is a sheer waste of their historic time that is already arrived.

NATO’s Very Existence And Further Expansionism Provokes A World War.

Staying decently distant from all the international conflicts by being neutrally nice to all the nations alike has been India’s historically correct choice and only that is correct for every other country also. So if the United Nations has to continue in business, this must ban all military alliances at once. Instead only UN should exercise an international Peace Keeping Force for anywhere.

NATO was not necessary. This was established under the pretext to prevent Communism from spreading into Europe. Then why this military alliance is continued to be in existence even when there was no such notional threat anywhere? Actually NATO’s establishment played provocateur to bring Warsaw pact into existence and thus the cold war did begin in the world. Still its very existence and further expansionism provokes another world war.

NATO’s very origin did undermine the relevance of then recently established United Nations Organization. UNO was proclaimed to be the ultimate design of preventing another world war, whereas NATO was an instrument of making that kind of a war.

India Is Increasingly Required Staying World’s Neutral Space

India’s increasing prosperity must have a purpose of stabilising the world into an order of peace. Not only Ukraine and Russia but Tibet, Taiwan, Japan, China, Iran, Afghanistan and even Pakistan can also benefit from a neutral India; not aligned with any countries in any conflict at any point of time.

Historically the West didn’t understand this but that too is gradually coming to understand now. India is increasingly required staying world’s neutral space actually a lot more than Switzerland was necessary earlier.

Patching Your Linux Server For Security Vulnerabilities

Once your Linux VPS or Dedicated Server is up and running the websites. You’ll need to keep it protected from security vulnerabilities. To do that, keep patching your server regularly.

Develop a monthly or weekly practice of performing this uncomplicated task and it will save you from a lot of hassle thereafter.

To start, you need to connect to your server via SSH, we have discussed it before, read this tutorial. Once you are connected, switch to root user by running this command:

  • sudo su –

and enter your server password. You now have root access.

Next, run the following command:

  • yum clean all
  • yum update

If you have Ubuntu Linux on your server then replace the above two commands with the following one:

  • apt-get upgrade

That’s it. In the case of Windows Server, you need to connect the server via RDC, follow these steps:

  1. Launch Remote Desktop Connection
  2. Enter your server’s IP address
  3. Enter your user name and password
  4. Select Control Panel from the Start menu
  5. Click Windows Update
  6. Click Check for Updates
  7. Complete the steps to update your server

Managed Hosting, Business Hosting, WordPress, and other assisted service plan customers do not need to patch their own servers. It works either automatically or by the support team.

How AutoSSL Secures All Websites On Your Server At SANGKRIT.net

AutoSSL is a free feature of VPS and Dedicated Servers you subscribe from SANGKRIT.net, it can be used as a free alternative to paid SSL certificates. Configuring AutoSSL, you can automatically secure your websites using a Domain Validated (DV) SSL.

Apart from the users of VPS and Dedicated Servers, the Business Hosting users also get the advantage of AutoSSL. The domain names associated with your VPS or Dedicated Server account automatically get an SSL certificate by AutoSSL unless you have purchased and installed another one. In that case, AutoSSL won’t override the existing certificates but still works for other domains on your server.

After the SSL certificate is installed, the auto-application installer of your server (that allows you to install WordPress and other apps) also lets you choose an HTTPS connection for your website. If you have made or uploaded a website manually then you can manually redirect it to a secure HTTPS connection.

This is done by making a few modifications to your .htaccess file which can be created (if not already present) in the root i.e. public_html directory of the domain you want to secure

If you just created the .htaccess file, use the following code (replacing the example.com with your own domain name) to set up the redirect to the HTTPS version of your website:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

At the time you change the primary domain or add another domain to your server, the AutoSSL immediately attempts the installation of an SSL certificate. But for the SSL to install and work successfully, your domain name must point to the server’s IP address.

If you see that the SSL is not working for any domain name or you want to manually activate or deactivate the SSL on some domain, you can do that manually from the SSL/TLS Status page in the cPanel administration area of your server.

Anti-inflation Money Is A Must To Protect Your Savings

In May 2010 a Florida resident Laszlo Hanyecz posted an open message on Bitcointalk chat forum, “I’ll pay 10000 Bitcoins for a couple of pizzas. I like things like onions, peppers, sausage, mushrooms, tomatoes, pepperoni, just standard stuff, no weird fish topping or anything like that. If you are interested, please let me know and we can workout a deal.”. On May 22nd a 19 years old California student Jeremy Sturdivant did deliver him two large pizzas from Papa John’s in return for 10000 Bitcoins. Bitcoin Pizza Day commemorates that historic event.

10000 Bitcoins were valued for around US$ 41 at that time but same are now 383700000 US$ while that US$ 41 became only 0.000026 BTC. That is how Bitcoin works that hard against inflation.

Governments want to control money just for plundering their people via inflation. Inflation has been a stately way of plundering public money.

Anti-inflation money is a must to safeguard public savings. Bitcoin was designed like that.

Only Those Are Independent Who Own Their Time

Freedom is equivalent to the time to enjoy your leisure the way you like. You may do so by working also but just to please yourself and not to earn your living. That is how only those people are really independent who own all their time.

That means you cannot be called independent till you need to trade any of your time to earn any money you need. Thus you may think yourself whether you are already independent or not yet?

To become really independent, you need an adequate residual income coming regularly into your bank account. That comes for sure when by developing increasingly more independent outlets of Sangkrit.net, you build up a strong division for your independence. Sangkrit facilitates for a complete eco-system to that.