转自:http://my.hupu.com/Anew_G/blog/6011243.html
1.使用Virtual box安装LAMP或LNMP集成包。
yum -y install fonts-chinese
yum -y install fonts-ISO8859-2
cd /usr/share/fonts/
fc-cache -fv
reboot
如果用startx命令启动图形界面失败,则如下
yum install xorg-x11-server-Xorg
仍旧不行?用这个
yum reinstall xorg-x11-server-Xorg
yum install gcc
ln -s /usr/src/kernels/2.6.18-......-i686 /usr/src/linux //省略号处用TAB键自动补全
进入到桌面上那个点击后挂载的光盘,获得所在路径并进入,然后
wget -c http://dl.wdlinux.cn:5180/soft/php-5.3.10.tar.gz
tar zxvf php-5.3.10.tar.gz
cd php-5.3.10
./configure --prefix=/www/wdlinux/php-5.3.10 --with-config-file-path=/www/wdlinux/etc --with-mysql=/www/wdlinux/mysql --with-iconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp --with-apxs2=/www/wdlinux/apache/bin/apxs
(上面这段直接复制到终端)
make
make install
rm -f /www/wdlinx/php
ln -s /www/wdlinux/php-5.3.10 /www/wdlinux/php
service httpd restart
4.配置phpmyadmin
到官网用wget下载后,解压到网站根目录(使用前mysql密码不能为空)
进入phpmyadmin文件夹
cp config.sample.inc.php config.inc.php
重启apache
5.配置vim
yum -y install vim-enhanced
cp /usr/share/vim/vim70/vimrc_example.vim ~/.vimrc
vim ~/.vimrc
随便找一行加入
set nocompatible
set fileencodings=ucs-bom,utf-8,gbk,default,latin1
set number 永久显示行数
set nobomb 无BOM格式
set t_Co=256
http://www.vim.org/scripts/script.php?script_id=2340 这个下个主题
主题放到:/usr/share/vim/vim70/colors
进入vimrc中,开一行加上 colorscheme ZZZ(ZZZ为主题名字,如molokai)
继续在vimrc中加入
filetype plugin on
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
/* 打开了 phpcomplete ,Ctrl+X(插入模式下)打开函数列表,Ctrl+N(P)进行函数选择补全。ESC取消提示 */
http://www.vim.org/scripts/script.php?script_id=1355 下载 php-doc.vim
cp ./php-doc.vim /usr/share/vim/vim70/autoload/php-doc.vim
vimrc中加入:
source ~/.vim/php-doc.vim
inoremap :call PhpDocSingle()i
nnoremap :call PhpDocSingle()
vnoremap :call PhpDocRange()
/* 配置好了php documentor */
http://www.vim.org/scripts/script.php?script_id=1658
解压缩后把 plugin,doc,syntax,nerdtree_plugin 四个目录复制到/usr/share/vim/vim70/ 目录下
/*配置树形结构(在树形中o进入文件)Ctrl+W+h(l)在树形和文件中切换。*/
http://ctags.sourceforge.net/
解压后进入文件夹./configure && make && make install
http://vim.sourceforge.net/scripts/script.php?script_id=273
解压后
cp ./doc/taglist.txt /usr/share/vim/vim70/doc/
cp ./plugin/taglist.vim /usr/share/vim/vim70/plugin/
在vimrc文件中添加
set tags=tags;
set autochdir
/* 以后再需要的目录中ctags -R即可 */
http://www.vim.org/scripts/download_script.php?src_id=754
解压出来的东西cp到/usr/share/vim/vim70
vimrc中
let g:winManagerWindowLayout=’NERDTree,TagList|FileExplorer’
在vim中用:WMToggle调用
6.美化美化
这个依个人所好
7.配置Git
yum install curl curl-devel zlib-devel openssl-devel perl cpio expat-devel gettext-devel
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
tar xzvf git-latest.tar.gz
进入目录
autoconf
./configure
make
make install
git --version
完成