1、系统下载
CentOS开发社区已发布了新的5.3版本。CentOS5.3基于RedHatEnterprisLinux5.3.0,其中包括Kernel2.6.18、Apache2.2、PHP5.1.6、MySQL5.0、PostgreSQL8、GNOME2.16、KDE3.5、OpenOffice.org2.3、Firefox3.0、Evolution2.12等等。此外,CentOS5.3更新了美工设计,并根据用户的请求恢复了Contrib仓库。
CentOS5.3支持i386及x86_64架构,其ISO映像可从以下地址获取。
isoredirect.centos.org/centos/5
/isos/
2、系统安装
安装CentOS5.3是做服务器,所以没有用的,一概不装;具体哪些不装,自己看着办吧:)
3、安装Apache+php+Mysql
a、用yum安装前.先是替换为中国CentOS镜像服务器!中国官方镜像网站:
http://centos.ustc.edu.cn/
安装后请按照以下步骤修改CenOS-Base.repo,以后就可以方便的用yum安装软件了().
cd/etc/yum.repos.d
mvCentOS-Base.repoCentOS-Base.repo.save
wget
http://centos.ustc.edu.cn/CentOS-Base.repo.5
mvCentOS-Base.repo.5CentOS-Base.repo
b、更新系统内核到最新.yum-yupdate
c、安装Apahce,PHP,Mysql,以及php连接mysql库组件yum-yinstallhttpdphpmysqlmysql-serverphp-mysql
d、安装mysql扩展yum-yinstallmysql-connector-odbcmysql-devellibdbi-dbd-mysql
或一次性粘贴安装:
yum-yinstallhttpdphpmysqlmysql-serverphp-mysqlhttpd-manualmod_sslmod_perlmod_auth_mysqlphp-mcryptphp-gdphp-xmlphp-mbstringphp-ldapphp-pearphp-xmlrpcmysql-connector-odbcmysql-devellibdbi-dbd-mysql
e、设置mysql数据库root帐号密码。
mysqladmin-urootpassword‘newpassword’[引号内填密码]
f、让mysql数据库更安全
mysql-uroot-p[此时会要求你输入刚刚设置的密码,输入后回车即可
mysql>DROPDATABASEtest;[删除test数据库]
mysql>DELETEFROMmysql.userWHEREuser=”;[删除匿名帐户]
mysql>FLUSHPRIVILEGES;[重载权限]
g、按照以上的安装方式,配置出来的默认站点目录为/var/www/html/新建一个php脚本:
4、配置防火墙
添加允许访问HTTP、FTP端口
iptables-IRH-Firewall-1-INPUT-mstate--stateNEW-mtcp-ptcp--dport21-jACCEPT
iptables-IRH-Firewall-1-INPUT-mstate--stateNEW-mtcp-ptcp--dport80-jACCEPT重启iptables:serviceiptablesrestart
5、安装phpMyAdmin
进入
phpMyAdmin
官方下载(不要最新版本,下phpMyAdmin2.11.9.5就行了,3.1以上需php5.2以上),上传到你的网站目录下,然后进行配置。只需几步即可搞定。
I.config.sample.inc.php更名为config.inc.php;
II.打开config.inc.php文件,进行以下修改;
//$cfg['Servers'][$i]['controluser']=‘pma’;
//$cfg['Servers'][$i]['controlpass']=‘pmapass’;
//$cfg['Servers'][$i]['pmadb']=‘phpmyadmin’;
//$cfg['Servers'][$i]['bookmarktable']=‘pma_bookmark’;
//$cfg['Servers'][$i]['relation']=‘pma_relation’;
//$cfg['Servers'][$i]['table_info']=‘pma_table_info’;
//$cfg['Servers'][$i]['table_coords']=‘pma_table_coords’;
//$cfg['Servers'][$i]['pdf_pages']=‘pma_pdf_pages’;
//$cfg['Servers'][$i]['column_info']=‘pma_column_info’;
//$cfg['Servers'][$i]['history']=‘pma_history’;
//$cfg['Servers'][$i]['designer_coords']=‘pma_designer_coords’;
去掉每行前面的//;
II.$cfg['blowfish_secret']=”;|修改为|$cfg['blowfish_secret']=‘http’;
IV.$cfg['Servers'][$i]['controluser']=‘pma’;|把’pma’修改为你的帐号|$cfg['Servers'][$i]['controlpass']=‘pmapass’;|把’pmapass设置为你的mysql登录密码|
V.$cfg['blowfish_secret']=”;|添加短语密码例如:$cfg['blowfish_secret']=‘onohot’;
6、//安装php的扩展
yum-yinstallphp-gdphp-xmlphp-mbstringphp-ldapphp-pearphp-xmlrpc
7、//安装apache扩展
yum-yinstallhttpd-manualmod_sslmod_perlmod_auth_mysql
注:以上步骤是结合fengyihot'Blog,再根据本人实际改进的:)
8、所需工具下载
I.
FlashFXP
通过FlashFxp里的Sftp连接,直接连接到服务器上管理所有文件夹。
II.
putty
PuTTY是一套免费的SSH/Telnet程序,它可以连接上支持SSHTelnet联机的站台,并且可自动取得对方的系统指纹码(Fingerprint)。建立联机以后,所有的通讯内容都是以加密的方式传输,因此你再也不用害怕使用Telnet在Internet或公司的内部网络传输资料时被他人获知内容了!
II.
SecureCRT
SecureCRT是一款支持SSH(SSH1和SSH2)的终端仿真程序,同时支持Telnet和rlogin协议。SecureCRT是一款用于连接运行包括Windows、UNIX和VMS的远程系统的理想工具。通过使用内含的VCP命令行程序可以进行加密文件的传输。