Gem中mysql错误
Gem使用中遇到错误: henry@henry-laptop:~/Soft/Ruby/RubyGem/rubygems-0.9.0$ sudo gem update --system Updating RubyGems... Bulk updating Gem source index for: http://gems.rubyforge.org Attempting remote update of rubygems-update ERROR: While executing gem ... (Errno::ENOENT) No such file or directory - getcwd henry@henry-laptop:~/Soft/Ruby/RubyGem/rubygems-0.9.0$ sudo gem update rails sudo: cannot get working directory Updating installed gems... Attempting remote update of rails Install required dependency rake? [Yn] y ERROR: While executing gem ... (Errno::ENOENT) No such file or directory - getcwd henry@henry-laptop:~/Soft/Ruby/RubyGem/rubygems-0.9.0$ cd ~ henry@henry-laptop:~$ sudo gem update --system 后面运行正常,看来Gem还会挑剔目录~
centos安装nagios
1.安装开始 rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm yum install nagios nagios-plugins nagios-plugins-all nagios-plugins-nrpe nrpe rrdtool* pnp4nagios httpd php php-gd 2、修改nagios.cfg vim nagios.cfg 修改如下: process_performance_data=1 service_perfdata_command=process-service-perfdata host_perfdata_command=process-host-perfdata 3、修改nagios command配置文件 cd /usr/local/nagios/etc/objects vim commands.cfg #在文件末尾追加如下几行 define command { command_name process-service-perfdata command_line /usr/bin/perl /usr/local/pnp4nagios/libexec/process_perfdata.pl } define command { command_name process-host-perfdata command_line /usr/bin/perl /usr/local/pnp4nagios/libexec/process_perfdata.pl -d HOSTPERFDATA } 4、修改nagios template 配置文件 vim templates.cfg #在文件末尾追加如下几行 define host { name host-pnp action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_ ...
Apache报告No space left on device的解决办法
今天在开发时突然apache无法启动了.表现为,输入 httpd -X 后片刻自动退出,同时在error_log中有如下内容: [Fri Aug 15 10:54:31 2008] [emerg] (28)No space left on device: Couldn't create accept lock df一下发现不是磁盘空间的问题.Google了一下就找到了解决方案,原来是系统的信号量不够用了.用以下命令可以查看所有的信号量: $ ipcs -s key semid owner perms nsems 0x00000000 19234816 nobody 600 1 0x00000000 19267585 nobody 600 1 0x00000000 19300354 nobody 600 1 0x00000000 19398659 nobody 600 1 0x00000000 19431428 nobody 600 1 0x00000000 19464197 nobody 600 1 0x00000000 19562502 nobody 600 1 然后用这行命令删除所有的信号量即可: ipcs -s | grep nobody | perl -lane 'print \`ipcrm sem $F[1]\`'
centos6.2 使用yum快速安装nginx
To add nginx yum repository, create a file named /etc/yum.repos.d/nginx.repo and paste one of the configurations below: CentOS: [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 After this: yum install nginx
rake command not found
错误: rake command not found find / -name rake 找到bin下的rake 然后: ln -s /路径 /usr/bin/rake
lastlog命令详解
lastlog文件在每次有用户登录时被查询.可以使用lastlog命令检查某特定用户上次登录的时间,并格式化输出上次登录日志 /var/log/lastlog的内容.它根据UID排序显示登录名、端口号(tty)和上次登录时间.如果一个用户从未登录过,lastlog显示**Never logged**.注意需要以root身份运行该命令.运行该命令如下所示: $ lastlog 用户名 最后登陆时间 root **从未登录过** bin **从未登录过** daemon **从未登录过** adm **从未登录过** lp **从未登录过** sync **从未登录过** shutdown **从未登录过** halt **从未登录过** mail **从未登录过** news **从未登录过** uucp **从未登录过** operator **从未登录过** games **从未登录过** gopher **从未登录过** ftp **从未登录过** nobody **从未登录过** rpm **从未登录过** dbus **从未登录过** avahi **从未登录过** mailnull **从未登录过** smmsp **从未登录过** nscd **从未登录过** vcsa **从未登录过** haldaemon **从未登录过** rpc **从未登录过** rpcuser **从未登录过** sshd **从未登录过** pcap **从未登录过** ntp **从未登录过** gdm **从未登录过** apache **从未登录过** distcache **从未登录过** postgres **从未登录过** mysql **从未登录过** dovecot ...