Internet Windows Android

Installing mc. Synology installation MC (midnight commander)

Usually, the installation of MS SQL Server is not considered, since it is considered that it is quite simple - I clicked the Next button several times and the database is installed. Nevertheless, there are several nuances that can poison the life of even an experienced administrator, provided that he has not previously installed MS SQL Server for 1C.

Creation of virtual servers

The first step is to create one or two virtual servers. Earlier we have already written about choosing the optimal configuration of a virtual server for 1C. With a heavy load, you will need two virtual servers - one will be used for 1C, and the other for the DBMS. In this article, we will assume that the load is moderate, therefore, both 1C and the DBMS will be installed on the same server. The virtual server configuration is shown in the table.

Moderate load virtual server configuration

Installing MS SQL Server for 1C

Download the latest version of MS SQL Server. We will not consider the installation process in detail - it is really simple. But we will focus only on the necessary settings.

By default, MS SQL Server boots to the system C: drive. By choosing a custom installation type (Fig. 1), you can change the destination disk and directory (Fig. 2).

Rice. 1. MS SQL Server Download Tool

Rice. 2. Selecting the download directory

Next, you need to wait for the installer to download the necessary files (Figure 3), after which you will see the SQL Server Installation Center window (Figure 4). The Installation Center allows you to not only install SQL Server, but also perform various maintenance operations on the database server. In our case, we are still interested in the installation, so go to the Installation section and select the New installation of a stand-alone instance of SQL Server or add features to an existing installation.

Rice. 4. SQL Server Installation Center

Rice. 5. Installation section

The installer will start, the first few steps are self-explanatory. But the choice of components needs to be discussed separately. For 1C to work, absolutely all components are not needed, two are enough - Database Kernel Services and Client funds connection... Previously, you could select a component Controls, in the latest release of SQL Server (2017), the management tools are installed separately - from the section Installation... So, select the two main components, set the installation directories (previously we chose the download directory) and click the button Further.

Rice. 6. Selecting server components

Click the Next button until you go to the Server Configuration section (Figure 7). On the Collation tab, make sure Cyrillic_General_CI_AS encoding is selected. If you selected Russian (Fig. 2), then this encoding will be selected by default, but if you prefer English on the server, then the encoding will have to be changed.

In chapter Configuring the Database Engine in the tab Server configuration set up mixed mode authentication (Figure 8), and set a password for the database server sysadmin (sa) account. You also need to assign server administrators. If you are running under CloudAdmin or another user with administrative rights, just click the button Add current user.

The next tab is Data directories- very important. User databases and tempdb should be stored on the highest performing disk. Ideally add an SSD drive for database storage. Although the location of the database can be specified when creating it, specifying the correct default settings saves you unnecessary work, as well as the situation when the database is created using 1C tools and is in the default directory, i.e. on the system drive. You can also specify the directory for storing backups right away.

Rice. 9. Data directories (default paths)

The rest of the parameters can be left as default. Click the button Further and then the button Install and wait while SQL Server installs.

Return to the Installation Center window, complete the installation of SQL Server Management Tools (Figure 10). A browser will open with a page where you can download the controls. Download the installer file and install. It is not necessary to install the management tools on the server, they can be installed on the administrator's computer, but since we have a virtual server, we will not complicate its configuration and will install the SQL Server management tools on the same computer.

Configuring MS SQL Server to work with 1C: Enterprise

We have just completed the installation of SQL Server and management tools. It remains to configure the server to work with 1C. Using management tools, connect to SQL Server. Right-click a server in the list on the left and select the command Properties(fig. 11). Make sure the encoding is Cyrillic_General_CI_AS. Otherwise, the server will have to be reinstalled.

Rice. 11. Server properties

If everything is ok with the encoding, go to the section Memory... Specify the amount of RAM available to the SQL server, otherwise the SQL server will try to utilize all available memory. If 1C is installed on the same server, then this behavior of SQL Server cannot be called optimal - for 1C, you also need to leave available resources.

Close the properties window. Go to section Security, Login Names... Right click on the section Login names and select the command Create new login... Create a new user account on whose behalf 1C will connect - using the administrator (sa) account, giving 1C maximum rights, to put it mildly, is wrong.

Enter your username, authenticate with SQL Server (Figure 13). Next, go to the section Server Roles and select dbcreator, processadmin and public (Figure 14).

Rice. 13. Creating a new user account for 1C

That's all. We installed SQL Server and management tools, completed the basic server setup and created an account for 1C operation. In most cases, the default SQL server parameters are more than suitable for ensuring the productive operation of the 1C: Enterprise server.

Original: Midnight Commander - A Console Based File Manager for Linux
Author: Pungki Arianto
Publication date: October 23, 2013
Translation: A. Krivoshey
Date of transfer: May 2013

If you have to work with a large number of files in a console environment, then you may find the job quite tedious. The graphical environment has file managers that help increase the speed of working with files. You don't need to remember the name and syntax of every command associated with files.

In a console environment, you need to know the basic commands and their syntax to work with files. Fortunately, Linux also has a text-based file manager that runs in a console environment. It is called Midnight Commander (hereinafter we will simply call it MC).

Section headings

The Midnight Commander website says:
"GNU Midnight Commander is a visual file manager licensed under the GPL and therefore qualifies as Free Software. It is a powerful text-based, full-featured program that allows you to copy, move and delete files and directories, search for files, and run shell commands. . Also included is a built-in editor and file viewer. "

How to install Midnight Commander on Linux

MC is usually not installed by default. On Debian, Ubuntu and Linux Mint, you can install it using the apt-get command:

$ sudo apt-get install mc

On RHEL, CentOS and Fedora, you can use the command:

# yum install mc

After the installation is complete, simply enter "mc" (without quotes) in the console to run it.

Midnight Commander Features

MC has many useful functions for both users and administrators.

Copy, delete, rename / move, create directories

The MC interface is divided into two independent columns. Each column represents the active directory. You can switch between them using the Tab key. At the bottom of the screen, you can see the numbered buttons that refer to the function keys F1 - F10.
To copy a file from one directory to another, simply select it and press "F5". To copy several files at once, you must first select them using the "Insert" key.

MC will ask you for confirmation. Just click "OK" to start copying.
Deleting files is even easier. Just select the files and press "F8". Moving files is done with the "F6" keys.
Renaming files is slightly different, however. Pressing the "F6" key, you need to enter a new file name. An example of how this is done is shown below in the screenshot.

You can press "F7" to create a directory. MC will create a new directory in the current one. To see what else MC can do with files, press F9> File.

Built-in utility for viewing files

There are many text editors available in console mode, such as vi, joe, and nano. MC has its own built-in program for viewing the contents of text files. To run it, select the file and press "F3". You can also edit the file if necessary by highlighting it and pressing "F4".
When you start your text editor for the first time, MC will ask you to select your default text editor:

[email protected]~ $ Select an editor. To change later, run "select-editor". 1. / bin / ed 2. / bin / nano

Then, when you press the "F4" key, MC will use the text editor of your choice. If you want to change the default editor, just press "F2", select "@" and enter "select-editor" (without the quotes).

What if you want to use a different text editor not detected by MC? Let's say you want to work with Vi. This can be done differently. Find the ".selected_editor" file in your home directory. It is a hidden file, so it starts with a dot. Edit it like this:

# Generated by / usr / bin / select-editor SELECTED_EDITOR = "/ usr / bin / vi"

File permissions

Files and directories have permissions that indicate who can read, write, and execute files and directories. The command to manage access rights is chmod. To find out how to use it, type "man chmod" in a terminal.
In MC you only need to select the file, then press "F9"> File> Chmod or "Ctrl-x" and "c". The MC will show you the current access rights of the selected file and the parameters that can be changed.

File owner

Files and directories have their own owner as well as an owner group. Owner privileges are controlled with the chmod command above. Owners are managed using the chown command.
As usual, type "man chmod" in a terminal to find out how to use it. In MC, you just need to select the file, then press "F9"> File> Chown, or "Ctrl-x" and "o". Now you can set the owner and owner group from the list of available users and groups.

The MC also has an "Advanced Chown" feature, which is a combination of chmod and chown that allows you to perform the two tasks described above in one place. Press "F9"> File> Advanced Chown.

By default, MC has a dual-pane interface. These panels are not just for local directories. You can connect them to a remote computer via FTP.
In this case, MC acts as an FTP client. To connect, you need to press "F9"> FTP Link. MC will request connection data in the following format:

User: [email protected] _or_ip_address

If the entered data is correct, in one of the panels you will see a list of directories on the remote computer.

To disconnect the FTP connection, you can press "F9"> Command> Active VPS Link. In the list of Active VFS directories, you will see your FTP connection. Select it and click "Free VFSs". If you just want to switch to the local directory without breaking the FTP connection, select "Change to".

If your network uses a proxy server, you can configure MC to work with a proxy. Press "F9"> Options> Virtual FS> Always use ftp proxy.

Quitting Midnight Commander

To exit Midnight Command, press F9> File> Exit or F10.

For a more detailed introduction to MC capabilities, check out the Midnight Commander FAQ.

After that, you can connect on port 22 via putty to the server. You must specify root as the username, and the password for your administrator account. We go in and see the usual black console:

Although I know all the popular UNIX commands, I still prefer to use the Midnight Commander or just mc. In synology, by default, it is not there and it will not work just like that. I first decided to download the sources, compile and install, as is usually done. But before that I decided to google the question, maybe there is an easier way.

And he really is. To quickly and easily install MC on Synology, simply connect an alternative repository through the control panel and install Midnight Commander with a few mouse clicks. To do this, go to Package Center, press Settings, open the tab Sources of packages and add a new one:

Name - SynoСommunity

Location - http://packages.synocommunity.com

We press OK... Everything. Now you can select the section in the list of packages Community and there select Midnight Commander, or whatever you need:

Now go to the Synology console, write 2 simple characters there mc and we work in our favorite and familiar midnight commander.

By the way, everything is very curiously arranged inside. It looks like a heavily modified RHEL or CentOS. Httpd is used as a web server, but nginx and php-fpm are both installed and running on the system. The system is installed on raid1, built on mdadm, which includes a partition from each disk in the system. Custom volumes on lvm. Maybe somehow there will be time and desire, I will dig, I will tell you in more detail about the insides.

Online course Linux Security

If you have a desire to understand in more detail the processes of setting up and ensuring the security of the local and network infrastructure built on the basis of the Linux OS, I recommend that you familiarize yourself with online course "Linux Security" in OTUS. The training lasts 3 months, after which the successful graduates of the course will be able to pass interviews with partners. The course program is developed in the form of a series of practical workshops and is aimed at trained students who already have knowledge and experience in Linux administration. What you will learn:
  • Apply the best world practices and standards of information security (Debian, RedHat, MitRE);
  • Use tools to detect and exploit vulnerabilities in Linux;
  • Install and configure network attack detection and prevention systems;
  • Work with Docker-based monitoring and containerization systems;
Check yourself on the entrance test and see the detailed program on.

To save yourself the agony of using the command line, and also not to lose your mind about the VI text editor, you need to install a file manager. Which will allow not only to freely "travel" on the disk of your server, but also to create and edit folders (directories, directories) and files.

How to install Midnight Commander on CentOS

For CentOS, there is a painfully similar file manager of Peter Norton Norton Commander known since DOS times, both in appearance and colors, as well as in functionality of the file manager Midnight Commander.
Installing it comes down to one command:

Yum install mc

To start the file manager Midnight Commander use:

After that, communication with CentOS takes the familiar look of the DOS days.

YUM package manager

This is not the first time in this article I have referred to the YUM command to install software. It's time to get to know her better.

What is yum

YUM (Yellow dog Updater, Modified) is a package manager that can query information about packages, retrieve packages from repositories, install and uninstall them using automatic dependency resolution, and update the entire system to the latest package versions.

Basic yum commands

Check for updates:

Yum check-update

Updating the entire system:

Yum update

Updating only a specific package:

Yum update<имя пакета>

Install package:

Yum install<имя пакета>

Remove package:

Yum remove<имя пакета>

Show all packages available in the repository:

Yum list

Check if the package is available in the repository (you can use wildcards? And * in the package name):

Yum list<имя пакета>

Find a package whose name or description contains the specified value:

Yum search<строка поиска>

Clear system cache:

Yum clean all

How to roll back an update:

Yum downgrade<имя пакета>

How YUM UPDATE and YUM UPGRADE differ

I kept silent about one more command - YUM UPGRADE. The action is similar to YUM UPDATE. The difference is that when updating packages, the UPDATE retains outdated versions of packages, that is, when a new version of a package is installed, the old one also remains in the system.
UPGRADE does not keep previous versions. That is, there is a complete replacement.