If you use the 163 Image source and then use sudoapt-getinstallmysql-server, you cannot install other dependent packages automatically. the solution is to change the source to another one, I will return to the default ubuntu source here. Then enter sudoapt-getinstallm...
If you use the 163 Image source and then use sudo apt-get install mysql-server, you cannot install other dependent packages automatically. the solution is to change the source to another one, I will return to the default ubuntu source here. Then enter sudo apt-get install mysql-server. ubuntu will automatically download and install all the packages for you.
Go to mysql:
1) $ mysql-uroot-p123456 (-u user name and-p password)
2) $ mysql-uroot-p123456 mysql directly enters the mysql database
After successful entry:
1) view the database: $ show databases;
2) view the table: $ show tables;
3) use tables: use mysql;
4) import the SQL file to mysql:
Mysql-uroot-p123456 fws </opt/create_DDL. SQL
Install jdk:
1. download jdk(jdk-7-linux-i586.tar.gz), unzip $ tar-zxvf jdk-7-linux-i586.tar.gz
2) move the decompressed folder to the specified directory $ mv jdk1.7.0/usr/soft/
3) set environment variables:
$ Vi ~ /. Bashrc
Add:
Export JAVA_HOME =/usr/soft/jdk1.7.0
Export JRE_HOME =$ {JAVA_HOME}/jre
Export CLASSPATH =. :$ {JAVA_HOME}/lib :$ {JRE_HOME}/lib
Export PATH =$ {JAVA_HOME}/bin: $ PATH
Save and exit: source ~ /. Bashrc
4) Test: java-version
Install tomcat
1)download atat(apache-tomcat-7.0.22.tar.gz) unzip $ tar-zxvf apache-tomcat-7.0.22.tar.gz;
2) move the decompressed folder to the specified directory $ mv apache-tomcat-7.0.22/usr/soft/
3) environment variables. if jdk is correctly installed, you do not need to set them.
Tomcat security:
1) shutdown Port:
The Tomcat server. xml file contains the following sentence:
It indicates that tomcat is disabled using port 8005. you can use the firewall to set Port 8005 to be accessible only from the specified machine or change the shutdown parameter value to another value.
2) default error page:
The default error page protects some sensitive information. To prevent attacks, we need to hide this information. Open the/web. xml folder at the end of the fileAdd the following content:
Java. lang. Throwable
/Error. jsp
3) delete the webapps sample File: delete project files such as ROOT.
From Java, go's