[CentOS]----JDK,Resin,mySQL的安装

来源:互联网 发布:ubuntu删除一类文件 编辑:程序博客网 时间:2024/05/17 23:43

 

1          JDK安装步骤

1.1         查询已知的JDK版本:      Java –version

1.2         查看JDKRPM安装包:        rpm–qa|grep jdk

1.3         假如已经有JDKrpm安装包,则卸载它      rpm –e xxx

1.4         运行jdk的二进制rpm:        ./jdk_6u18_linux_i586_rpm.bin

1.5         设置系统环境变量,/etc/profile最下面加上以下几段
#Set Java
JAVA_HOME=/usr/java/jdk1.6.0_18
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib
JRE_HOME=$JAVA_HOME/jre
export JAVA_HOME PATH CLASSPATH JRE_HOME

1.6         设置javajavac的符号链接
cd /usr/bin
ln –sf /usr/java/jdk1.6.0_18/jre/bin/java
ln –sf /usr/java/jdk1.6.0_18/jre/bin/javac

 

 


2          Resin安装步骤

2.1         解压resin源码包       tar –zxvf /usr/soft/resin-3.1.9.tar.gz –C/usr/local

2.2         进入文件夹        cd/usr/local/resin-3.1.9

2.3         编译源码
./configure --with-java-home = /usr/java/jdk1.6.0_18
make && make install && make clear

2.4         resin做成服务

2.4.1    cp/usr/local/resin-3.1.9/contrib/init.resin.in /etc/init.d/resin

2.4.2    chmod +x /etc/init.d/resin

2.4.3    如果需要开机启动:   chkconfig --add resin

2.4.4    修改    /etc/init.d/resin
JAVA_HOME=/usr/java/jdk1.6.0_18
RESIN_HOME=/usr/local/resin-3.1.9
#log_daemon_msg "Starting resin"
#log_end_msg $?
#log_daemon_msg "Stopping resin"
#log_end_msg $?

 

 

 

 


3          安装绿色版mySQL5.1.34

3.1         解压:    tar –zxvf mysql-5.1.34-linux-i686-icc-glibc23.tar.gz–C /usr/local

3.2         创建链接:
cd /usr/local
ln –sf mysql-5.1.34-linux-i686-icc-glibc23 mysql

3.3         配置安装
cd mysql
sripts/mysql_install_db       #
安装数据库
su – root     
groupadd mysql
useradd –g mysql mysql     #
添加mysql用户组与用户
cd /etc/init.d
cp /usr/local/mysql/support-file/mysql.server mysql
chown –R root /usr/local/mysql         #
二进制所有权归root所有
chgrp –R mysql /usr/local/mysql        #
二进制所有权归mysql所在的管理组
chown –R mysql /usr/local/mysql/data       #
数据目录所有权归mysql管理用户

3.4         编辑/etc/init.d/mysqlbasedir改成mysql的实际路径

3.5         service mysql start
cd /usr/local/mysql/bin
./mysqladmin –uroot password “123456”          #
添加root用户
./mysql –uroot –p123456                               
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘123456’ WITHGRANT OPTION;               #
外网访问
mysql>use mysql;
mysql>delete from user where password = ‘’;
mysql>flush privileges;

3.6         重启mysql                servicemysql restart

 

原创粉丝点击