2011/10/26

mail group postfix



vi /etc/postfix/aliases

帳號:帳號A,帳號B,帳號X@gmail.com


 newaliases

2011/10/25

httpd restart


[root@localhost /]# /etc/rc.d/init.d/httpd restart

Linux add user userdel


useradd -s /sbin/nologin username
passwd username


userdel -r  username
find / -user username

https://sites.google.com/site/hcsvieken/fedora-xue-xi/usermod

2011/10/24

Centos install PHP

yum -y install php php-mbstring php-mysql


chkconfig httpd on

chkconfig --list httpd

httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

/etc/rc.d/init.d/httpd start

CentOS install Apache

 yum -y install httpd

Centos 5.5 install MySQL

Centos 5.5 install MySQL

 yum -y install mysql-server

vi /etc/my.cnf
--

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
default-character-set = utf8

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[mysql]
default-character-set = utf8

--

chkconfig mysqld on

chkconfig --list mysqld

2-5 開啟

/etc/rc.d/init.d/mysqld start
--

正在初始化 MySQL 資料庫: Neither host 'ip位置' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
--


 vi /etc/hosts

--
# Do not remove the following line, or various programs
# that require network functionality will fail.
#::1 localhost.localdomain localhost
127.0.0.1 localhost.localdomain localhost


--

/etc/rc.d/init.d/mysqld start

mysqladmin -u root password 'Your Password'

CentOS 5.5 install WIKI

yum -y install httpd php* mysql*

wget http://downloads.zend.com/optimizer/3.0.1/ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz


tar zxvf ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gzcd ZendOptimizer-3.0.1-linux-glibc21-i386./install(一路next……)留意:装置wiki时,mysql是必需要设置暗码滴:mysqlgrant all privileges on test.* to root@localhost identified by ‘password’;2、下载mediawiki顺序:wget http://dumps.wikimedia.org/mediawiki/1.16/mediawiki-1.16.2.tar.gztar zxvf mediawiki-1.16.2.tar.gzmv mediawiki-1.16.2 /var/www/html/wiki3、下载FCKeditor(可视化编纂器)wget http://mediawiki.fckeditor.net/nightly/svn/mediawiki_fckeditor_ext_N.tar.gztar zxvf mediawiki_fckeditor_ext_N.tar.gzcd extensions/mv FCKeditor/ /var/www/html/wiki/extensions/4、下载eaccelerator(缓存对象)wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2tar jxvf eaccelerator-0.9.6.1.tar.bz2/usr/bin/phpize./configure –enable-eaccelerator=shared –with-php-config=/usr/bin/php-configmakemake install留意:三叶草在这里碰到一点问题,就是在make这一步,碰到一个“make: *** [ea_store.lo] Error 1”的错误,处理方案是搞个patch…,三叶草命运运限背,没有搞定,预备稍后持续起劲。cp eaccelerator.ini /etc/php.d/OK,如今根本上算是设置装备摆设完成了,直接翻开http://localhost/wiki,依据提醒装置吧!因为三叶草eaccelerator没有搞定,所以缓存选项就没有选上…记得装置后,把LocalSettings.php拷贝到根目次来哦…,这个文件很主要,许多设置装备摆设在外面——我也不懂,起劲去进修吧~Ps.三叶草流量用完了…临时购置了1G流量…今朝预备闭关修炼ing!原创文章,转载请注明: 转载自三叶草本文链接地址:http://www.anjing.me/1221.html

2011/10/19

rename

rename ooxxooxx.ooxx oo.ooxx *

aba.xxx rename as aba

rename aba.xxx " " *


find . -name '*,v' -exec sh -c 'mv "$0" "${0%,v}"' {} \;

cvs2git import



cat ../mnt/HDD/專案名稱/專案名稱-blob.dat ../mnt/HDD/專案名稱/專案名稱-dump.dat | git fast-import

2011/10/18

cvs2git


這是在本地端的方法
需事先安裝cvs2git




cvs2git \
    --blobfile=user/user-blob.dat \
    --dumpfile=user/user-dump.dat \
    --username=cvs2git \
/mnt/HDD/jspspace/user/ --fallback-encoding=big5


--



cvs2git \
    --blobfile=原專案名稱/原專案名稱-blob.dat \
    --dumpfile=原專案名稱/原專案名稱-dump.dat \
    --username=cvs2git \
/mnt/HDD/原專案名稱/



centos load ntfs


yum install fuse fuse-ntfs-3g 

2011/10/07

SSH strart on Cent OS



/etc/init.d/sshd restart

vim /etc/hosts.allow

sshd:ALL

vim /etc/hosts.deny

sshd:ip-a ,ip-b ,

2011/10/06

HTML-Template-2.9.tar.gz

wget http://pkgs.fedoraproject.org/repo/pkgs/perl-HTML-Template/HTML-Template-2.9.tar.gz/cbf88a486b36284be55765ac7357c187/HTML-Template-2.9.tar.gz

tar xzvf HTML-Template-2.9.tar.gz
cd HTML-Template-2.9
perl Makefile.PL
make
make test
make install

Can't locate Text/Iconv.pm

Can't locate Text/Iconv.pm in

cd /var/www/cgi-bin/openwebmail/shares/

mv iconv.pl iconv.pl.bak


cp /var/www/cgi-bin/openwebmail/misc/patches/iconv.pl.fake /var/www/cgi-bin/openwebmail/shares/iconv.pl

CGI.pm

cd /tmp

wget http:// ooxx

tar -zxf CGI.pm-3.42.tar.gz

cd CGI.pm-3.42

perl Makefile.PL

make

make test

make install


swap resize

cat /proc/swaps

free

--
新增swap

sudo dd if=/dev/zero of=/自己選位置/名稱自己改 bs=1024 count=1024000 (≒1G)


sudo /sbin/mkswap /var/swap

--

cat /proc/swaps

free

這時候應該可以看到新的SWAP跟位置,總量了

--
移除部份swap

sudo swapoff /var/swap

sudo rm /var/swap

cat /proc/swaps

free

--
註:調小 = add new (要求的大小) + 移除原本的swap


git install

yum -y install gcc
yum install zlib-devel
yum install openssl-devel
yum install perl
yum install cpio
yum install expat-devel
yum install gettext-devel

yum install autoconf

git
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
tar xzvf git-latest.tar.gz
cd git-日期
autoconf
./configure --with-curl=/usr/local
make
make install

eth0

/etc/rc.d/init.d/network restart

tar

tar -xzvf filename.ooxx

usb flash disk


cd /

cd /mnt

mkdir usbdisk

 mount /dev/隨身碟 /mnt/usbdisk/


mount cd / usb

cd /
cd /mnt
mkdir cdrom

mount /dev/cdrom /mnt/cdrom

postfix

/etc/init.d/postfix restart

/etc/init.d/postfix stop

/etc/init.d/postfix start


remove openwebmail

remove  openwebmail


rm -rfd /var/www/html/openwebmail

rm -rfd /var/www/cgi-bin/openwebmail

 

chack os / 位元數


chack os


uname -a  
[root@localhost ~]# lsb_release -a


getconf LONG_BIT 
(查看Linux系統幾位元)