1. Install JDK
#查看CentOS自带JDK是否已安装 the Yum list installed |grep Java #若有自带安装的JDK, how do I uninstall the CentOS system from the Java environment? # #卸载JDK相关文件输入: yum-y remove java-1.8.0-openjdk*. # # Uninstall Tzdata-java input: Yum-y remove Tzdata-java.noarch. #当结果显示为Complete! The uninstallation is complete. #查看yum库中的Java安装包 #输入: yum-y list java* #使用yum安装Java环境 #输入: yum-y install java-1.8.0-openjdk* #当结果显示为Complete! The installation is complete. #注: "*" means that all relevant Java programs for java-1.8.0 are installed.
2. Install MySQL
See if you have installed: Yum list installed mysql* Rpm-qa | grep mysql* See if there is an installation package: Yum list mysql* install MySQL client: Yum install MySQL installation mysql server side: Yum install Mysql-server Yu M Install Mysql-devel
Installation of MySQL client and server side need to note: CentOS7 Yum source default is no MySQL you can choose to install MARIADB
Yum install mariadb-server yum install mariadb-devel yum install Mariadb-test
Or you can download and install MySQL if you need to download the MySQL repo source first
#下载mysql的repo源 wget http://repo.mysql.com/ mysql-community-release-el7-5.noarch.rpm #安装mysql-community-release-el7-5.noarch.rpm Bag  RPM -IVH mysql-community-release-el7-5.noarch.rpm #安装这个包后, get two MySQL Yum repo sources: #/etc/ yum.repos.d/mysql-community.repo, #/etc/yum.repos.d/mysql-community-source.repo #安装mysql yum install mysql-server #设置密码 mysql -u root #登录时有可能报这样的错: error 2002 (HY000): #Can ' t connect to local mysql server through socket # '/var/lib/mysql/mysql.sock ' (2), #原因是/var/lib/mysql access issues chown -r root /var/lib/mysql service mysqld restart mysql -u root use Mysql; update user set password=password (' 123456 ') where user= ' root ';
MySQL Related commands
#启动mysql systemctl start Mariadb.service or systemctl start mysqld.service #结束 systemctl stop Mariadb.service or SYSTEMCT L Stop mysqld.service #重启 systemctl restart Mariadb.service or systemctl restart Mysqld.service #开机自启 systemctl enable M Ariadb.service or Systemctl enable Mysqld.service
Open 3306 and 80 ports for extranet access
After upgrading to 7, CentOS cannot use iptables to control Linuxs ports, using FIREWALLD instead of the original iptables using FIREWALLD open Linux ports:
#开启端口 firewall-cmd--zone=public--add-port=80/tcp--permanent firewall-cmd--zone=public--add-port=3306/tcp-- Permanent #命令含义:--zone #作用域--add-port=80/tcp #添加端口 in the format: Port/Communication Protocol--permanent #永久生效, no failure after this parameter restart #重启防火墙 firewall-cmd--rel Oad #查看状态 firewall-cmd--state firewall-cmd--list-all
Still want to use iptables open port, need to do the following work
yum install iptables-services systemctl mask firewalld.service systemctl stop firewalld.service systemctl enable iptables.service systemctl enable ip6tables.service #静态防火墙规则配置文件是 /etc/sysconfig/iptables /etc/sysconfig/ip6tables vi /etc/sysconfig/iptables #编辑防火墙配置文件 #在 #-a input -j reject -- reject-with icmp-host-prohibited #-a forward -j reject --reject-with icmp-host-prohibited #之前添加 #-a input -m state --state new -m tcp -p tcp --dport 80 -j accept #-a input -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT systemctl restart iptables.service #最后重启防火墙使配置生效 systemctl enable iptables.service # Setting up a firewall boot
If you want to switch back to CentOS 7 firewall management, you need to execute the following command:
Systemctl status Firewalld #used The following command to enable the firewall Systemctl unmask firewalld systemctl Enable Firewalld systemctl start firewalld systemctl status Firewalld #下面操作与上面使用firewalld开启防火墙一样
MySQL creates a user and opens the appropriate permissions
Grant all privileges on * * to [e-mail protected] identified by ' 123456 '; Grant all privileges on * * to [email protected] '% ' identified by ' 123456 '; Flush privileges;
3. Install Tomcat
The Yum repo Tomcat is 7 and we need to download tomcat8
wget http://tomcat.apache.org/download-80.cgi #wget http://apache.fayea.com/tomcat/tomcat-8/v8.5.4/bin/ apache-tomcat-8.5.4-deployer.tar.gz wget http://apache.fayea.com/tomcat/tomcat-8/v8.5.4/bin/ Apache-tomcat-8.5.4.tar.gz tar zxvf apache-tomcat-8.5.4.tar.gz/opt/tomcat mv apache-tomcat-8.5.4/opt/tomcat/ tomcat-8.5.4-8181 # Open Firewall firewall-cmd--zone=public--add-port=8181/tcp--permanent firewall-cmd--reload firewall-cmd --state Firewall-cmd--list-all
4.install Zen Road
Successful operation
wget http://dl.cnezsoft.com/zentao/8.2.4/ZenTaoPMS.8.2.4.zbox_64.tar.gz TAR-ZXVF zentaopms.8.2.4.zbox_64.tar.gz-c /OPT/OPT/ZBOX/ZBOX-MP 3307/opt/zbox/zbox-ap 8090/opt/zbox/zbox start/opt/zbox/auth/adduser.sh firewall-cmd--zon E=public--add-port=8090/tcp--permanent firewall-cmd--reload firewall-cmd--state firewall-cmd--list-all
Description
1, the installation package directly extracted to the/OPT directory, do not extract to another directory and then copied to/opt/, because this will cause the file owner and read and write permissions to change. can use commands: tar -zxvf zentaopms.8.2.4.zbox_64.tar.gz -c /opt 2, execute/opt/ zbox/zbox start command to open Apache and MySQL. Execute/opt/zbox/zbox stop command to stop Apache and MySQL. Execute/opt/zbox/zbox restart command to restart Apache and MySQL. You can use the/opt/zbox/zbox -h command to get help on the zbox command -ap parameters Can modify Apache port,-MP parameters can modify MySQL port (for example:/opt/zbox/zbox -ap 8080) 3, browser access  HTTP://IP: Port (default account admin, password 123456) 4, database user name: Root, password is empty. Database management is Adminer, but in order to secure, access to Adminer requires authentication, you need to run/opt/zbox/auth/adduser.sh to add users (first cd /opt/ zbox/auth/ then executes ./adduser.sh).  5, Web Access Zen Road, click on the database management has 2 layers of authentication: 1) Pop-up verification is the input run addusers.sh add account and password; 2) Web page direct Display Login interface: server: 127.0.0.1:mysql Port Account root Database Fill Zentao
This article is from the "Romantic Dev" blog, so be sure to keep this source http://xinbaby88.blog.51cto.com/9943025/1834549
Aliyun CentOS 7 install software jdk MySQL tomcat Zentao and so on