exportHADOOP_HOME=/opt/hadoop-1.0.0
exportHADOOP_NAMENODE_OPTS="-Dcom.sun.management.jmxremote.port=9191-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=true-Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password-Dcom.sun.management.jmxremote.access.file=$HADOOP_HOME/conf/jmxremote.access $HADOOP_NAMENODE_OPTS"
exportHADOOP_DATANODE_OPTS="-Dcom.sun.management.jmxremote.port=9292-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=true-Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password-Dcom.sun.management.jmxremote.access.file=$HADOOP_HOME/conf/jmxremote.access $HADOOP_DATANODE_OPTS"
exportHADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote.port=9393-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=true-Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password-Dcom.sun.management.jmxremote.access.file=$HADOOP_HOME/conf/jmxremote.access $HADOOP_JOBTRACKER_OPTS"
$HADOOP_HOME/conf/jmxremote.password内容:
myAdmin mypassword
$HADOOP_HOME/conf/jmxremote.access 内容:
myAdmin readonly
修改文件属性:
chmod 600 jmxremote.password