The software environment required for Centos7 installation

Mysql Installation##

Download and install###

  1. Download and install the official Yum Repository of MySQL
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
  1. Yum installation source
yum -y install mysql57-community-release-el7-10.noarch.rpm
  1. Install Mysql
yum -y install mysql-community-server
  1. Set boot Mysql
systemctl enable mysqld.service

5 Start Mysql

service mysqld start

Mysql settings###

  1. You need to check the default password before accessing Mysql
grep "password"/var/log/mysqld.log
  1. Login to Mysql
mysql -u root -p

Then enter the password you just found. The password is hidden and displayed.

  1. Modify password policy
> show VARIABLES like "%password%"+---------------------------------------+---------+| Variable_name                         | Value   ||---------------------------------------+---------|| default_password_lifetime             |0|| disconnect_on_expired_password        | ON      || log_builtin_as_identified_by_password | OFF     || mysql_native_password_proxy_users     | OFF     || old_passwords                         |0|| report_password                       ||| sha256_password_proxy_users           | OFF     || validate_password_dictionary_file     ||| validate_password_length              |8|| validate_password_mixed_case_count    |1|| validate_password_number_count        |1|| validate_password_policy              | MEDIUM  || validate_password_special_char_count  |1|+---------------------------------------+---------+

Introduce several main parameter descriptions:

Parameters Description
The validate_password_number_count parameter is the minimum number of digits in the password, which will take effect when the password policy is MEDIUM or above.
validate_password_special_char_count The parameter is the number of special characters such as non-English numbers in the password, and it takes effect when the password policy is MEDIUM or above.
The validate_password_mixed_case_count parameter is the number of uppercase and lowercase characters in the English and Chinese characters in the password. It takes effect when the password policy is MEDIUM or above.
The validate_password_length parameter is the length of the password. This parameter is generated by the following formula.
# Change password length
set global validate_password_length=0;

# Change the number of digits
set global validate_password_number_count=0;

# Change the number of uppercase and lowercase letters
set global validate_password_mixed_case_count=0;

# Change the number of special characters
set global validate_password_special_char_count=0;
  1. change Password
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Your New Pssword';
  1. Enable remote access
grant all privileges on *.* to 'root'@'You IP or ALL %' identified by 'Your Password'with grant option;
# Refresh permissions
flush privileges;
  1. Configure default characters

In my.cnf (/etc/my.cnf) or in the my.ini file

Insert the following statement in the my.cnf configuration

[ client]default-character-set=utf8

Be sure to insert these two sentences before [mysqld], otherwise the following error will appear

mysql:[ERROR] unknown variable 'datadir=/var/lib/mysql'

The main reason is that the configuration information of [client] is placed in the middle of the configuration information of [mysqld], which causes other configurations of [mysqld] to be placed under [client].

Insert the following two lines after socket

character-set-server=utf8
collation-server=utf8_general_ci
  1. Transaction isolation (optional: confluence installation needs to be set)

Mysql four transaction isolation

In my.cnf or my.ini file

transaction_isolation = READ-COMMITTED

After doing the above, you can restart the Mysql service.

service mysqld restart

Use rpm to install JDK

download###

First download the red file marked with the following icon through Official Website

transmission###

Upload the downloaded file to the server through FileZilla software

installation###

Use the rpm command to install

rpm -ivh jdk-8u152-linux-x64.rpm

Nginx download and install##

Add yum source###

rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

After installing the yum source, you can use the following command to view

yum repolist

installation###

yum install nginx

Configuration service###

Set boot up

systemctl enable nginx

Start service

service nginx start

Install NodeJS

Install nodejs via yum

Update nodejs various versions of yum source####

$ curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
$ curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -

Other versions are shown above

Direct installation

yum install nodejs -y

Install via compressed package###

First, you need to go to the official website to download the corresponding installation package

Select All Mirrors> Alibaba Cloud Mirror

Find node-v12.10.0-linux-x64.tar.gz that looks like this file name, the specific version number will change

wget https://npm.taobao.org/mirrors/node/v12.10.0/node-v12.10.0-linux-x64.tar.gz

After downloading, unzip to the specified directory

tar xf node-v12.10.0-linux-x64.tar.gz -C /usr/local/

Rename folder

cd /usr/local/
mv node-v12.10.0-linux-x64/ nodejs

Set global commands

ln -s /usr/local/nodejs/bin/node /usr/local/bin

ln -s /usr/local/nodejs/bin/npm /usr/local/bin

Then you can use it happily

Jenkins installation##

Official installation###

Official link RPM installation

Before the formal installation, you need to install the java environment

Installation source

sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo

Import key

sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key

Install jenkins

yum install jenkins

Modify port

vim /etc/sysconfig/jenkins

Find JENKINS_PORT="8080" and modify it to JENKINS_PORT="The port you need"

If you need to run a shell with root privileges in an automated build, you also need to modify the above file

JENKINS_USER="root"

Restart service

systemctl restart jenkins.service

After starting the access, you are prompted to obtain the password from /var/lib/jenkins/secrets/initialAdminPassword

Perform other operations after login

When using http access, there will be some failures when the plug-in is installed, so you need to enter the following link first

HOST/pluginManager/advanced

Modify the bottom upgrade site

http://updates.jenkins.io/update-center.json
Tsinghua source: https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/current/update-center.json

Then install the plugin and add an administrator to use

Docker image installation###

Look directly at Official Website Installation, you need basic Docker operation knowledge.

Git install new version##

Download editing tools###

yum -y groupinstall "Development Tools"

Download dependency package###

yum -y install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel

Delete the built-in git

When installing dependencies, yum automatically installs Git, and you need to uninstall the old version of Git. The command is:

yum remove git

Download the source code of the latest version of git###

Go to the GitHub website to download the release version

Github Release version

Of course, it may be slow to download the release version of github in China, so you can recommend to download it from the official website

Official website download

git official website Click Downloads to enter the download page

Click Linux/Unix to download the Linux version of git

Pull to the bottom, click download a tarball to transfer to the git compression package and press on the page, select the version you need to download

Unzip the git archive###

tar -zxvf git-2.30.0.tar.gz

Enter the git directory and configure the installation path

cd git-2.13.3./configure --prefix=/usr/local/git

installation###

make && make install

Configure the global path###

export PATH="/usr/local/git/bin:$PATH"
source /etc/profile

View git version###

git --version

Configure soft connection###

In some systems or software, the git default address may be used, so the above configuration may not be able to access the git command, so you need to add a soft connection to where you need it

ln -s /usr/local/git/bin/git /usr/bin/git

The front is where you want to install yourself, and the back is where you need to connect softly.

As for whether to add -s, you can see here Linux Ln command

Recommended Posts

The software environment required for Centos7 installation
lamp (centos7) installation lamp environment
CentOS environment installation of Docker
Centos7.4 environment installation lamp-php7.0 tutorial
The latest Centos7 installation Mysql8 guide
2019-07-09 CentOS7 installation
centos7_1708 installation
Centos7.5 configuration java environment installation tomcat explanation
Centos-6.5 installation and deployment of LNMP environment
(1) Centos7 installation to build a cluster environment
Centos5 installation guide
Python - centos6 installation
Docker installation (CentOS7 installation)
CentOS7 docker installation
Python generates the dependent files required for the project
The tutorial for upgrading from Centos7 to Centos8 (detailed graphic)
Build a basic environment for Java development under Centos7
CentOS online installation RabbitMQ3.7
CentOS6.7 build LNMP environment
Zabbix 2.2.20 installation details (Centos6.9)
Hadoop environment construction (centos7)
Centos7.6 build LNMP environment
Centos source installation Python3
Centos7 mqtt cluster installation
Centos6.9 install npm environment
Graphical installation of CentOS8
Mysql8.0.15 installation configuration (centos7)
Linux notes (1): CentOS-7 installation
Redis3 installation under Centos7
Centos7 configure nodejs environment
CentOS online installation RabbitMQ3.7
Docker CentOS installation method
Configure CentOS7 GPU environment
Linux CentOS 7 installation tutorial
CentOS 7 build LNMP environment
Centos7 docker installation details
The problem of MySQL import file failure in CentOS environment
CentOS builds the K8S environment tutorial, a one-time success, collection!