1. jdk1.8
Steps:
- Check whether java has been installed on the current Linux system
Enter rpm -qa | grep java
- Uninstall two openjdks
Enter rpm -e --nodeps software to uninstall
- Upload jdk to linux
- Unzip JDK to tar – xvf jdk-7u71-linux-i586.0 under / usr / local tar. gz –C /usr/local
- Configure the jdk environment variable, open the / etc/profile configuration file, and copy the following configuration
#set java environment JAVA_HOME=/usr/local/jdk PATH=$JAVA_HOME/bin:$PATH:. export JAVA_HOME PATH
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/ld-linux.so.2: bad ELF interpreter: No such file or directory
Solution: yum install glibc.com i686
2. mysql
Steps:
- View mysql provided with CentOS
Enter rpm -qa | grep mysql
- Uninstall the built-in mysql
- Upload Mysql to linux
- 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
- Install mysql under / usr/local/mysql
Install server side: RPM - IVH mysql-server-5.6 22-1. el6. i686. rpm
Error:
[root@iZ8vb94banofk9fsttz2awZ mysql]# rpm -ivh MySQL-server-5.6.22-1.el6.i686.rpm error: Failed dependencies: libaio.so.1 is needed by MySQL-server-5.6.22-1.el6.i686 libaio.so.1(LIBAIO_0.1) is needed by MySQL-server-5.6.22-1.el6.i686 libaio.so.1(LIBAIO_0.4) is needed by MySQL-server-5.6.22-1.el6.i686 libgcc_s.so.1 is needed by MySQL-server-5.6.22-1.el6.i686 libgcc_s.so.1(GCC_3.0) is needed by MySQL-server-5.6.22-1.el6.i686 libgcc_s.so.1(GLIBC_2.0) is needed by MySQL-server-5.6.22-1.el6.i686 libstdc++.so.6 is needed by MySQL-server-5.6.22-1.el6.i686 libstdc++.so.6(CXXABI_1.3) is needed by MySQL-server-5.6.22-1.el6.i686 libstdc++.so.6(GLIBCXX_3.4) is needed by MySQL-server-5.6.22-1.el6.i686 libstdc++.so.6(GLIBCXX_3.4.11) is needed by MySQL-server-5.6.22-1.el6.i686 libstdc++.so.6(GLIBCXX_3.4.9) is needed by MySQL-server-5.6.22-1.el6.i686
Solution:
yum install libaio.so.1 yum install libgcc_s.so.1 yum install libstdc++ yum install libstdc++.so.6
Install client: RPM - IVH mysql-client-5.6 22-1. el6. i686. rpm
- mysql start
Error:
error: Failed dependencies: libncurses.so.5 is needed by MySQL-client-5.6.22-1.el6.i686 libtinfo.so.5 is needed by MySQL-client-5.6.22-1.el6.i686
resolvent:
yum install libncurses.so.5
Then
service mysql start
- 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_
- Modify the password of mysql
set password = password('root');
- 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;
- 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:
https://blog.csdn.net/weixin_39785970/article/details/113607898
Install iptables
1. Stop firewall "firewalld"
Before installing iptables, you need to stop firewalld first, otherwise it will fight and cause installation failure.
- systemctl stop firewalld
- systemctl mask firewalld
2. Install iptables
- yum install iptables-services
3. Add iptables to boot
- systemctl enable iptables
3.1. Manage iptables commands
It is managed through systemctl or service.
- systemctl [stop start restart] iptables
- 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
- systemctl stop iptables
Remove iptables from Startup
- systemctl disable
Unshielded firewalld
- systemctl unmask firewalld
Start firewalld
- 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
Steps:
- Upload Tomcat to linux
- Unzip Tomcat to / usr/local
- 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
- Start and close Tomcat
Enter the tomcat bin and start:/ startup.sh
Enter the tomcat bin and close:/ shutdown.sh
Open permission
Today, start Tomcat on Linux, and the result pops up: - bash:/ startup. SH: prompt for permission denied.
|
4. Redis
1. Install gcc environment
yum install gcc-c++
2. Enter the / usr/local/redis directory to compile and install
make
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
https://blog.csdn.net/zzq060143/article/details/114362811
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 127.0.0.1 in redis.conf configuration file to 0.0.0.0
(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:
/usr/local/redis/bin/redis-server
8. Switch to / usr/local/redis/bin / directory and execute the redis server command