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
[[email protected] ~]# rpm -qa | grep telnet
2、安装telnet及telnet-server
[[email protected] ~]# yum install telnet
[[email protected] ~]# yum install telnet-server
3、因为装好telnet服务之后,默认是不开启服务的,下面我们需要修改文件来开启服务。
[[email protected] ~]# 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
}
4、需要激活xinetd服务
[[email protected] ~]# service xinetd restart
Stopping xinetd: [FAILED]
Starting xinetd: [ OK ]
[[email protected] ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
5、需要测试telnet是否成功开启
CentOS6.5安装jdk
1、下载jdk文件,地址:
http://download.csdn.net/detail/carboncomputer/9240563
得到jdk-6u45-linux-x64.bin
2、解压jdk-6u45-linux-x64.bin
[[email protected] java]# ./jdk-6u45-linux-x64.bin
3、解压后得到的 jdk1.6.0_45,可以直接使用
[[email protected] download]# mv /tmp/download/jdk1.6.0_45 /opt/java/jdk1.6.0_45
4、设置环境变量
[[email protected] 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
[[email protected] jdk1.6.0_45]# source /etc/profile
[[email protected] ~]# 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
5、测试java是否安装成功
[[email protected] 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)
CentOS6.5安装resin
1、下载resin_4.0.23
http://www.caucho.com/download/resin-pro-4.0.23.tar.gz
2、解压并安装
[[email protected] download]# tar -zxvf resin-pro-4.0.23.tar.gz
[[email protected] download]# cd resin-pro-4.0.23/
[[email protected] resin-pro-4.0.23]# ./configure --prefix=/usr/local/resin
[[email protected] resin-pro-4.0.23]# make
[[email protected] resin-pro-4.0.23]# make install
[[email protected] log]# cd bin/
3、启动resin
[[email protected] log]# ./resin.sh start
4、测试resin
[[email protected] 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>
5、查看resin服务器的运行日志
[[email protected] log]# cd ../log/
[[email protected] 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配置,指定工程所在:
[[email protected] bin]# vi /usr/local/resin/conf/resin.xml
<web-app id="/" root-directory="/opt/resin-4.0.23/webapps/PROGRAM"></web-app>
再次启动工程并测试工程接口:
[[email protected] 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
[[email protected] bin]# curl "http://127.0.0.1:8080/test/test.do"
{
"result":10000,
"detail":null,
"msg":"操作成功"
}
Linux安装ant
下载程序包:
http://mirrors.hust.edu.cn/apache//ant/binaries/apache-ant-1.9.6-bin.tar.gz
[[email protected]_64_81_centos download]# tar -zxvf apache-ant-1.9.6-bin.tar.gz
[[email protected]_64_81_centos download]# mv apache-ant-1.9.6 /opt/
[[email protected]_64_81_centos opt]# vi /etc/profile
添加环境变量:
ANT_HOME=/opt/apache-ant-1.9.6/
export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin
建立软连接:
[[email protected]_64_81_centos opt]# cd /usr/bin
[[email protected]_64_81_centos bin]# ln -s -f /opt/apache-ant-1.9.6/bin/ant
测试:
[[email protected]_64_81_centos bin]# ant -version
Apache Ant(TM) version 1.9.6 compiled on June 29 2015