cmd

1、添加host信息
sudo sh -c "echo '127.0.0.1 blog.simpleyuan.com' >> /etc/hosts"
2、删除指定创建日期的文件
#!/bin/bash
#删除30天前的文件
location="/document/root/"
find $location -mtime +30 -type f |xargs rm -rf

查看CentOS系统配置情况命令【转】

系统
# uname -a # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue # 查看操作系统版本
# cat /proc/cpuinfo # 查看CPU信息
# hostname # 查看计算机名
# lspci -tv # 列出所有PCI设备
# lsusb -tv # 列出所有USB设备
# lsmod # 列出加载的内核模块
# env # 查看环境变量
#dmidecode | grep "Product Nmae" #查看服务器型号

- 阅读剩余部分 -

centOS安装redmine

参考地址:http://www.redmine.org/projects/redmine/wiki/RedmineInstall
# rvm install 2.1.0
# rvm use 2.1.0
# cd /opt
# wget http://www.redmine.org/releases/redmine-3.3.1.tar.gz
# tar zxf redmine-3.3.1.tar.gz
# rvm install 2.1
# rvm use 2.1
# cd /opt/redmine-3.3.1
# gem sources -l
# gem sources —remove https://rubygems.org/
# gem sources -a https://ruby.taobao.org/

# gem install rails —version 4.2
# gem update
# bundle install
# bundle exec rake generate_secret_token
# mkdir -p tmp tmp/pdf public/plugin_assets
# sudo chown -R redmine:redmine files log tmp public/plugin_assets
# sudo chmod -R 755 files log tmp public/plugin_assets
# bundle exec rails server webrick -e production -d

把redmine安装为系统服务:
$vim /etc/rc.local
加入以下代码:
#/usr/local/rvm/rubies/ruby-2.1.8/bin/ruby bin/rails server webrick -e production -b 192.168.124.54 -d