Installing common software for Rocky Linux virtual machine

Still install common software series. The current version of Rocky Linux can be regarded as a replica of CentOS 8. CentOS 8 will stop maintenance this year. If users want to be stable, they will return to CentOS 7 and install Rocky Linux if they want to explore. However, as far as I know, CentOS 7 is still the mainstream of Redhat system.

1.VMWare installation of Rocky Linux

All are installed by default. Note that if you want to use the GUI, you need to download the DVD version on the official website. The minimum version does not have a GUI

2. Install VMWare Tools

sudo yum install open-vm-tools

There seems to be a problem after installing VMWare Tools in Rocky Linux/CentOS 8, that is, the copy of text and several K text files

Yes, compressed packages, large files and folders are invalid. If you really want to transfer these things, you can only use U SB flash disk, SSH tool, or network.

3. Modification time

CentOS time is often inaccurate and needs to be modified. It is best to switch to the root user with the following command

Installing chrony

sudo yum install -y chrony

After installing the tool, start it first

sudo systemctl start chronyd

Set the system to start automatically

sudo systemctl enable chronyd

Edit the configuration file

sudo vim /etc/chrony.conf
# Use public servers from the project.
# Please consider joining the pool (
# pool iburst (comment out this line and add the following two lines)
server iburst
server iburst

Reload configuration

sudo systemctl restart chronyd.service
sudo chronyc sources -v

4. Change source using yum

sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=$contentdir|baseurl=|g' -i.bak /etc/yum.repos.d/Rocky-*.repo

Generate cache

 sudo dnf makecache

to update

sudo yum -y update
sudo yum -y upgrade

5. Install jdk

sudo yum -y install java-1.8.0-openjdk.x86_64

6. Install nodejs

sudo curl -fsSL | sudo bash -
sudo yum install -y nodejs

Configure nodejs source

# npm official source
npm config set registry
# npm Taobao source
npm config set registry
# Install yarn and set it as Taobao source
sudo npm install -g yarn
yarn config set registry -g
yarn config set sass_binary_site -g
# Install cnpm and set it as Taobao source
sudo npm install -g cnpm -registry=
# Install vue scaffold 3
sudo cnpm install -g @vue/cli@3

7. Install SVN

sudo yum -y install subversion

8. Install Git

sudo yum -y install git

9. Install MySQL

Disable MySQL's default AppStream repository

sudo dnf remove @mysql
sudo dnf module reset mysql && sudo dnf module disable mysql

CentOS 8 does not have a MySQL repository, so we will use the centos 7 repository. Create a new repository file

sudo vim /etc/yum.repos.d/mysql-community.repo

Insert the following data into the repository above

name=MySQL 5.7 Community Server

name=MySQL Connectors Community

name=MySQL Tools Community

Install MySQL

sudo dnf --enablerepo=mysql57-community install mysql-community-server

Start MySQL

sudo systemctl start mysqld

Set startup

sudo systemctl enable mysqld
sudo systemctl daemon-reload

Obtain the temporary password generated after installing mysql for login

sudo grep 'temporary password' /var/log/mysqld.log

If the following message appears, the password is:   iaJd,l26MNs/

2021-09-25T04:25:40.643274Z 1 [Note] A temporary password is generated for root@localhost: iaJd,l26MNs/

  Log in to MySQL with the above password

sudo mysql -uroot -p

Change the root login password to root

# Reduce password rule level
set global validate_password_policy=LOW;

# Reduce password length
set global validate_password_length=1;

# Change the root password to root
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';

sign out


10. Install PostgreSQL

Download rpm package

sudo dnf -y install

Disable postgresql module

sudo dnf module disable postgresql

If there are options in the process, select all y

Clean up yum cache

sudo dnf clean all

Install PostgreSQL 11 server and client packages

sudo dnf -y install postgresql11-server postgresql11

database initialized

sudo /usr/pgsql-11/bin/postgresql-11-setup initdb
sudo systemctl enable --now postgresql-11

Switch users

sudo su - postgres

Enter pgsql command line


Execute SQL after entering

ALTER USER postgres WITH PASSWORD 'postgres';
# sign out

11. Install redis

sudo yum -y install redis

Modify profile

sudo vim /etc/redis.conf


sudo service redis restart

12. Install VMWare

There is a conflict. The installation can be successful. There are errors when using it. It can't be used for the time being

Tags: Linux

Posted on Sat, 25 Sep 2021 05:33:33 -0400 by BAM1979