编译完apache后将其加为系统服务
[
2008/07/31 10:59 | by askwan ]
2008/07/31 10:59 | by askwan ]
自己手动编译apache后,实际上也可以做到和rpm包安装的那样,用系统服务命令service httpd restart来启动,
只是需要手动设置一下。
假设apache编译安装目录为/usr/local/apache2
编译安装完后启动和关闭apache的指令是 /usr/local/apache2/bin/apachectl start | stop | restart
现在将其加入系统服务
复制启动脚本到/etc/rc.d/init.d/
然后在相应的启动级别如3,4,5中加入链接
链接文件S85是启动序号。
然后在启动脚本/etc/rc.d/init.d/httpd文件第二行加入
第二行为启动软件描述apache!
然后加入系统服务列表
如果出现“service httpd does not support chkconfig”,我猜你一定是忘记了把”chkconfig: 345 85 85“和"description: Apache"前面的"#"给漏掉了。
开机自动启动
只是需要手动设置一下。
假设apache编译安装目录为/usr/local/apache2
编译安装完后启动和关闭apache的指令是 /usr/local/apache2/bin/apachectl start | stop | restart
现在将其加入系统服务
复制启动脚本到/etc/rc.d/init.d/
Quotation
[root@localhost ]#cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
Quotation
[root@localhost ]#cd /etc/rc3.d
[root@localhost ]#ln -s /etc/rc.d/init.d/httpd S85httpd
[root@localhost ]#ln -s /etc/rc.d/init.d/httpd K85httpd
[root@localhost ]#ln -s /etc/rc.d/init.d/httpd S85httpd
[root@localhost ]#ln -s /etc/rc.d/init.d/httpd K85httpd
链接文件S85是启动序号。
然后在启动脚本/etc/rc.d/init.d/httpd文件第二行加入
#chkconfig: 345 85 85
#description: Apache
第一行参数意义表示在启动级别3,4,5启动(启动级别4无意义);启动序号为S85,关闭序号K85。#description: Apache
第二行为启动软件描述apache!
然后加入系统服务列表
Quotation
[root@localhost ]#chkconfig --add httpd
如果出现“service httpd does not support chkconfig”,我猜你一定是忘记了把”chkconfig: 345 85 85“和"description: Apache"前面的"#"给漏掉了。
开机自动启动
Quotation
[root@localhost ]#chkconfig --level 345 httpd on
Cacti安装上了monitor插件
[
2008/07/30 10:43 | by askwan ]
2008/07/30 10:43 | by askwan ]
昨天给cacti安装上了一款不错的监控插件monitor,还不错的说,这是部分机柜的机器图

简单安装步骤
先下载这个
http://download.Cactiusers.org/downloads/Cacti-plugin-arch.tar.gz
安装好
再下载插件 然后安装
http://download.Cactiusers.org/downloads/monitor.tar.gz
修改cacti配置文件config.php
找到这一行
然后在下面增加一行
重启web,ok!
简单安装步骤
先下载这个
http://download.Cactiusers.org/downloads/Cacti-plugin-arch.tar.gz
安装好
再下载插件 然后安装
http://download.Cactiusers.org/downloads/monitor.tar.gz
修改cacti配置文件config.php
找到这一行
"$plugins = array();"
然后在下面增加一行
$plugins[] = 'monitor';
重启web,ok!
Zeus Web Server和Php的整合
[
2008/07/18 13:26 | by askwan ]
2008/07/18 13:26 | by askwan ]
ZEUS是一款性能优异的商业web服务器软件,正版价格差不多要1000刀,经过本人测试(与开源的apache对比测试),在高并发访问情况下,性能的确不凡;
其内置的功能也是非常丰富,这里不说了,有兴趣可以观光一下其官方网站
我想这款商业软件比较适合“懒人”,不需要很复杂的配置,就可以搭建起一个性能优异的web服务器了。而且可以和众多商业软件整合搭配使用,比如BEA WebLogic ,WebSphere Application Server ,JBoss 3.x 等,当然,和开源的Tomcat ,apache等同样可以整合起来使用!
这里主要记录本人整合zeus和php的过程。
整合php和zeus其实方法很多,阅读了官方相关文档后,大致有一下几种
其内置的功能也是非常丰富,这里不说了,有兴趣可以观光一下其官方网站
我想这款商业软件比较适合“懒人”,不需要很复杂的配置,就可以搭建起一个性能优异的web服务器了。而且可以和众多商业软件整合搭配使用,比如BEA WebLogic ,WebSphere Application Server ,JBoss 3.x 等,当然,和开源的Tomcat ,apache等同样可以整合起来使用!
这里主要记录本人整合zeus和php的过程。
整合php和zeus其实方法很多,阅读了官方相关文档后,大致有一下几种
Linux下应用iSCSI 技术
[
2008/07/15 15:39 | by askwan ]
2008/07/15 15:39 | by askwan ]
iSCSI 技术,顾名思义,即internet SCSI,这样就比较容易理解和记忆,是IETF制订的一项标准,用于将SCSI数据块映射成以太网数据包。这样就可以使用iSCSI协议通过IP网络来传输SCSI数据块,使我们可以用以太网来构建IP存储局域网。通过网友的张图,可以更清晰的理解这种存储架构了

现在iscsi也有开源社区的支持,使我们可以利用软件的方式体验这种技术了
官方网站是:http://iscsitarget.sourceforge.net/
需要用到的软件iscsi-target包也需要在这里下载,貌似,连接已经实效,
大家用svn直接download源代码下来编译也是一样的。
官方要求linux系统内核版本必须是>=2.6.14,做试验就用Centos 5,RHEL5,FC8,FC9吧,这些系统内核都支持
解压,然后编译和安装
这里“两个端”要搞清楚一个是Target,存储设备端(理解为“服务器端”);一个是Initiator(理解为“客户端”)。
下面配置target端
编译/etc/ietd.conf文件
其他的不用看,就看这段
Target iqn.2001-04.com.example:storage.disk2.sys1.xyz 这个每台机器都不一样,可以修改,简称主机Iqn,即iSCSI Qualified Name
Lun 0 Path=/dev/sdb,Type=fileio 这里设定存储设备和名称
设定完了 启动
设定开机自动启动
这样,我说的target端(“服务端") 就配置完了
客户端,如果是win,可以到这里去下载iSCSI Initiator支持软件
http://www.microsoft.com/WindowsServer2003/technologies/storage/iscsi/default.mspx
安装完了,设置一下就可以使用了
我这里主要是做一下linux做为Initiator端的使用方法,
这里假设target端IP为 192.168.0.30
先来查找
以上信息,表明找到
下面重启客户端
然后查看是否已经挂过来了
[root@localhost ~]# fdisk -l
这样客户端下就有target端共享出来的存储设备sdb了!
接下来是杀是剐就由你控制了,^_^^_^
现在iscsi也有开源社区的支持,使我们可以利用软件的方式体验这种技术了
官方网站是:http://iscsitarget.sourceforge.net/
需要用到的软件iscsi-target包也需要在这里下载,貌似,连接已经实效,
大家用svn直接download源代码下来编译也是一样的。
官方要求linux系统内核版本必须是>=2.6.14,做试验就用Centos 5,RHEL5,FC8,FC9吧,这些系统内核都支持
解压,然后编译和安装
Quotation
[root@localhost ~]# make
[root@localhost ~]# make install
[root@localhost ~]# make install
这里“两个端”要搞清楚一个是Target,存储设备端(理解为“服务器端”);一个是Initiator(理解为“客户端”)。
下面配置target端
编译/etc/ietd.conf文件
其他的不用看,就看这段
Target iqn.2001-04.com.example:storage.disk2.sys1.xyz
# Users, who can access this target. The same rules as for discovery
# users apply here.
# Leave them alone if you don't want to use authentication.
#IncomingUser joe secret
#OutgoingUser jim 12charpasswd
# Logical Unit definition
# You must define one logical unit at least.
# Block devices, regular files, LVM, and RAID can be offered
# to the initiators as a block device.
Lun 0 Path=/dev/sdb,Type=fileio
# Alias name for this target
# Alias Test
# various iSCSI parameters
# (not all are used right now, see also iSCSI spec for details)
#MaxConnections 1
#InitialR2T Yes
#ImmediateData No
#MaxRecvDataSegmentLength 8192
# Users, who can access this target. The same rules as for discovery
# users apply here.
# Leave them alone if you don't want to use authentication.
#IncomingUser joe secret
#OutgoingUser jim 12charpasswd
# Logical Unit definition
# You must define one logical unit at least.
# Block devices, regular files, LVM, and RAID can be offered
# to the initiators as a block device.
Lun 0 Path=/dev/sdb,Type=fileio
# Alias name for this target
# Alias Test
# various iSCSI parameters
# (not all are used right now, see also iSCSI spec for details)
#MaxConnections 1
#InitialR2T Yes
#ImmediateData No
#MaxRecvDataSegmentLength 8192
Target iqn.2001-04.com.example:storage.disk2.sys1.xyz 这个每台机器都不一样,可以修改,简称主机Iqn,即iSCSI Qualified Name
Lun 0 Path=/dev/sdb,Type=fileio 这里设定存储设备和名称
设定完了 启动
Quotation
[root@localhost ~]# /etc/init.d/iscsi-target start
设定开机自动启动
Quotation
[root@localhost ~]# chkconfig iscsi-target on
这样,我说的target端(“服务端") 就配置完了
客户端,如果是win,可以到这里去下载iSCSI Initiator支持软件
http://www.microsoft.com/WindowsServer2003/technologies/storage/iscsi/default.mspx
安装完了,设置一下就可以使用了
我这里主要是做一下linux做为Initiator端的使用方法,
这里假设target端IP为 192.168.0.30
先来查找
Quotation
[root@localhost ~]# iscsiadm -m discovery --type sendtargets --portal 192.168.0.30
192.168.0.30:3260,1 iqn.2001-04.com.example:storage.disk2.sys1.xyz
192.168.0.30:3260,1 iqn.2001-04.com.example:storage.disk2.sys1.xyz
下面重启客户端
Quotation
[root@localhost ~]# service iscsi restart
Stopping iSCSI daemon: /etc/init.d/iscsi: line 33: 2436 Killed /etc/init.d/iscsid stop
iscsid dead but pid file exists
Turning off network shutdown. Starting iSCSI daemon: [ OK ]
[ OK ]
Setting up iSCSI targets: Logging in to [iface: default, target: iqn.2001-04.com.example:storage.disk2.sys1.xyz, portal: 192.168.0.30,3260]
Login to [iface: default, target: iqn.2001-04.com.example:storage.disk2.sys1.xyz, portal: 192.168.0.30,3260]: successful
[ OK ]
iscsid dead but pid file exists
Turning off network shutdown. Starting iSCSI daemon: [ OK ]
[ OK ]
Setting up iSCSI targets: Logging in to [iface: default, target: iqn.2001-04.com.example:storage.disk2.sys1.xyz, portal: 192.168.0.30,3260]
Login to [iface: default, target: iqn.2001-04.com.example:storage.disk2.sys1.xyz, portal: 192.168.0.30,3260]: successful
[ OK ]
然后查看是否已经挂过来了
[root@localhost ~]# fdisk -l
Disk /dev/sdb: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
Disk identifier: 0x00000000
Disk /dev/sdb doesn't contain a valid partition table
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
Disk identifier: 0x00000000
Disk /dev/sdb doesn't contain a valid partition table
这样客户端下就有target端共享出来的存储设备sdb了!
接下来是杀是剐就由你控制了,^_^^_^





