Centos7 installation interface without interface


Centos7 unbounded installation interface
Centos7 unbounded below installation interface

https://blog.csdn.net/qq_39112646/article/details/109444462
1 install a graphical interface. Boot root login
2. Install X (X Window System) as follows:
Yum groupinstall “X Window System”
Complete
3. Then install the GNOME Desktop command as follows
Yum groupinstall “GNOME Desktop”
the software group is bigger, the installation process is slower, also can appear the words complete after the installation is complete.
4. After the installation is complete, enter startx to enter the graphical interface

1.Ctrl+ Alt + F2 toggle to command line mode
2. Enter the following command to view the current boot mode
Systemctl get-default
graphical. Target represents the graphical interface to boot
Multi-User. target means to start the DOS interface at boot time
3. Enter the following commands to set up the startup graphical interface
Systemctl set – the default graphical. Target
in the same way if you want to start the DOS boot interface should enter the following command
Systemctl set-default multi-user. Target
DOS interface with graphical toggle shortcut
aphics to DOS: Ctrl+ Alt + F2
DOS to graphics: type startx
or
Switch to the DOS interface by typing init 3 on the command
Type init 5 to switch to the graphical interface

composer Error: The requested PHP extension ext-bcmath * is missing from your system. Install or enable

The requested PHP extension exit-BCMath * is missing from your system. Install or enable PHP’s BCMath extension. The requested PHP extension exit-BCMath * is missing from your system.
Install the PHP BCMath extension 1. First check your own PHP version 2. After the installation is complete, restart php4. Check to see if the PHP extension is installed successfully

An error

$ composer require --prefer-dist yiisoft/yii2-mongodb                            
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^2.1 for yiisoft/yii2-mongodb
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested PHP extension ext-bcmath * is missing from your system. Install or enable PHP's bcmath extension.
  Problem 2
    - The requested PHP extension ext-mcrypt * is missing from your system. Install or enable PHP's mcrypt extension.


Installation failed, reverting ./composer.json to its original content.

Solution: Install the BCMath extension for PHP
1. Check your own version of PHP first

php -v

2. Install the corresponding version of the extension

yum  -y install php72w-bcmath

Note: 72W represents version 7.2. Please specify the version number when installing
3. After the installation is complete, restart PHP

service php-fpm restart  或  systemctl restart php-fpm

4. Check to see if the PHP extension was installed successfully

php -m

laravel Error mews/captcha is locked to version 3.2.4 and an update of this package was not requested.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - mews/captcha is locked to version 3.2.4 and an update of this package was not requested.
    - mews/captcha 3.2.4 requires php ^7.2 -> your php version (8.0.1) does not satisfy that requirement.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Resolve the version and ignore the version directly
Just follow this after your composer directive

--ignore-platform-reqs

For example, I installed BarryVDH/Laravel -debugbar appeared
Originally is:

composer require barryvdh/laravel-debugbar --dev

Change to install dependencies on success

composer require barryvdh/laravel-debugbar --dev --ignore-platform-reqs

Vue Error compiling template: Component template should contain exactly one root element. If you

Error Compiling Template:
Component template should contain exactly one root element. If you are using V-if on multiple elements, use V-else-if to chain them instead.
Component template should contain exactly one root element.
Component template should contain exactly one root element. If you use V-if in multi-element templates, instead use V-else-if to link them…
Problem code:

solution: so here under the template template should contain only one label element, rather than two or even more. The correct code after modification is as follows:

<template id="cpn">
    <div>
        <p>{{cmovies}}</p>
        <h2>{{cmessage}}</h2>
    </div>
</template>

Git authentication failure solution, due to the problem of password modification

fatal: Authentication failed for ‘http:xxxxxxxxxx.git/’

The solution

1. git config –global user.name “username”

Git config –global user.email “email” git config –global user.email

 

2. Git config –system –unset credential

 

3. Control Panel – User Account – Voucher Manager – Ordinary Voucher, modify and delete the git password in it

Reproduced in: https://www.cnblogs.com/ChineseLiao/p/9400191.html

Git authentication failed

Enter the command to clear the login and password

git config --system --unset credential.helper

And then when you push
it’s going to pop up the login window again
Use the following command to configure login free

 git config  credential.helper store

Git failed to authenticate

Git config –system –unset credential
Git config –global credential. Helper store
Git Config Credential. Helper Store (preferably this)
3, git pull pull code, will prompt for user name and password

Solved – problem cannot find module ‘webpack / bin / config yargs’

1. The question is:

module.js:538
    throw err;
    ^

Error: Cannot find module 'webpack/bin/config-yargs'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\saic\dev\expressVue\node_modules\[email protected]@webpack-dev-server\bin\webpack-dev-server.js:54:1)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)

 
Reason 2.
The above error occurs when webpack does not match the webpack-dev-server version. The specific version is as follows:
“Webpack” : “^ 4.35.0,”
“webpack – cli” : “^ 3.3.5”,
“webpack – dev – server” : “^ 2.11.5”
Webpack-dev-server should be used in pairs with Webpack, with versions 2.2.0 to 3.0.0 for 2.11.5 of Webpack.
Webpack is version 4.35.0 in this project, which is ahead of webpack-dev-server, so you should upgrade webpack-dev-server.
 
3. Solutions
3.1 Uninstall the old package and then upgrade

cnpm uninstall --save-dev webpack-dev-server

cnpm install --save-dev [email protected]

It is also possible to replace CNPM with NPM.
3.2 Modify package.json and then CNPM install or NPM install
The method for root 3.1 is essentially the same
 

Error: solution to the problem of cannot find module ‘webpack / bin / config yargs’

In terminal use of VSCode, using NPM run dev causes an error

Error: Cannot find module 'webpack/bin/config-yargs

It is possible that the webpack-dev-server version number is too low
The solution
Uninstall webpack-dev-server globally first

npm uninstall webpack-dev-server -g

Then install the latest version

npm install webpack-dev-server@latest

NPM run dev error: cannot find module ‘webpack cli / bin / config yargs‘

1- Open your package.json file

"devDependencies": {
    "webpack": "^5.2.0",
    "webpack-cli": "^4.1.0",
    "webpack-dev-server": "^3.11.0"
}

Webpack-cli: “^4.1.0”, which is version 4.*
2- Uninstall the current webpack-cli directive: NPM uninstall webpack-cli
3.* version directive: NPM install webpack-cli@3 -d

Just run NPM run dev!
 

Fatal error: Uncaught Error: Call to undefined function mysql_connect()

If this problem occurs, you can follow the following steps.
1. First of all, you should make sure that you are using the version of PHP. If it’s version 7.x, you should use mysqli_connect(), since mysqli_connect() has been dropped in version 7.x, or you can use PDO instead. The 5.x version of mysql_connect() and mysqli_connect() are both available.
2. If you don’t succeed in the first step, you can do the following:
Mysql> create extension=php_mysqli. DLL with extension=php_mysqli. DLL with extension=php_mysqli. DLL with extension=php_mysqli. DLL with extension=php_mysqli. DLL; ‘removed. Php_mysqli. DLL =php_mysqli. DLL = ‘; ‘and you find that there is no extension=php_mysql. DLL because it has been deprecated.)
(2) Then look for extension_dir = “ext”. ‘Remove it. 5.x is the same as 7.x.
(3) Then restart Apache.

Call to undefined function mysql_ Connect() solution summary

A:
Use the phpinfo() function in your PHP code to see PHP basics
Mysql_connect () has been deprecated since PHP5.0, and is deprecated in PHP7.0. Mysqli_connect () is used instead if PHP is 7.0 or higher
Method 2:
Missing MySQL module caused by PHP installation
Mysql> install mysql from CentOs
yum install php-mysql -y
If installed, report the following warning
Headers and client library minor version mismatch. Headers:
This is due to the higher version of MySQL, the lower version of the MySQL Client API
You can uninstall php-mysql first
yum remove php-mysql -y
then
yum install php-mysqlnd -y
Finally, restart Apache
systemctl restart httpd
Ubuntu install MySQL module:
Apt to get the install php5 – mysql
Sudo DPKG — reconfigure php5 – mysql
sudo /etc/init.d/mysql restart
sudo /etc/init.d/apache2 restart
Three:
If the first two methods fail, try opening the MySQL module extension in the php.ini configuration file
Php.ini = php.ini; Extension =” related MySQL module “; To get rid of
Then make sure that the dir of extension points to the directory where the extension resides
Windows is usually under Ext and CentOS is under /usr/lib64/php.modules
The above information can be found in the PHPINFO printed information
However, when I encountered this problem, I just needed to install the PHP-MySQL module, and I didn’t need to modify php.ini
My environment is Centos7 and PHP version is PHP5.4