标签:管理员 image add sof 正文 follow useradd aio 搭建
生产搭建环境:#mkdir /opt/software/
#rpm -ivh /opt/software/jdk-8u161-linux-x64.rpm
(2)配置java环境
#vi /etc/profile
添加如下配置
export JAVA_HOME=/usr/java/jdk1.8.0_161
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
#source /etc/profile
#java -version
#vi $JAVA_HOME/jre/lib/security/java.security
添加如下配置
securerandom.source=file:/dev/./urandom
3、创建glassfish的用户与组
#groupadd ginstall
#useradd -m -g ginstall glassfish
#passwd glassfish
4、配置系统内核参数
#vi /etc/sysctl.conf
添加优化参数
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 15728640
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
fs.file-max = 6815744
#sysctl -p
5、修改系统资源限制
#vi /etc/security/limits.conf
添加如下配置
glassfish soft nproc 16384
glassfish hard nproc 16384
glassfish soft nofile 65536
glassfish hard nofile 65536
glassfish soft stack 10240
6、修改环境变量
#vi /etc/profile
添加如下配置
if [ $USER = "glassfish" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
#source /etc/profile
7、安装glassfish
(1)、创建部署路径,并解压程序包
解压glassfish-4.1.2.zip,将压缩包解压到对应目录下/opt/software
#mkdir /glassfish
#cd /opt/software
#unzip glassfish-4.1.2.zip -d /glassfish
#chown -R glassfish:ginstall /glassfish
(2)、启动glassfish(使用glassfish用户操作)
$ cd /glassfish/glassfish4/glassfish/bin
$ ./asadmin start-domain domain1
(3)、修改管理员密码
$ cd /glassfish/glassfish4/glassfish/bin
$ ./asadmin change-admin-password
注意:前面两个问题都直接按回车即可,然后设置新密码回车确认
(4)、修改安全登录,以便其他非本机机器访问
$ cd /glassfish/glassfish4/glassfish/bin
$ ./asadmin enable-secure-admin
8、访问控制台
开浏览器,输入“https://IP_ADDR:4848/”进入控制台。
标签:管理员 image add sof 正文 follow useradd aio 搭建
原文地址:https://blog.51cto.com/8355320/2442437