概述
安装过程中建议先新建一个临时目录,把所有的文件一次上传上去,方便后面的操作。
如:
[root@lnx-dev-bms001 config]mkdir/usr/java; mkdir /usr/java/temp;cd /usr/java/temp;rz;ls;
linux shell命令以;分割,注意确保各条指令不会出问题,如要新建的目录已经存在等,否则建议一条命令一条命令的执行。此命令实现的功能为,新建一个temp目录并切换到temp目录下,立即显示一个上传窗口,上传文件完毕后显示结果。
以上选择所要要上传的文件,点add,注意去掉upload files as ascii选项,点ok即可。
Linux系统:
查看系统版本信息:cat /proc/version
查看系统32/64版本:file /sbin/init
查看当前文件路径:pwd
需要注意的一点是,跟windows不同,linux文件夹或者文件名称区分大小写,如下错误:
姚笛老公是谁一些常用的linux shell命令:
cd dir ls pwd
rz sz
wget
chmod chown
rm mkdir cp mv file find
export
tar
source /etc/profile
tail cat vim
yum rpm
JAVA运行环境搭建与配置:
1.检测rz指令是否支持,如不支持安装rz, sz用于从本地上传安装文件
yum -y install lrzsz
2.rz jdk-rpm
3.从弹出文件选择框中选择jdk的安装文件jdk-7u25-linux-x64.rpm上传到当前光标所在的目录如/usr/local/java
建立数据库4.安装jdk命令:rpm -ivh JDK-7u25-linux-x64.rpm --prefix=/usr/local/java[自定义安装目录]
5.用到了linux内置的vim编辑器。
编辑文件vim /etc/profile,然后按键a进入编辑模式,将下面的内容复制到该文件最下方:
#set java environment
JAVA_HOME=/usr/java/jdk1.7.0_25
CLASSPATH=.:$JAVA_ls.jar
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin函授生自我鉴定
export JAVA_HOME CLASSPATH PATH JRE_HOME
#tomcat
CATALINA_HOME=/usr/java/tomcat6
export CATALINA_HOME
#maven
MAVEN_HOME=/usr/java/apache-maven-3.1.1
PATH=$PATH:$MAVEN_HOME/bin
export MAVEN_HOME
注:此处还包含接下来的其它组件的安装,路径可以提前配置好,做好规划,后面只实施即可。
保存后退出编辑窗口(先按ESC 然后输入:wq保存或者:q!取消保存),执行source /etc/profile, 使配置文件立即生效,其它vim指令可百度一下。
输入java –version检测java配置情况。
二、先卸载后安装(JDK版本升级)
Chmod 755 jdk-7u25-linux-x64.rpm
1.查询:rpm -qa | grep java 和 rpm -qa | grep jdk gcj
2.卸载:rpm -e --nodeps jdk-1.7.0_25-fcs.x86_64
早期的1.4(rpm -e --nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115)
3.安装:rpm -ivh jdk-7u25-linux-x64.rpm --prefix=/usr/local/java
4.Path配置:如一的步骤5
三、更多资料:
developer.51cto/art/200907/134708.htm
yongfengsun.blog.163/blog/static/792553852009112542526709/
alan-hjkl.iteye/blog/1527179
TOMCAT的安装与配置:
1)下载apache-tomcat-6.0.并上传到linux的指定文件夹下.
2)tar -zxvf apache-tomcat-6.0. //解压
3)cp -R apache-tomcat-6.0.39 /usr/java/tomcat6 //拷贝
4)/usr/java/tomcat6/bin/startup.sh //启动tomcat
显示 Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TEMDIR: /usr/local/tomcat/temp
Using JAVA_HOME: /usr/java/jdk1.6.0_01
到此tomcat已经安装完成,现在使用浏览器访问 IP:8080,出现tomcat默认页面,说明已经安装成功。朝代顺序排列
更多资料,如tomcat应用程序的部署配置等:
www.51cto/art/200710/58374.htm
cun2001.iteye/blog/909776
nickandmiles.blog.163/blog/static/23422123201221610848721/
wwwblogs/bingoidea/archive/2009/06/06/1497787.html
MYSQL数据库的安装与配置
相关文件
首先要下载MySQL的RPM包,地址sql/downloads/mysql/,因为这里用的是CentOS-6.1系统,所以平台中选择Oracle&Red Hat Linux 6 我的系统是32位,所以在下边分别MySQL-server、MySQL-client的32位的rpm包。
另外还可以选择安装MySQL-devel和MySQL-shared。其中MySQL-devel是开发用的一些lib,MySQL-shared是一些和以前的版本兼容用的lib
2. 将RPM包上传到CentOS中
小彩旗老公3. 检查系统有没有安装过MySQL陈乔恩东方不败图片,如果有,将其卸载(如果需要的话)
检查是否安装过MySQL :
[root@Carl-CentOS ~]# rpm -qa | grep mysql
我的系统里到一个mysql-libs 卸载老版本的MySQL Linux CentOS-6.1 中RPM 方式安装MySQL-5.5
[root@Carl-CentOS ~]# rpm -e mysql-libs
error: Failed dependencies: libmysqlclient.so.16 is needed by (installed) redland-1.0.7-11.el6.i686 libmysqlclient.so.16 is needed by (installed) postfix-2:2.6.6-2.1.el6_0.i686 libmysqlclient.so.16(libmysqlclient_16) is needed by (installed) redland-1.0.7-11.el6.i686 libmysqlclient.so.16(libmysqlclient_16) is needed by (installed) postfix-2:2.6.6-2.1.el6_0.i6
[root@Carl-CentOS ~]# rpm -e mysql-libs
error: Failed dependencies: libmysqlclient.so.16 is needed by (installed) redland-1.0.7-11.el6.i686 libmysqlclient.so.16 is needed by (installed) postfix-2:2.6.6-2.1.el6_0.i686 libmysqlclient.so.16(libmysqlclient_16) is needed by (installed) redland-1.0.7-11.el6.i686 libmysqlclient.so.16(libmysqlclient_16) is needed by (installed) postfix-2:2.6.6-2.1.el6_0.i6
86 mysql-libs is needed by (installed) postfix-2:2.6.6-2.1.el6_0.i686 因为是依赖包的原因,所以需要强制删除,在后边多加一个参数
[root@Carl-CentOS ~]# rpm -e mysql-libs --nodeps
这时候再执行rpm -qa | grep mysql,就不到原来的mysql-libs了
[root@Carl-CentOS ~]# rpm -e mysql-libs --nodeps
这时候再执行rpm -qa | grep mysql,就不到原来的mysql-libs了
4. 安装我们的RPM包
切换到RPM所在的目录首先安装MySQL-server
[root@Carl-CentOS ~]# rpm -ivh MySQL-server-5.6.16-1.el6.x86_64.rpm
上面说MYSQL数据库ROOT用户随机生成了一个密码,我们可以看到随机生成的密码是eKMIf9CI(此处密码接下来会用到,注意区分大小写)
[root@Carl-CentOS ~]# cat /root/.mysql_secret
Server装好了,然后安装Client :
[root@Carl-CentOS ~]# rpm -ivh MySQL-client-5.6.16-1.el6.x86_64.rpm
再把MySQL-devel也安装了:
[root@Carl-CentOS ~]# rpm -ivh MySQL-devel-5.6.16-1.el6.x86_64.rpm
[root@Carl-CentOS ~]# rpm -ivh MySQL-client-5.6.16-1.el6.x86_64.rpm
再把MySQL-devel也安装了:
[root@Carl-CentOS ~]# rpm -ivh MySQL-devel-5.6.16-1.el6.x86_64.rpm
5. 检查是否安装成功
安装结束后,输入mysql,查看一下是否成功安装了
[root@Carl-CentOS ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
(2) 如果出现这样的错误,说明mysql服务没有启动。
启动mysql:
[root@Carl-CentOS ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
(2) 如果出现这样的错误,说明mysql服务没有启动。
启动mysql:
[root@Carl-CentOS ~]# service mysql start
Starting MySQL..
[确定] 再输入mysql :
[root@Carl-CentOS ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.32 MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>到这里就说明你的MySQL安装成功了,掌声~~~
[确定] 再输入mysql :
[root@Carl-CentOS ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.32 MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>到这里就说明你的MySQL安装成功了,掌声~~~
发布评论