CentOS5.4服务器配置yum安装Apache+php+Mysql+phpmyadmin
CentOS 5.4 服务器配置 yum安装Apache+php+Mysql+phpmyadmin
--------------------------------------------------------------------------------
1. 更新系统内核到最新.
[root@linuxfei ~]#yum -y update
系统更新后,如果yum安装时提示错误信息,请执行以下命令修复.
[root@linuxfei ~]#rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*
2. 安装Apahce, PHP, Mysql, 以及php连接mysql库组件
[root@linuxfei ~]#yum -y install httpd mysql mysql-server php-mysql //安装的服务有apache php mysql 及数据库组件。
[root@linuxfei ~]#yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql //安装mysql扩展
[root@linuxfei ~]# yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc//安装php的扩展
[root@linuxfei ~]#yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql //安装apache扩展
一次性粘贴安装命令如下:
[root@linuxfei ~]# yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql
3. 启动服务配置
[root@linuxfei ~]# /sbin/chkconfig httpd on [设置apache为自启动]
[root@linuxfei ~]# /sbin/chkconfig - -add mysqld [mysql服务]
[root@linuxfei ~]# /sbin/chkconfig mysqld on [mysqld服务]
[root@linuxfei ~]# /sbin/service httpd start [自启动 httpd 服务]
[root@linuxfei ~]# /sbin/service mysqld start [自启动mysqld服务]
4.设置mysql数据库root帐号密码。
[root@linuxfei ~]# mysqladmin -u root password '123456' [引号内填密码]
[root@linuxfei ~]# mysql -u root -p ← 通过空密码用root登录
Enter password:123456 ← 在这里输入密码
Welcome to the MySQL monitor. Commands end with ; or \g. ← 确认用密码能够成功登录
Your MySQL connection id is 5 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
5.安装phpmyadmin
[root@linuxfei /]# wget http://gd2.down.chinaz.com:808/数据管理/phpMyAdmin-3.tar.gz
--2010-03-23 16:38:18-- http://gd2.down.chinaz.com:808/%CA%FD%BE%DD%B9%DC%C0%ED/phpMyAdmin-3.x.tar.gz
Resolving gd2.down.chinaz.com... 121.11.80.154
Connecting to gd2.down.chinaz.com|121.11.80.154|:808... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4700100 (4.5M) [application/x-gzip]
Saving to: `phpMyAdmin-3.x.tar.gz'
100%[======================================>] 4,700,100 134K/s in 37s 2010-03-23 16:38:56 (123 KB/s) - `phpMyAdmin-3.x.tar.gz' saved [4700100/4700100]
6.解压phpmyadmin
[root@centos5 /]#tar -zxvf phpMyAdmin-3.x.tar.gz //解压命令
[root@linuxfei /]# mv phpMyAdmin-3.3.1-all-languages /var/www/html/phpmyadmin //将解压出来的目录移动到/var/www目录下并改名为phpmyadmin
7.修改phpmyadmin根目录下的config.sample.inc.php 重命名为 config.inc.php
8.打开并编辑config.inc.php
$cfg['blowfish_secret'] = ''; /* 添加短密码 这个要必须填 不然会出错*/
然找到下边这两行 并把//去除
// $cfg['Servers'][$i]['controluser'] = 'pma'; &nbs
- 发表评论
-
- 最新评论 更多>>