search
HomeDatabaseMysql TutorialUbuntu 8.10系统JAVA和MYSQL配置方法

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 在安装jdk文档 前,必须到sun的网站下载jdk文档。你下载的文档可以是任意语言,包括中文例如你安装jdk5的文档,应该在安装前把下载的文档存放到/tmp /jdk-1_5_0-doc.zip;再例如你安装jdk6的文档,应

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

    在安装jdk文档 前,必须到sun的网站下载jdk文档。你下载的文档可以是任意语言,包括中文例如你安装jdk5的文档,应该在安装前把下载的文档存放到/tmp /jdk-1_5_0-doc.zip;再例如你安装jdk6的文档,应该在安装前将下载的文档存放到 /tmp/jdk-6-doc.zip。当然你也可以不在安装前做这件事情,因为安装的过程会提示你这么做,请注意看终端窗口的提示。

    【正文】

    1、首先安装JDK

    java6 在命令行输入 apt-get install sun-java6-jre sun-java6-jdk 可以自行选择是否安装jre

    java5 在命令行输入 apt-get install sun-java5-jre sun-java5-jdk

    多个jdk可以同时安装,而且可以随时更改当前的默认jdk

    在命令行输入 sudo update-alternatives --config javac 来更改当前默认jdk

    sun-java5-doc和sun-java6-doc是jdk的文档的安装程序,但是不包括jdk文档。

    在安装jdk文档前,必须到sun的网站下载jdk文档。你下载的文档可以是任意语言,包括中文例如你安装jdk5的文档,应该在安装前把下 载的文档存放到/tmp/jdk-1_5_0-doc.zip;再例如你安装jdk6的文档,应该在安装前将下载的文档存放到 /tmp/jdk-6-doc.zip。当然你也可以不在安装前做这件事情,因为安装的过程会提示你这么做,请注意看终端窗口的提示。

    写入环境变量 gedit /etc/environment

    在编辑器中加入 JAVA_HOME=/usr/lib/jvm/java-6-sun

    classpath不必配置,错误的classpath会导致许多问题。jvm会知道自带的classpath。对于自定义的classpath,可以在运行、编译时加上-classpath参数来指定。至于环境变量,当你写的程序需要时再指定也不迟

    要使配置生效必须在命令行输入 . /etc/environment

    如果需要还要修改系统虚拟机的优先级顺序调整: sudo gedit /etc/jvm

    jdk安装完毕,在终端输入 java -version 查看是否安装成功(或直接输入java)

    2、安装  

    从tomcat官方网站下载绿色的即可,解压后运行bin目录下的startup.sh

    在浏览器输入http://localhost:8080 查看tomcat是否启动

    要关闭tomcat只要运行bin目录下shutdown.sh即可

    如果需要tomcat开机启动可以参照一下方法:

    修改/etc/rc.local 文件 gedit /etc/rc.local 加入

    JAVA_HOME=/usr/lib/jvm/java-6-sun

    CLASSPATH=.:/usr/lib/jvm/java-6-sun/lib

    JRE_HOME=/usr/lib/jvm/java-6-sun/jre

    export JRE_HOME

    export CLASSPATH

    export JAVA_HOME

    /home/allenwei/Tomcat/apache-tomcat-6.0.14/bin/startup.sh //你放tomcat的目录

    修改/etc/profile 输入 gedit /etc/profile,增加以下行:

    JAVA_HOME=/usr/lib/jvm/java-6-sun

    CATALINA_HOME=/home/test/Tomcat/apache-tomcat-6.0.14

    export JAVA_HOME CATALINA_HOME

    重启系统后tomcat就可以随开机启动了

    3、安装mysql

    首先 sudo apt-get install mysql-server mysql-client

    安装完成后输入 sudo /etc/init.d/mysql start 启动mysql

    此时需要修改root的密码

    查看默认密码输入 sudo gedit /etc/mysql/debian.cnf 在[client]段可以看到用户名密码

    输入 mysql -u root -p 登录,提示输入密码,输入在debian.cnf文件中的密码

    修改密码 输入 GRANT ALL PRIVILEGES ON *.* TO root@localhostIDENTIFIED BY "你要修改的密码"

    此时mysql 的安装完成

    您也可以安装mysql 的图形化管理工具 sudo apt-get mysql-admin mysql-query-browser

    4、eclipse 和 netbeans 的安装就很简单了,从官方网站上下载 deb包,安装即可

Ubuntu 8.10系统JAVA和MYSQL配置方法

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools