rpm -ivh jdk-6u32-linux-i586-rpm
解压
tar -zxvf apache-tomcat-6.0.10.tar.gz;
2、安装mysql
检测是否安装
#rpm -qa|grep mysql
删除当前安装的
yum remove mysql mysql-server mysql-libs mysql-server;
# yum repolist all | grep mysql
yum安装
yum install mysql
常见错误
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)vi /etc/my.cnf
[client]
socket=/var/lib/mysql/mysql.sock
如果需要远程访问需要授权
#更新root密码
UPDATE user SET Password=PASSWORD('newpassword') where USER='root'
#更新root权限
mysql>GRANT ALL PRIVILEGES ON *.* TO 'jack'@’10.10.50.127’ IDENTIFIED BY '654321' WITH GRANT OPTION;
mysql>FLUSH RIVILEGES
常用tomcat配置
<Host name="www.xxx.com" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="admin" reloadable="true"/>(如果是linux这里路径是没有"/"的)
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
位置cygwin=false前。
JAVA_OPTS="-server -Xms256m -Xmx512m -XX:PermSize=64M -XX:MaxPermSize=128m"
数目大小看着办
ssh mysql 1045的问题
首先停止
# service mysql stop
然后进入安全模式
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
进入
mysql -u root mysql
然后修改
UPDATE user SET Password=PASSWORD('newpassword') where USER='root' and host='root' or host='localhost';
刷新
FLUSH PRIVILEGES;
退出 quit
重启 service mysql start
新的linux服务(阿里云)
在/etx/hosts 文件中
没有设定127.0.0.1对应的host名称(32位id),tomcat启动而时候会报错:
找不到hostname.