jdk+tomcat+mysql installation
Ready to work:
Tips: IP address configuration, the simplest one
Run setup in the command , with prompts, follow the prompts to modify
1. Modify the hostname
vi /etc/sysconfig/network
NETWORKING=yes HOSTNAME=server1.itcast.cn |
2. Modify the ip address
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 TYPE=Ethernet ONBOOT= yes #Whether it is enabled at boot BOOTPROTO= static #ip address is set to static IPADDR=192.168.0.101 NETMASK=255.255.255.0 |
service network restart
3. Modify the mapping relationship between ip address and host name
vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.101 server1.itcast.cn |
4. Turn off iptables and set it to start / not start
service iptables stop
chkconfig iptables on
chkconfig iptables off
1. Install JDK
1. Upload jdk-7u45-linux - x64.tar.gz to Linux
2. Unzip jdk to /usr/local directory
tar -zxvf jdk-7u45-linux-x64.tar.gz -C /usr/local/
3. Set the environment variables and append the relevant content at the end of the /etc/profile file
vi /etc/profile
export JAVA_HOME=/usr/local/jdk1.7.0_45 export PATH=$PATH:$JAVA_HOME/bin |
4. Refresh environment variables
source /etc/profile
5. Test if the java command is available
java -version
2. Install Tomcat
1. Upload apache-tomcat - 7.0.68.tar.gz to Linux
2. Unzip tomcat
tar -zxvf apache-tomcat-7.0.68.tar.gz -C /usr/local/
3. Start tomcat
/usr/local/apache-tomcat-7.0.68/bin/startup.sh
4. Check whether the tomcat process is started
jps
5. View the tomcat process port
netstat -anpt | grep 2465
6. Access tomcat through browser
3. Install MySQL
1. Upload MySQL-server-5.5.48-1.linux2.6.x86_64.rpm and MySQL-client- 5.5.48-1.linux2.6.x86_64.rpm to Linux
2. Install MySQL-server-5.5.48-1.linux2.6.x86_64.rpm using the rpm command , lacking perl dependencies
rpm -ivh MySQL-server-5.5.48-1.linux2.6.x86_64.rpm
3. Install perl dependencies and upload 6 perl - related rpm packages
rpm -e perl-*
4. Install MySQL-server again , the rpm package conflicts
rpm -ivh MySQL-server-5.5.48-1.linux2.6.x86_64.rpm
5. Uninstall the conflicting rpm package
rpm -e mysql-libs-5.1.73-5.el6_6.x86_64 --nodeps
6. Install MySQL-client and MySQL-server again
rpm -ivh MySQL-client-5.5.48-1.linux2.6.x86_64.rpm
rpm -ivh MySQL-server-5.5.48-1.linux2.6.x86_64.rpm
7. Start the MySQL service, and then initialize MySQL
service mysql start
/usr/bin/mysql_secure_installation
8. Test MySQL
mysql -u root -p