Install JDK, tomcat, MySQL, Redis under Linux system

Source: Internet
Author: User
Tags iptables mysql view

One, install the JDK

1.rpm-qa | grep JDK detects if JDK is installed

2.rpm-e--nodeps The name of the existing JDK to uninstall

3.TAR-ZXVF jdk-7u71-linux-i586.tar.gz Decompression JDK

4.MV jdk-7u71-linux-i58//usr/local/src/java/jdk1.7 moved to/usr/local/src/java directory and renamed jdk1.7

5.vim/etc/profile Configuring environment variables

Installation position of 1.export Java_home=java
2.export path= $JAVA _home/bin: $PATH

6.source/etc/profile is the configuration file takes effect

7.java-version Test is successful

Two, install Tomcat

1.TAR-XVF apache-tomcat-7.0.57.tar.gz Extract Tomcat

2.MV apache-tomcat-7.0.57/usr/local/src/java/tomcat7 to move the extracted tomcat to the/USR/LOCAL/SRC/JAVA/TOMCAT7 directory

3.vim/etc/sysconfig/iptables Configuring Firewalls

4.-a input-m State--state new-m tcp-p TCP--dport 8080-j ACCEPT set port number vim edit

5.service iptables Restart Restart Firewall service

6. Access to 192.168.150.129:8080 through other hosts is successful

Three, install MySQL

1.rpm-qa |grep-i MySQL View previous version

2.RPM-E--nodeps Software Name

3.RPM-IVH *.rpm installation Switch/root/itheima/directory

4.service MySQL start start service

5./usr/bin/mysqladmin-u root password ' new-password ' Set password

6.mysql-uroot-p123 native, available inside the virtual machine

7. Set port-Other can access remote host,
1.vim/etc/sysconfig/iptables setting up the firewall to open
-A input-m state--state new-m tcp-p TCP--dport 3306-j ACCEPT set port number vim edit

2. Restart Service iptables restart

3. Modify Permissions
Mysql-uroot-p123
show databases; Use MySQL; Show tables; DESC user;
Select Host, user,password from user;
Create user ' root ' @ '% ' identified by ' 123 '; Create a user, set a password
Grant all on * * to ' root ' @ '% ' with GRANT option; Grant to the specified user ' root ' @ '% ' all
Flush privileges; Refresh Permissions

Four, installing Redis

(Local Installation
1. First import the *.rpm file under the Dependencies folder into Linux

2.RPM-IUVH *.rpm Installing GCC

)

1. Install the Redis-compiled C environment, yum install gcc-c++

2. Import redis-3.0.7.tar.gz into Linux

3. Unzip TAR-ZXVF redis-3.0.7.tar.gz

4. Enter the extracted redis-3.0.7 file CD redis-3.0.7

5. The compile make-----appears hint:it ' a good idea to run ' make test ';)

6. Installing make Prefix=/usr/local/redis Install
After successful installation, there are several executable files in/usr/local/redis/bin redis-benchmark,redis-check-aof, REDIS-CHECK-DUMP,REDIS-CLI, etc.

7. Background mode: The Redis port is 6379
1. Return to Itheima to find the Redis file
2.CP redis.conf/usr/local/redis/bin/Copy To Bin
3. Enter cd/usr/local/redis/bin/
4.vim redis.conf Editing
5. Change Daemonize No to Yes
6. Specify the configuration file at startup./redis-server redis.conf
7. Start the client./redis-cli
8.ping back Pong can be manipulated.
127.0.0.1:6379> Ping
PONG
127.0.0.1:6379> Set name Jack
Ok
127.0.0.1:6379> Get Name
"Jack"

9. Turn off Redis
Way One: Ps-ef | Grep-i Redis kill-9 31475
Mode two: on the client shutdown

Install JDK, tomcat, MySQL, Redis under Linux system

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.