How Centos publishes Java projects

Source: Internet
Author: User
Tags centos server

Before releasing the Java project, we need to install the following software

First, Windows

1, WinSCP (Windows to CentOS upload download)

2. PuTTY (Windows access CentOS server)

3. Navicat client (connect to CentOS database)

Second, Centos

1. JDK

2. mysql

3. Tomcat

---------------------------------------------------------------------

One, 1, WINSCP

After successful installation, you need to enter the following:

2, putty after successful installation, you need to enter the following content

Enter user name and password after login

Second, 1, install JDK

First See if CentOS installs java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.i686 by default, if installed, uninstall

[Email protected] java]# Rpm-qa | grep jdk Uninstall: [[email protected] java]# yum-y Remove java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.i686 Install JDK Query system is how many bit getconf long_bit 1. Download to JDK website Liunx version rpm version 2. Upload the downloaded JDK to server 3 by WinSCP install RPM-IVH jdk-8u77-linux-i586.rpm java-version in the current directory this method does not need to configure environment variables, the test method is as follows Javac Second, 2, install MySQL

I am using yum to perform MySQL database installation, first we can enter Yum List | grep mysql command to view the downloadable version of the MySQL database available on Yum:

[email protected] ~]# Yum List | grep MySQL

You can get the downloadable version of the MySQL database on the Yum server:

We found that the installation of the MySQL database through the Yum method eliminates a lot of unnecessary hassle, and when the following results occur, the MySQL database installation is successful.

At this point we can view the version of the mysql-server that we just installed with the following command

[Email protected] ~]# Rpm-qi mysql-server

We installed the Mysql-server is not the latest version, if you want to try the latest version, then go to the MySQL website to download rpm package installation, so that our MySQL database has been installed.

After we install the MySQL database, we will find a mysqld service, this is our database service, we can start our MySQL service by entering the following command.

Service mysqld Start

Note : If we are starting the MySQL service for the first time, the MySQL server will first initialize the configuration, such as:

[Email protected] ~]#Service mysqld StartInitialize MySQL database: warning:the host ' Xiaoluo ' could not being looked up with RESOLVEIP. This probably means that your libc libraries is not the Compatiblewith this binary MySQL version. The MySQL daemon, mysqld, should worknormally with the exception that host name resolving won't work. This means the should use IP addresses instead of Hostnameswhen specifying MySQL privileges! Installing MySQL system tables ... Okfilling Help Tables ... OKto start mysqld at boot time has to copysupport-files/mysql.server to the right place for your systemplease Remembe R to SET A PASSWORD for the MySQL root USER! To does, start the server, then issue the following commands:/usr/bin/mysqladmin-u root password ' new-password '/usr/bin/ Mysqladmin-u root-h xiaoluo password ' new-password ' Alternatively you can Run:/usr/bin/mysql_secure_installationwhich  Would also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers.See the Manual for more instructions. You can start the MySQL daemon with:cd/usr; /usr/bin/mysqld_safe &you can test the MySQL daemon with mysql-test-run.plcd/usr/mysql-test;                                                           Perl mysql-test-run.plplease Report No problems with The/usr/bin/mysqlbug script! [OK] starting mysqld: [OK]

At this point we will see that the first time you start the MySQL server will prompt a lot of information, the purpose is to initialize the MySQL database, when we restart the MySQL service again, will not prompt so much information, such as:

Service mysqld Restart stop mysqld:                                             [OK] starting mysqld:                                          [OK]

When we use MySQL database, we have to start the Mysqld service first, we can through Chkconfig--list | grep mysqld command to see if the MySQL service is booting automatically, such as:

[Email protected] ~]# Chkconfig--list | grep mysqldmysqld             0: Off    1: Off    2: Off    3: Off    4: Off    5: Off    6: Off

We found that the MYSQLD service did not start automatically, and of course we can set it to boot up with the Chkconfig mysqld on command, so you don't have to start it manually every time.

[[email protected] ~]# chkconfig mysqld on[[email protected] ~]# chkconfig--list | grep mysqlmysqld             0: Off    1: Off    2: Enable 3: Enable 4: Enable 5:    enable    6: Off

MySQL database after installation will only have a root administrator account, but at this time the root account has not set a password for it, the first time the MySQL service started, the database will be some initialization work, in the output of a large string of information, we see a line of information:

/usr/bin/mysqladmin-u root password ' new-password '//Set password for root account

So we can use this command to set the password for our root account ( Note : This root account is the root account of MySQL, not the root account of Linux)

mysqladmin-u root Password ' Root '//Use this command to set the root account password to root

At this point we can log in to our MySQL database via the mysql-u root-p command.

MySQL Cloud database and local client connectionsTroubleshoot remote connections MySQL error 1130
Remotely connect to MySQL server's database, error code is 1130,error 1130:host xxx.xxx.xxx.xxx are not allowed to connect to this MySQL server
Conjecture is a problem with user permissions that cannot be given to remote connections.
In this way, the MySQL library can be resolved.

After you log in to MySQL, change the "host" entry in the "User" table in the "MySQL" Database, and rename it from "localhost" to "%".
Mysql-u root-p
Mysql;use MySQL;
Mysql;select ' host ' from user where user= ' root ';
Mysql;update User Set host = '% ' where user = ' root ';
Mysql;flush privileges;
Mysql;select ' host ' from user where user= ' root ';


First sentence: Log in as user root with permissions
Second sentence: select MySQL Library
The third sentence: View the host value of the user table in the MySQL library (hosts/IP names that can be accessed by the connection)
Clause Four: Modify the host value (increase the hostname/IP address with the wildcard%), or you can directly add
If this step goes Wrong "error 1062 (23000): Duplicate entry '%-root ' for key ' PRIMARY '" by stating that the record has, skip this step
Clause five: Refresh MySQL system permissions related table
The sixth sentence: when you re-view the user table, there are modifications. Restart the MySQL service to complete. Service mysqld Restart

Two, 3, install Tomcat

1. Download Tomcat Liunx version from Tomcat official website. TAR2, upload to server via WINSCP, and decompression, decompression command as below Tar zxvf Filename.tar 3, start tomcat service SH dev/javadev/tomcat8/ Bin/startup.sh 4, close Tamcat service sh dev/javadev/tomcat8/bin/shutdown.sh If you need to modify the Tomcat port number with the WinSCP point to open Tomcat/conf/server.xml Change the port to query Liunx is the number of bits, command uname-i

How Centos publishes Java projects

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.