{"id":655,"date":"2014-03-18T15:05:46","date_gmt":"2014-03-18T07:05:46","guid":{"rendered":"https:\/\/www.ookangzheng.com\/?p=655"},"modified":"2020-05-24T16:02:26","modified_gmt":"2020-05-24T08:02:26","slug":"centos6-4%e4%b8%8byum%e5%ae%89%e8%a3%85mysql%e5%92%8cjdk%e5%92%8ctomcat","status":"publish","type":"post","link":"https:\/\/www.ookangzheng.com\/centos6-4%e4%b8%8byum%e5%ae%89%e8%a3%85mysql%e5%92%8cjdk%e5%92%8ctomcat\/","title":{"rendered":"CentOS6.4\u4e0bYum\u5b89\u88c5Mysql\u548cJDK\u548ctomcat"},"content":{"rendered":"

\u4e00\u3001\u9996\u5148\u4f7f\u7528Yum list available xxx\u547d\u4ee4\u7f57\u5217\u51fa\u8fdc\u7a0b\u4ed3\u5e93\u91cc\u9762\u53ef\u4ee5\u5b89\u88c5\u7684\u5305<\/p>\n

1\u3001\u5217\u51fa\u53ef\u4ee5\u5b89\u88c5\u7684java\u5305<\/p>\n

yum list available java*<\/pre>\n

\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n

\"\"<\/p>\n

2\u3001\u5217\u51fa\u53ef\u4ee5\u5b89\u88c5\u7684tomcat<\/a>\u5305<\/p>\n

yum list available tomcat*<\/pre>\n

\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n

\"\"<\/p>\n

3\u3001\u5217\u51fa\u53ef\u4ee5\u5b89\u88c5\u7684mysql\u5305<\/p>\n

yum list available mysql*<\/pre>\n

\u8f93\u51fa\uff1a<\/p>\n

\"\"<\/p>\n

\u4f7f\u7528yum<\/a>\u00a0install \u53051,\u53052\u2026..\u547d\u4ee4\u5b89\u88c5\u6211\u4eec\u6240\u9700\u5305<\/p>\n

yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat6-docs-webapp tomcat6-javadoc mysql-server java-1.6.0-openjdk<\/pre>\n

\u4e8c\u3001\u8bbe\u7f6emysq\u5bc6\u7801\uff1a<\/p>\n

service mysqld start\r\nmysqladmin -u root password '\u65b0\u5bc6\u7801'<\/pre>\n

\u4e09\u3001\u5b89\u88c5\u5b8ctomcat<\/a>6\u548cmysql\u540e\u5df2\u7ecf\u88ab\u6dfb\u52a0\u5230\u7cfb\u7edf\u670d\u52a1\uff0c\u73b0\u5728\u53ef\u4ee5\u542f\u52a8\u5e72\u8fd9\u4e9b\u670d\u52a1<\/p>\n

service mysqld start\r\nservice tomcat6 start<\/pre>\n

\u6216\u8005\u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u542f\u52a8<\/p>\n

chkconfig mysqld on\r\nchkconfig tomcat6 on<\/pre>\n

\u56db\u3001\u9632\u706b\u5899\u5f00\u542ftomcat6\u7684\u7aef\u53e3,\u9ed8\u8ba4\u662f8080<\/p>\n

\/sbin\/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT\r\n\/etc\/rc.d\/init.d\/iptables save\r\n\/etc\/init.d\/iptables restart<\/pre>\n

\u6216\u8005\u76f4\u63a5\u6253\u5f00\/etc\/sysconfig\/iptables\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\uff0c\u6dfb\u52a0\u5bf98080\u7aef\u53e3\u7684\u8bbf\u95ee\u6743\u9650\u7136\u540e\u91cd\u542f\u9632\u706b\u5899\u3010service iptables restart\u3011\u5373\u53ef<\/p>\n

\u4e94\u3001Tomcat6\u7684\u5e94\u7528\u7a0b\u5e8f\u90e8\u7f72\u76ee\u5f55\u53ca\u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e\uff1a<\/p>\n

\/usr\/share\/tomcat6\/webapps\/ROOT\r\n\/etc\/tomcat6<\/pre>\n

\u516d\u3001mysql\u914d\u7f6e\u4f4d\u7f6e\uff1a<\/p>\n

\/etc\/my.cnf<\/pre>\n

\u6211\u662f\u6267\u884c\u8fd9\u4e2a\u547d\u4ee4\u627e\u51fa\u6765\u7684<\/p>\n

find \/ -name my.cnf<\/pre>\n

\u4e03\u3001\u67e5\u770bmysql\u9ed8\u8ba4\u7684\u5b58\u50a8\u5f15\u64ce\u662f\u5426\u652f\u6301INNODB\u4ee5\u53ca\u9ed8\u8ba4\u7684\u5f15\u64ce\u662f\u5426\u662fINNODB\u3010\u5f88\u591a\u9879\u76ee\u9700\u8981\u3011<\/p>\n

1\u3001\u767b\u5f55mysql\u540e\u6267\u884c\u5982\u4e0b\u547d\u4ee4<\/p>\n

mysql>show engines;<\/pre>\n

\u8f93\u51fa\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n

\"\"<\/p>\n

\u53ef\u4ee5\u770b\u51fa\u9ed8\u8ba4\u7684\u7f3a\u7701\u5b58\u50a8\u5f15\u64ce\u4e0d\u662fINNODB\uff0c\u6211\u4eec\u5982\u4e0b\u4fee\u6539\/etc\/my.cnf<\/p>\n

vi \/etc\/my.cnf<\/pre>\n

\u5728[mysqld]\u914d\u7f6e\u8282\u91cc\u9762\u6dfb\u52a0\uff1a<\/p>\n

default-storage-engine=INNODB<\/pre>\n

\u7136\u540e\u4fdd\u5b58\u9000\u51fa\u91cd\u65b0\u542f\u52a8mysql\u5373\u53ef<\/p>\n

service mysql restart<\/pre>\n

\u518d\u6b21\u67e5\u770bshow engines,\u53d1\u73b0\u7f3a\u7701\u7684\u6570\u636e\u5e93\u5f15\u64ce\u662fINNODB\u4e86\u3002<\/p>\n

\u516b\u3001\u5982\u4f55\u67e5\u770bmysql\u6570\u636e\u5e93\u548ctomcat\u662f\u5426\u542f\u52a8\u6210\u529f<\/p>\n

\u67e5\u770b\u7aef\u53e3\uff1a<\/p>\n

netstat -antp<\/pre>\n

\u5982\u6709\u67093306\u7aef\u53e3\u548c8080\u7aef\u53e3\u8bf4\u660e\u6210\u529f\uff0c\u5f53\u7136\u4f60\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u6d4b\u8bd5tomcat\u662f\u5426\u542f\u52a8\u66f4\u76f4\u63a5\uff1a<\/p>\n

http:\/\/localhost:8080<\/p>\n

\"\"<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4e00\u3001\u9996\u5148\u4f7f\u7528Yum list available xxx\u547d\u4ee4\u7f57\u5217\u51fa\u8fdc\u7a0b\u4ed3\u5e93\u91cc\u9762\u53ef\u4ee5\u5b89\u88c5\u7684\u5305 1\u3001\u5217\u51fa\u53ef\u4ee5\u5b89\u88c5\u7684java\u5305 yum list available java* \u8f93\u51fa\u5982\u4e0b\uff1a 2\u3001\u5217\u51fa\u53ef\u4ee5\u5b89\u88c5\u7684tomcat\u5305 yum list available tomcat* \u8f93\u51fa\u5982\u4e0b\uff1a 3\u3001\u5217\u51fa\u53ef\u4ee5\u5b89\u88c5\u7684mysql\u5305 yum list available…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-655","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/comments?post=655"}],"version-history":[{"count":0,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/655\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/media?parent=655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/categories?post=655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/tags?post=655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}