MySQLTuner – This is a Perl script that will give recommendations for improving the performance and stability of the MySQL server.
Continue reading “Installing and using mysqltuner.pl”Author Archives: Vyacheslav
View and configure sharing of files and folders Windows from the command line
I will give an example of some commands for setting up sharing of resources.
View shared resources:
net share
Deleting a shared resource:
net share <sharename> /delete
Sharing a folder:
net share sharename=C:\dir
Example of disconnecting users from the share:
net session \\pc1 /delete
To close an open network file, use the command:
net file file_id /close
An example of granting user rights to a file (N – not set, W – write, C – change, F – full access):
cacls file.txt /G User:w
To cancel user access to a share:
cacls /R User
We allow up to 5 users to simultaneously connect to a shared resource:
net share sharename /users:5
Example of caching settings from a share (manual/BranchCache/documents/programs/none):
net share myshare /cache:manual
I want to note that when opening a share to a resource in the firewall, the following ports should be opened: TCP 139, TCP 445, UDP 137, UDP 138.
See also my articles:
Installing and using the nbtscan network scanner
Some information about the virus encryptor Trojan.Encoder.12544 attacked 06/27/2017
Hidden files and directories in Ubuntu
Method 1
Put a dot at the beginning of the file or directory name.
Method 2
Create a .hidden file, place in a directory in which you need to hide something and write in it a column of the names of files or folders that should be hidden. The case of letters has a meaning, that is, if the name of an element is from a capital letter, then write it in the .hidden file in the same way.
To see the hidden items through the Nautilus file manager, you must press the key combination Ctrl+H or in the “View” menu click “Show hidden files”.
D-Link DSR-150 router firmware upgrade
To flash the D-Link DSR-150 router, take the following necessary steps in steps:
1) Let’s look at the revision on the label under the router and download the new firmware from it from the official site http://www.dlink.ru/ru/products/9/1697_d.html
Firmware router not under the revision can lead to its failure.
2) Open the settings of the router by typing in the browser the address http://192.168.1.1 (maybe 192.168.0.1) and enter the standard login – admin, the password – admin.
3) In the opened interface at the top, open the “Tools” tab, on the left, select “Firmware“. On the page that opens, the current firmware version will be displayed, if it is older than the downloaded one, then click “Browse” and select the previously downloaded firmware file, then click “Upgrade” to start the process updates.
Wait until the update is complete, usually 2-5 minutes. At the end, the router will reboot.
Is done.
How to connect a wireless mouse to your macbook
Briefly describe the points on how to connect a wireless mouse to your MacBook:
1) First you need to turn on Bluetooth. The Bluetooth icon is usually located at the top of the screen, to the left of the volume and Wi-Fi icon, or in the System settings.
2) Set up a new device, for this you need to click in the “Install a new device” window.
3) Turn on the wireless mouse (the switch is usually under the mouse), after switching on the indicator should light up.
4) Select the device in the list and click “Continue” to complete the connection. After pairing in the system settings, you can configure some parameters of the mouse.
Asus DSL-N14U modem firmware update
For example, I will flash the Asus DSL-N14U modem with firmware 1.0.7.6 for version 1.0.9.9.
I will describe the steps taken in steps:
Continue reading “Asus DSL-N14U modem firmware update”Installing UNMS (Ubiquiti Network Management System)
UNMS (Ubiquiti Network Management System) – EdgeMAX®, EdgeSwitch®, airMAX®, UFiber device management system, which includes software updates, configuration backup, real-time performance graphs, notifications, device location maps, etc.
For example, I will install UNMS on Ubuntu Server 18.04 64bit.
First, install the necessary components:
sudo apt-get update sudo apt-get install curl sudo bash netcat
Download the installation script from the official site to the temporary directory:
curl -fsSL https://unms.com/install > /tmp/unms_inst.sh
Run the downloaded script:
sudo bash /tmp/unms_inst.sh
If it is necessary to change the web ports during the installation:
sudo bash /tmp/unms_inst.sh --http-port 8080 --https-port 8443
By default, UNMS uses Let’s Encrypt when creating SSL certificates for your domain and saves them in /home/unms/data/cert/live.
If you want to use your SSL certificates, then during installation, for example, we specify (UNMS should have read rights in ssl-cert-dir):
sudo bash /tmp/unms_inst.sh --http-port 8080 --https-port 8443 --ssl-cert-dir /etc/certificates --ssl-cert fullchain.pem --ssl-cert-key privkey.pem
How to hide the Jetpack menu for users
To hide the Jetpack menu for subscribers and regular users, it’s enough to add the following code to the active theme functions.php file:
function ap_remove_jetpack_page( ) { if ( class_exists( 'Jetpack' ) && !current_user_can( 'manage_options' ) ) { remove_menu_page( 'jetpack' ); } } add_action( 'admin_menu', 'ap_remove_jetpack_page', 999 );
Also for this there are several plugins, but those that came across to me are quite old.
Ufw setup in Ubuntu
ufw stands for Uncomplicated Firewall.
If ufw is not installed in the system, then install it with the command:
sudo aptitude install ufw
The command activates ufw in the system, it will also be included every time the system starts:
sudo ufw enable
If ufw does not start after restarting the system, then edit ENABLED=no to ENABLED=yes in the file:
sudo nano /etc/ufw/ufw.conf
To disable is used:
sudo ufw disable
Deny all incoming connections:
sudo ufw default deny
To allow access for a subnet or address:
sudo ufw allow from 10.0.0.0/24
To re-enable all incoming connections:
sudo ufw default allow
Permit SSH connection from outside:
sudo ufw allow ssh
An example of allowing access to a specific port:
sudo ufw allow 80/tcp
View status:
sudo ufw status sudo ufw status verbose
Disable logging:
sudo ufw logging off
View profiles for applications:
sudo ufw app list
The configuration files are in /etc/default/ufw and /etc/ufw/applications.d
View official documentation:
man ufw
See also my article – Configure IPTables
Resolving Error 0x80246017 in Windows 10
You can solve the error 0x80246017 by quickly completing a few points:
1) Open the command prompt as administrator.
2) Execute the following commands in it:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability" /v "BranchName" /d "FBL_AWESOME1501" /t REG_SZ /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability" /v "ThresholdRiskLevel" /d "low" /t REG_SZ /f reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability" /v "ThresholdInternal" /f reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability" /v "ThresholdOptedIn" /f
Done, the error should not be.