配置

ActiveMQ配置之配置连接密码

2011-12-29, Posted in Java, 配置 | 我来说两句 | 查看全文>>

1、控制台安全配置,打开conf/jetty.xml文件,找到

    <bean id="securityConstraint" class="org.eclipse.jetty.http.security.Constraint">
        <property name="name" value="BASIC" />
        <property name="roles" value="admin" />
        <property name="authenticate" value="false" />
    </bean>

将“false”改为“true”即可。用户名和密码存放在conf/credentials.properties文件中。
2、生产者和消费者连接MQ需要密码
打开conf/activemq.xml文件,在标签里的标签前加入:

   <plugins>   
     <simpleAuthenticationPlugin>   
       <users>   
          <authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/>   
       </users>   
      </simpleAuthenticationPlugin>   
   </plugins>

请注意,这个配置必须在标签前,否则启动ActiveMQ会报错。

标签:

Debian6下安装Mysql,Ubuntu下适用

2011-08-08, Posted in 常用, 数据库, 配置 | 我来说两句 | 查看全文>>

Debian下安装软件的方便性就不在提了,这里直接讲Debian下安装MYSQL,请分别执行如下命令:

sudo apt-get update
sudo apt-get installl mysql-server

执行第二条命令的时候,会提示输入root的密码,如下图:

mysqlconfig

mysql config


接下来再确认密码,确认后,提示一堆信息,就安装好了.

标签: , ,

debian或者Ubuntu添加虚拟网卡

2011-07-27, Posted in 常用, 操作系统, 配置 | 我来说两句 | 查看全文>>

有时候,一台服务器需要设置多个ip,但又不想添加多块网卡,那就需要设置虚拟网卡.这里介绍两种方式在debian或ubuntu上添加虚拟网卡.

在添加虚拟网卡前,首先看看网线连接的网卡名是什么(服务器一般有两块网卡,第一个叫eth0,第二个叫eth1).

sudo ifconfig

一般情况下会看到:

[sudo] password for nortan:
eth0 Link encap:Ethernet HWaddr 00:00:4c:5e:a9:ec
inet addr:192.168.1.62 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::200:4cff:fe5e:a9ec/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48954 errors:0 dropped:0 overruns:0 frame:0
TX packets:33536 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13400246 (12.7 MiB) TX bytes:3583352 (3.4 MiB)

其中eth0,就是第一个网卡,我们的例子向第一个网卡添加虚拟网卡: 查看全文…

标签: ,

Debian安装配置Iptables防火墙

2011-07-23, Posted in 操作系统, 配置 | 3 回复 | 查看全文>>

服务器通常会安装防火墙,Debian上有很防火墙,Iptables为比较常用的免费防火墙,Iptables能够提供数据包过滤,网络地址转换(NAT)等功能.在Debian上手工配置Iptables的资料比较少,本文做一个详细的介绍.

第一步,首先确定你的系统已经安装Iptables.打开SSH终端,输入

whereis iptables

如果能看到如下类似信息,说明你已经安装了iptables
iptables: /sbin/iptables /usr/share/iptables /usr/share/man/man8/iptables.8.gz
如果不是这个提示,或者没有任何提示,那你的Debian上可能没有安装iptables
请使用如下命令安装:

sudo apt-get install iptables

注意:本文所有命令在普通帐号下完成,本普通帐号使用sudo具有root权限,本人不建议直接使用root用户 查看全文…

标签: , , ,

清理ubuntu系统启动项和内核

2011-06-19, Posted in 操作系统, 配置 | 我来说两句 | 查看全文>>

多次升级ubuntu后,开机系统启动项会显示很多内核可以选择,一般情况下,只要最新的启动项就可以了,清理ubuntu系统启动项和内核有很多方式,最快的方式是使用如下命令:
sudo aptitude purge ~ilinux-image-.*\(\!`uname -r`\)

标签: