Ido Share | How to install OpenCms under CentOS

Source: Internet
Author: User


This time the opencms Environment is built on two machines.

a single server installation MySQL ,

a single server installation JDK , Tomcat , OpenCms . You can also use jdk,mySQL,tomcat,opencms installed on the same machine.



Software version:

MySQL 5.5

JDK 1.7

Tomcat 7

OpenCms 9.01


1.1UninstallLinuxSystem self-installingOpenJdkTomcat,MySQL

Use the yum or rpm command to see if the system has its own jdk,Tomcat, mysql, command format, with jdk as an example:

Yum command: yum list installed |grep jdk

RPM Command:rpm –qa|grep jdk (query rpm package)

If the system has self-installed these software, in order to ensure consistent version, you need to uninstall:

Yum command:yum remove + Package name manually select y or n

Yum–y Remove + package name Auto Select y, fully automatic

RPM command:rpm-e package name (unload rpm package)

1.2installationMySQL

1. Upload the mysql software package to the Linux machine, using the yum command or rpm command to install, the document is using the rpm command.

Package: mysql-server-5.5.40-1.linux2.6.x86_64.rpm

MYSQL-CLIENT-5.5.40-1.LINUX2.6.X86_64.RPM,


2. Start MySQL

Service MySQL start start MySQL

Service MySQL stop stop MySQL

Things to keep in mind

1,the first installation, the database default password is empty, so you need to modify the database password.

Login mysql command: mysql –u User (default is root) –p Password

Example:mysql-h 192.168.1.41-u test1234-ptest1234

UPDATE user SET Password=password ("test1234");

Flush privileges;

When you open a mysql command, log in to MySQLand view the database password is already in effect.

2.Open Remote login permissions for the database

Method: After logging in to MySQL , changethe "host " in the "User" tablein the "MySQL" database. "Item, from localhost instead " % "

Use MySQL

Update user set host= '% ' where user= ' root ';

Selete host,user from user;

Flush privileges; --- make changes effective


After modification, add parameters to the MySQL database when the "-H database is located on the machine's IP"

3,max_allowed_packet parameter value is changed to greater than 16M.

OpenCms The installation will verify Max_allowed_packet , if the value is less than 16M , OpenCms Unable to install, error

Modification Method:

1> go to MySQL server

2> run in the MySQL command line

Set Global Max_allowed_packet = 2*1024*1024*10


3> then shut down this mysql server link and then enter.

Show VARIABLES like '%max_allowed_packet% ';

See if the next max_allowed_packet is edited successfully

4. Turn off the firewall

Ceteos 7

View firewall Status:systemctl status Firewalld

Temporarily shut down the firewall, after rebooting, the firewall will automatically systemctl stop Firewalld

Permanently shut down the firewall, after rebooting, the firewall will not automatically systemctl disable Firewalld

1.3installationJDK

1, query the linux version and operating system bits, you can use uname –a Query, if the X86 motioned to 64 bit system,i386 and other bits of the system, we use the machine is generally a bit.

Package:

2, java_home environment variable configuration,

Configuration method: Add the following code to the /etc/profile file,the key value is the Java installation path, according to the real environment information to configure.

Java_home=/usr/java/jdk1.7.0_71

Export Java_home

1.3installationTomcat

1. The tomcat package is uploaded to the Linux machine, software package:apache-tomcat-7.0.56.tar.gz

2. Unpacking package:tar xvf apache-tomcat-7.0.56.tar.gz

3, extracted folder apache-tomcat-7.0.56 modified to TOMCAT7---- This step can be skipped, you need to pay attention to the configuration environment variables, using the real Environment Tomcat Package path

4. Set directory executable permissions chmod +x/usr/local/tomcat----/usr/local/tomcat as Tomcat package path

5. Configure Environment variables

Add the following code to the /etc/profile file (Note: The package path is configured according to the actual environment):

Calsspath= $JAVA _home/lib: $JAVA _home/jre/lib

Export Calsspath

Path= $PATH: $JAVA _home/bin

Export PATH

Tomcat_home=/usr/local/tomcat7

Export Tomcat_home

Catalina_home=/usr/local/tomcat7

Export Catalina_home

After saving the file,source/etc/profile is set to take effect immediately

6. Start tomcat sh startup.sh or sh/usr/local/tomcat7/bin/startup.sh

Use the ps-ef|grep tomcat command to see if Tomcat is started

7. Turn off the firewall

CentOS 7 View firewall status:systemctl status Firewalld

The Tomcat page cannot be entered if the firewall is in a boot state and must be turned off

Temporarily shut down the firewall, after rebooting, the firewall will automatically systemctl stop Firewalld

Permanently shut down the firewall, after rebooting, the firewall will not automatically systemctl disable Firewalld

8, in the browser view http://localhost:8080, if the following page appears, indicating that the Tomcat installation was successful.

Note: It is best to use a few browsers to browse, preventing the browser from being cached and mistakenly believing that the Tomcat installation was successful.

1.4 Installing OpenCms

1, upload opencms package Opencms.war to /usr/local/tomcat7/webapps directory.

2. Restart the Tomcat service,OpenCms will be automatically extracted, such as:

3, use the browser http://localhost:8080/opencms/setup to enter the opencms Installation page, according to the prompts to install. --- use IE10 Some pages do not display, it is recommended to use Google Chrome

Go to opencms Install Welcome page, select "YES", "continue"

Database Configuration page, notes are marked in the diagram

The following page always selects "Continue". If the previous action in the document is complete,opencms can be installed successfully. If there are other problems during installation, then analyze them.

4, the following page appears to indicate that the installation was successful

5. Restart tomcatand enter the http://192.168.1.26:8080/opencms/opencms/system/login/ page , a password can be used to successfully access the opencms Administration page.

The default login ID and password is admin/admin

6, after the login, successfully entered the work area.


If you are in the process of installation, there are questions, you can leave a message;

Copyright NOTICE: This article for Bo Master ido original article, without Bo Master permission not reproduced.

Ido Share | How to install OpenCms under CentOS

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.