Linux Installation Software record

1. jdk1.8


  1. Check whether java has been installed on the current Linux system

Enter rpm -qa | grep java

  1. Uninstall two openjdks

Enter rpm -e --nodeps software to uninstall

  1. Upload jdk to linux
  2. Unzip JDK to tar – xvf jdk-7u71-linux-i586.0 under / usr / local tar. gz –C /usr/local
  3. Configure the jdk environment variable, open the / etc/profile configuration file, and copy the following configuration
#set java environment




Reload the / etc/profile configuration file source /etc/profile

java -version error

[root@iZ8vb94banofk9fsttz2awZ etc]# java -version
-bash: /usr/local/jdk1.8/bin/java: /lib/ bad ELF interpreter: No such file or directory

Solution: yum install i686

2. mysql


  1. View mysql provided with CentOS

Enter rpm -qa | grep mysql

  1. Uninstall the built-in mysql

  1. Upload Mysql to linux
  2. Unzip mysql into the mysql directory under / usr/local / (the mysql directory needs to be created manually)
cd /usr/local
mkdir mysql
tar -xvf MySQL-5.6.22-1.el6.i686.rpm-bundle.tar -C /usr/local/mysql
  1. Install mysql under / usr/local/mysql

Install server side: RPM - IVH mysql-server-5.6 22-1. el6. i686. rpm


[root@iZ8vb94banofk9fsttz2awZ mysql]# rpm -ivh MySQL-server-5.6.22-1.el6.i686.rpm
error: Failed dependencies: is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686 is needed by MySQL-server-5.6.22-1.el6.i686


yum install
yum install
yum install libstdc++
yum install

Install client: RPM - IVH mysql-client-5.6 22-1. el6. i686. rpm

  1. mysql start


error: Failed dependencies: is needed by MySQL-client-5.6.22-1.el6.i686 is needed by MySQL-client-5.6.22-1.el6.i686


yum install


service mysql start
  1. Login to mysql

After MySQL is installed, a temporary random password will be generated and stored in / root / mysql_ secre

cat /root/.mysql_secret
[root@iZ8vb94banofk9fsttz2awZ mysql]# cat /root/.mysql_secret 
# The random password set for the root user at Wed Jul 28 15:48:20 2021 (local time): jmSQPJZ59pkrZM1_

msyql –u root -pjmSQPJZ59pkrZM1_
  1. Modify the password of mysql
set password = password('root');
  1. Enable mysql remote login

By default, mysql does not support remote login to mysql for security reasons, so you need to set the permission to enable remote login to mysql

After logging in to mysql, enter the following command:

grant all privileges on *.* to 'root' @'%' identified by 'root';
flush privileges;
  1. Port 3306 for opening external access of Linux
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
/etc/rc.d/init.d/iptables save ---Permanently save changes to firewall

mysql uninstall

//rpm package installation mode uninstall
 Package name: rpm -qa|grep -i mysql
 Delete command: rpm -e –nodeps Package name
//Download as yum or up2date
1.View installed mysql
 Command: rpm -qa | grep -i mysql
2.uninstall mysql
 Command: yum remove mysql-community-server-5.6.36-2.el7.x86_64
 see mysql Other dependencies: rpm -qa | grep -i mysql
//Unload dependency
yum remove mysql-libs
yum remove mysql-server
yum remove perl-DBD-MySQL
yum remove mysql

mysql error resolution: 

Install iptables

1. Stop firewall "firewalld"

Before installing iptables, you need to stop firewalld first, otherwise it will fight and cause installation failure.

  1. systemctl stop firewalld
  2. systemctl mask firewalld

2. Install iptables

  1. yum install iptables-services

3. Add iptables to boot

  1. systemctl enable iptables

3.1. Manage iptables commands

It is managed through systemctl or service.

  1. systemctl [stop start restart] iptables
  2. service iptables start|stop|restart

4. Change back to firewalld

If you don't want to use iptables, you want to change back to firewalld. You can use the following command.

Stop iptables

  1. systemctl stop iptables

Remove iptables from Startup

  1. systemctl disable

Unshielded firewalld

  1. systemctl unmask firewalld

Start firewalld

  1. systemctl start firewalld


Use firewalld to view the status

systemctl status firewalld

Open port
firewall-cmd --permanent --zone=public --add-port=23000/tcp
firewall-cmd --reload
firewall-cmd --list-ports

firewall-cmd --zone= public --remove-port=80/tcp --permanent

3. Tomcat


  1. Upload Tomcat to linux
  2. Unzip Tomcat to / usr/local
  3. Open port 8080 for external access of Linux

/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

/etc/rc.d/init.d/iptables save

  1. Start and close Tomcat

Enter the tomcat bin and start:/

Enter the tomcat bin and close:/

Open permission

Today, start Tomcat on Linux, and the result pops up: - bash:/ startup. SH: prompt for permission denied.

This is because the user does not have permission and cannot execute. Modify the in the bin directory with the command chmod sh permission is OK.

chmod u+x *.sh

u here refers to the file owner, + x adds executable permissions, * SH represents all sh files.

4. Redis

1. Install gcc environment

yum install gcc-c++

2. Enter the / usr/local/redis directory to compile and install


3. Enter the / usr/local/redis/src directory

make install

Error during making in redis installation and solutions: make [1]: * * * [server. O] error 1 make:*** [all] Error2

The solution is to upgrade gcc to the latest version

[root@localhost redis-6.0.1]# gcc -v                             # View gcc version
[root@localhost redis-6.0.1]# yum -y install centos-release-scl  # Upgrade to version 9.1
[root@localhost redis-6.0.1]# yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
[root@localhost redis-6.0.1]# scl enable devtoolset-9 bash
 The above is temporarily enabled. If you want to use it for a long time gcc 9.1 If so:
[root@localhost redis-6.0.1]# echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile

Perform compilation again:

PREFIX installation directory

[root@localhost redis-6.0.1]# make install PREFIX=/usr/local/redis

4. Edit redis Conf configuration file to set the background to start the redis service

vi redis.conf

Change the daemon attribute in the file to yes (indicating that it needs to run in the background)

5. Edit redis Conf configuration file, enable redis remote access service

(1) modify bind in redis.conf configuration file to

(2) Set the protected mode in the redis.conf configuration file to no (yes by default, preventing remote access, after redis 3.2.3)

6. Edit Redis Conf configuration file, modify Redis default password (default password is empty)

(1) find this line # requirepass foobared in the configuration file

(2) delete the preceding comment symbol #, and change foobared to your own password, or # start another line to require your own password
7. Set Redis startup

# vi /etc/rc.d/rc.local

Add the following code to / etc / RC d/rc. In local:


8. Switch to / usr/local/redis/bin / directory and execute the redis server command

Keywords: Linux

Added by flhtc on Mon, 20 Dec 2021 11:09:53 +0200