CentOs6.7关闭防火墙(SecureCRT连接不上)
解决方法:
______________________________________
一、开启SSH
以root用户登录Linux,打开终端,运行: /etc/init.d/sshd restrat
______________________________________
二、关闭防火墙
1.在终端运行 setup
2,.选择 firewall 回车
3.按tab键切换到disablede项,然后按空格键选择,然后再按tab键切换到ok,按空格件选择
4.按tab键切换到quit,按空格件选择
然后用客户端ssh登录Linux
______________________________________
三、关闭防火墙的另一种方式
/etc/init.d/iptables stop
CentOS6.5安装telnet
1、检查是否已经安装telnet
[root@localhost ~]# rpm -qa | grep telnet
2、安装telnet及telnet-server
[root@localhost ~]# yum install telnet
[root@localhost ~]# yum install telnet-server
3、因为装好telnet服务之后,默认是不开启服务的,下面我们需要修改文件来开启服务。
[root@localhost ~]# vi /etc/xinetd.d/telnet
修改 disable = yes 为 disable = no
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
4、需要激活xinetd服务
[root@localhost ~]# service xinetd restart
Stopping xinetd: [FAILED]
Starting xinetd: [ OK ]
[root@localhost ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Stopping xinetd: [FAILED]
Starting xinetd: [ OK ]
[root@localhost ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
5、需要测试telnet是否成功开启
CentOS6.5安装jdk
1、下载jdk文件,地址:
得到jdk-6u45-linux-x64.bin
2、解压jdk-6u45-linux-x64.bin
[root@localhost java]# ./jdk-6u45-linux-x64.bin
3、解压后得到的 jdk1.6.0_45,可以直接使用
[root@a download]# mv /tmp/download/jdk1.6.0_45 /opt/java/jdk1.6.0_45
4、设置环境变量
[root@localhost java]# vi /etc/profile
添加如下:
#set java environment
export JAVA_HOME=/opt/java/jdk1.6.0_45
export CLASSPATH=$JAVA_HOME/jre/lib:$JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME=/opt/java/jdk1.6.0_45
export CLASSPATH=$JAVA_HOME/jre/lib:$JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin
[root@a jdk1.6.0_45]# source /etc/profile
[root@localhost ~]# vi /home/zhong2/.bash_profile
#zhong2是计算机用户
添加如下语句:
PATH=$PATH:$HOME/bin
export JAVA_HOME=/opt/java/jdk1.6.0_45
export CLASSPATH=$JAVA_HOME/jre/lib:$JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin
export PATH
export JAVA_HOME=/opt/java/jdk1.6.0_45
export CLASSPATH=$JAVA_HOME/jre/lib:$JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin
export PATH
5、测试java是否安装成功
[root@a jdk1.6.0_45]# java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
CentOS6.5安装resin
1、下载resin_4.0.23
http://www.caucho.com/download/resin-pro-4.0.23.tar.gz
2、解压并安装
[root@a download]# tar -zxvf resin-pro-4.0.23.tar.gz
[root@a download]# cd resin-pro-4.0.23/
[root@a resin-pro-4.0.23]# ./configure --prefix=/usr/local/resin
[root@a resin-pro-4.0.23]# make
[root@a resin-pro-4.0.23]# make install
[root@a log]# cd bin/
3、启动resin
[root@a log]# ./resin.sh start
4、测试resin
[root@a bin]# curl "http://127.0.0.1:8080"
<html>
<head><title>Resin® Default Home Page</title></head>
<body>
<h1 style="background: #ccddff">Resin® Default Home Page</h1>
This is the default page for the Resin web server.
<p>Documentation is available at <a href="/resin-doc">/resin-doc</a>.
<p>Administration is available at <a href="/resin-admin">/resin-admin</a>.
</body>
</html>
<html>
<head><title>Resin® Default Home Page</title></head>
<body>
<h1 style="background: #ccddff">Resin® Default Home Page</h1>
This is the default page for the Resin web server.
<p>Documentation is available at <a href="/resin-doc">/resin-doc</a>.
<p>Administration is available at <a href="/resin-admin">/resin-admin</a>.
</body>
</html>
5、查看resin服务器的运行日志
[root@a log]# cd ../log/
[root@a log]# tailf jvm-default.log
无报错则成功安装resin了。
如果报错如下:
Unable to find native library 'resin_os' for com.caucho.loader.ClassEntry ...
则是由于安装时没有指定--prefix=/usr/local/resin
5、部署工程
将工程PROGRAM移到:/opt/resin-4.0.23/webapps/下面,修改resin配置,指定工程所在:
[root@a bin]# vi /usr/local/resin/conf/resin.xml
<web-app id="/" root-directory="/opt/resin-4.0.23/webapps/PROGRAM"></web-app>
再次启动工程并测试工程接口:
[root@a bin]# ./resin.sh start
Resin/4.0.23 launching watchdog at 127.0.0.1:6600
Resin/4.0.23 started -server '' for watchdog at 127.0.0.1:6600
[root@a bin]# curl "http://127.0.0.1:8080/test/test.do"
{
"result":10000,
"detail":null,
"msg":"操作成功"
}
Resin/4.0.23 launching watchdog at 127.0.0.1:6600
Resin/4.0.23 started -server '' for watchdog at 127.0.0.1:6600
[root@a bin]# curl "http://127.0.0.1:8080/test/test.do"
{
"result":10000,
"detail":null,
"msg":"操作成功"
}
Linux安装ant
下载程序包:
[root@VM_64_81_centos download]# tar -zxvf apache-ant-1.9.6-bin.tar.gz
[root@VM_64_81_centos download]# mv apache-ant-1.9.6 /opt/
[root@VM_64_81_centos opt]# vi /etc/profile
添加环境变量:
ANT_HOME=/opt/apache-ant-1.9.6/
export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin
建立软连接:
[root@VM_64_81_centos opt]# cd /usr/bin
[root@VM_64_81_centos bin]# ln -s -f /opt/apache-ant-1.9.6/bin/ant
测试:
[root@VM_64_81_centos bin]# ant -version
Apache Ant(TM) version 1.9.6 compiled on June 29 2015
Apache Ant(TM) version 1.9.6 compiled on June 29 2015