source /etc/profile配置文件生效
增強工具
[code]yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel vim ntsysv yum update kernel yum groupinstall "Development Tools"安裝java
[code]檢驗系統原版本 [root@localhost ~]# java -version java version "1.7.0_24" OpenJDK Runtime Environment (build 1.7.0_24-b18) OpenJDK HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing) 進一步查看JDK信息: [root@localhost ~]# rpm -qa | grep java tzdata-java-2012c-1.el6.noarch java-1.7.0-openjdk-1.7.0.45-1.45.1.11.1.el6.x86_64 卸載OpenJDK,執行以下操作: [root@localhost ~]# rpm -e --nodeps tzdata-java-2012c-1.el6.noarch [root@localhost ~]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.45-1.45.1.11.1.el6.x86_64 sudo tar xvf jdk-7u79-linux-x64.tar.gz sudo rm jdk-7u79-linux-x64.tar.gz vi + /etc/profile JAVA_HOME=/usr/local/java/jdk1.7.0_79 JRE_HOME=/usr/local/java/jdk1.7.0_79/jre PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib export JAVA_HOME JRE_HOME PATH CLASSPATH注意:如果出現以下錯誤信息
[code]bash: /usr/java/jdk1.7.0_04/lib/dt.jar: 權限不夠 bash: /usr/java/jdk1.7.0_04/lib/tools.jar: 權限不夠錯誤原因:分隔符不能用;(分號),要用:(冒號)
安裝tomcat
[code]安裝tomcat sudo tar -zxv -f apache-tomcat-7.0.64.tar.gz sudo rm -rf apache-tomcat-7.0.64.tar.gz cd /etc/init.d vi tomcat #!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 234 20 80 JAVA_HOME=/usr/local/java/jdk1.7.0_79 export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH CATALINA_HOME=/usr/local/tomcat/apache-tomcat-7.0.64 case $1 in start) sh $CATALINA_HOME/bin/startup.sh ;; stop) sh $CATALINA_HOME/bin/shutdown.sh ;; restart) sh $CATALINA_HOME/bin/shutdown.sh sh $CATALINA_HOME/bin/startup.sh ;; esac exit 0 chmod 755 tomcat chkconfig --add tomcat chkconfig --level 234 tomcat on chkconfig --list tomcat service tomcat start service tomcat stop service tomcat restart more /usr/local/tomcat/apache-tomcat-7.0.64/logs/catalina.out localhost:8080Oracle Linux 自帶了兩個內核:一個是與 Red Hat 100% 兼容的,另一個是 Unbreakable Enterprise Kernel (UEK)。我的 Linux 來賓運行的是 UEK,因此需要安裝相應的gcc 和 kernel-uek-devel 程序包,以便 Guest Additions 安裝能夠正常工作。這是因為 Guest Additions 安裝需要構建和安裝內核驅動程序。我使用了以下yum install 命令來下載和安裝缺少的程序包:
[code]# yum update # yum install gcc # yum install kernel-uek-devel (yum output not shown)
[code]安裝httpd yum install httpd 設置 Apache 在服務器啟動時運行 chkconfig --levels 235 httpd on service httpd start
[code]安裝mysql yum -y install mysql-server 設置開機啟動 chkconfig mysqld on service mysqld start 設置MySQL的root用戶設置密碼 mysql -u root mysql> set password for root@localhost=password('root'); mysql -u root -p 基本命令 show databases; //查看系統已存在的數據庫 use databasesname; //選擇需要使用的數據庫 drop database databasename; //刪除選定的數據庫 exit //退出數據庫的連接 create database test01; //建立名為test的數據庫 show tables; // 列出當前數據庫下的表 開放遠程登錄權限 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; FLUSH PRIVILEGES;
[code]修改當前機器名稱 /etc/sysconfig/network 配置hosts文件 /etc/hosts sudo tar xvf hadoop-1.2.1.tar.gz sudo mv hadoop-1.2.1.tar.gz # set hadoop path export HADOOP_HOME=/usr/local/hadoop/hadoop-1.2.1/ export PATH=$PATH:$HADOOP_HOME:$HADOOP_HOME/bin export HADOOP_HOME_WARN_SUPPRESS=1 配置hadoop-env.sh 位於conf目錄 ![這裡寫圖片描述](http://img.blog.csdn.net/20160917192641048) 配置core-site.xml文件 <configuration> <property> <name>hadoop.tmp.dir</name> <value>/usr/local/hadoop/hadoop-1.2.1/tmp</value> </property> <property> <name>fs.default.name</name> <value>hdfs://master.hadoop:9000</value> </property> </configuration> 配置hdfs-site.xml文件 configuration> <property> <name>dfs.replication</name> <value>1</value> /property> <configuration> 配置mapred-site.xml文件 <configuration> <property> <name>mapred.job.tracker</name> <value>http://master.hadoop:9001</value> </property> </configuration> 配置masters文件