First, if you have not registered Tencent Cloud Account, you must first register and complete the real-name authentication. Before purchasing cloud products such as Tencent Cloud Server, remember to receive (Voucher Gift Pack)
yum install mysql mysql-devel mariadb-server mariadb –y
systemctl start mariadb #Start MariaDB
systemctl stop mariadb #Stop MariaDB
systemctl restart mariadb #Restart MariaDB
systemctl enable mariadb #Set boot up
Mysql configuration file is /etc/my.cnf
Add coding configuration at the end
[ mysql]]
default-character-set =utf8
The character encoding here must be the same as in /usr/share/mysql/charsets/Index.xml.
Installation Notes
System environment: centos-7.2
Installation method: rpm installation
Software: jdk-7-linux-x64.rpm
Download link: http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
java –version
rpm -qa | grep java
If you find that there are installed OpenJDK and installation packages, then uninstall them in sequence first. Uninstall command:
rpm -e --nodeps tzdata-java-2012c-1.el6.noarch
rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64
java
javac
java –version
Since my environment has changed without configuration, I started to install Tomcat directly.
Installation Notes
Installation environment: CentOS-7.2
Installation method: source installation
Software: apache-tomcat-7.0.29.tar.gz
Download link: http://tomcat.apache.org/download-70.cgi
Upload apache-tomcat-7.0.29.tar.gz to the /root directory and perform the following operations
apache-tomcat-7.0.29 renamed to tomcat
Modify the default port 80
1、 Open the tomcat configuration file
vi /tomcat/conf/server.xml
2、 After opening the Tomcat configuration file, press/8080 to quickly retrieve
3、 Modify the port, press i to change all 8080 to 80
4、 Press: wq to save and exit
5、 Restart tomcat
/tomcat/bin/shutdown.sh
/tomcat/bin/startup.sh
#. /tomcat/bin/shutup.sh //Close tomcat
firewall-cmd --zone=public --add-port=80/tcp --permanent
Success appears to indicate successful addition
Enter the IP address on the browser, and the apache interface appears, indicating that the installation is successful.
After completing the above installation, you can put the web program under /tomcat/webapps/ROOT. Configure the database, then restart tomcat, enter the server's IP address in the browser, and then you can access the web.
Since I made a javaweb program that needs to be run on the server, I used a virtual machine to simulate it myself. This tutorial was written after I completed the server setup, so there is no picture. I hope to rewrite the tutorial next time. Let more friends who want to learn understand my tutorial.
Recommended Posts