在本文中,我们将给您介绍关于yum安装php,mysql日志的详细内容,并且为您解答yum安装php5.6的相关问题,此外,我们还将为您提供关于CentOS5.5使用yum安装Apache+PHP+M
在本文中,我们将给您介绍关于yum安装php,mysql日志的详细内容,并且为您解答yum安装php5.6的相关问题,此外,我们还将为您提供关于CentOS 5.5使用yum安装Apache+PHP+MySQL、CentOS 5.9 yum安装LAMP(Apache+MySQL+PHP)、CentOS 6 yum安装 Nginx1.6 + MySQL5.5 + PHP5.6、CentOS 6.3 yum安装LAMP(Apache+MySQL+PHP )的知识。
本文目录一览:- yum安装php,mysql日志(yum安装php5.6)
- CentOS 5.5使用yum安装Apache+PHP+MySQL
- CentOS 5.9 yum安装LAMP(Apache+MySQL+PHP)
- CentOS 6 yum安装 Nginx1.6 + MySQL5.5 + PHP5.6
- CentOS 6.3 yum安装LAMP(Apache+MySQL+PHP )
yum安装php,mysql日志(yum安装php5.6)
PHP日志:
CentOS 5.5使用yum安装Apache+PHP+MySQL
一、安装
centos 开发社区已发布了新的 5.5 版本。centos 5.5 基于 red hat enterpris linux 5.5.0,其中包括 kernel 2.6.18、
centos 5.5 支持 i386 及 x86_64 架构,其 iso 映像可从以下地址获取。http://www.wljcz.com/html/caozuoxitong/linux/2009/0726/409.html
二、系统安装
安装centos 5.5是做服务器,所以没有用的,一概不装;具体哪些不装,自己看着办吧:
三、安装apache+php+mysql
用yum安装前.先是替换为中国centos5.3镜像服务器!快速好用的yum更新源:http://www.wljcz.com/html/caozuoxitong/linux/2009/0726/410.html 此文章有详细的介绍,按照提供的步骤修改好更新源后,就可以方便的用yum命令快速安装软件了.
1、更新系统内核到最新. yum -y update
安装apahce, php, mysql, 以及php连接mysql库组件
代码:
yum -y install httpd php mysql mysql-server php-mysql
2、安装mysql扩展
代码:
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
或一次性粘贴安装:
代码:
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、设置mysql数据库root帐号密码。
代码:
mysqladmin -u root password ‘newpassword’
"newpassword" 代表的是你想要设置的密码,新安装的mysql的root根用户密码默认为空,设置密码后可以让mysql数据库更安全
代码:
mysql -u root -p (此时会要求你输入刚刚设置的密码,输入后回车即可)
mysql> drop database test; (删除test数据库)
mysql> delete from mysql.user where user = ”; (删除匿名帐户)
mysql> flush privileges; (重载权限)
4、按照以上的安装方式, 配置出来的默认站点目录为/var/www/html/新建一个php脚本:
代码:
phpinfo();
?>
四、 配置防火墙
添加允许访问http、ftp端口
代码:
iptables -i rh-firewall-1-input -m state --state new -m tcp -p tcp --dport 21 -j accept
iptables -i rh-firewall-1-input -m state --state new -m tcp -p tcp --dport 80 -j accept
重启iptables: service iptables restart
五、安装phpmyadmin
进入phpmyadmin官方下载phpmyadmin,3.1以上需php 5.2以上,上传到你的网站目录下,然后进行配置。只需几步即可搞定。
config.sample.inc.php更名为config.inc.php,然后打开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’;
去掉每行前面的//注释
$cfg[''blowfish_secret''] = ”; |修改为| $cfg[''blowfish_secret''] = ‘http’;
$cfg[''servers''][$i][''controluser''] = ‘pma’; |把’pma’修改为你的帐号|$cfg[''servers''][$i][''controlpass''] = ‘pmapass’; |把’pmapass设置为你的mysql登录密码
$cfg[''blowfish_secret''] = ”; | 添加短语密码例如:$cfg[''blowfish_secret''] = ‘onohot’;
六、安装php的扩展
代码:
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
七、安装apache扩展
代码:
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
到此为止centos5.3下的php环境基本就配置完成了,用命令启动服务即可使用。
八、如果想升级php的话
提及php需要升级到5.2以上,而centos 5.x目前提供php版本为5.1.6,
通过以下方法升级php到5.2比较方便,现推荐给大家。
先将以下地址导入。
# rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
# vi /etc/yum.repos.d/CentOS-Base.repo 增加下面信息
[utterramblings]
name=Jason''s Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
执行命令,自动升级。
立即学习“PHP免费学习笔记(深入)”;
yum update php -y
yum install libmcrypt -y
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 php mysql mysql-server php-mysql
//安装mysql扩展
[root@linuxfei ~]#yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
//安装php的扩展
[root@linuxfei ~]# yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
//安装apache扩展
[root@linuxfei ~]#yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
一次性粘贴安装:
[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 ''linuxfei'' [引号内填密码]
[root@linuxfei ~]# mysql -u root -p ← 通过空密码用root登录
Enter password:linuxfei ← 在这里输入密码
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/??????/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]
解压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
修改phpmyadmin根目录下的config.sample.inc.php 重命名为 config.inc.php
打开并编辑config.inc.php
$cfg[''blowfish_secret''] = '''';
然找到下边这两行 并把//去除
// $cfg[''Servers''][$i][''controluser''] = ''pma''; mysql用户名
// $cfg[''Servers''][$i][''controlpass''] = ''pmapass'' mysql密码
apache配置
/etc/httpd/conf/httpd.conf
最主要的配置文件,不过很多其他的distribution都将这个文件拆成数个小文件,分别管理不同的参数。但是最主要配置文件还是以这个文件名为主。
/etc/httpd/conf.d/*.conf
这个事CentOS的特色之一,如果你不想修改原始配置文件httpd.conf的话,那么可以将你自己的额外参数独立出来,而启动apache时,这个文件就会被读入到主要配置文件。
/usr/lib/httpd/modules
apache支持很多的模块,所以您想要使用的模块默认都放置在此目录
/var/www/html
这里是CentOS默认的“首页”所在目录。
/var/www/error
如果因为主机设置错误,或者是浏览器端要求的数据错误,在浏览器上出现的错误信息就已这个目录的默认信息为主。
/var/www/icons
提供apache的一些小图标
/var/www/cgi-bin
默认给一些可执行的CGI程序放置的目录
/var/log/httpd
默认apache的日志文件都放在这里,对于流量大的网站来说,这个目录要很小心,因为这个文件很容易变的很大,您需要足够的空间哦
/usr/sbin/apachectl
这是Apache的主要执行文件,这个执行文件其实是shell script,它可以主动检测系统上的一些设置值,好让您启动Apache时更简单
/usr/sbin/httpd
这是主要的apache的二进制文件
/usr/bin/htpasswd
当您想登陆某些网页时,需要输入账号与密码。那么Apache本身就提供一个最基本的密码保护方式。该密码的产生就是通过这个命令实现的
至于MySQL方面,您需要知道的几个重要目录与文件有以下几个:
/etc/my.cnf:这是Mysql的配置文件,包括您想要进行mysql数据库的最佳化,或者是正对mysql进行一些额外的参数指定,都可以在这个文件里实现
/usr/lib/mysql:这个目录是MySQL数据库放置的位置,当启动任何MySQL的服务器时,请务必记得在备份时,将此目录完整的备份下来。
另外,在PHP方面,应该了解以下几个文件。
/usr/lib/httpd/modules/libphp4.so:PHP提供给apache使用的模块,这个关系我们能否在apache网页上面设计php程序语言的最重要文件
/etc/httpd/conf.d/php.conf:你要不要手动将该模块写入Httpd.conf中呢?不需要,因为系统已经主动将php设置参数写入到这个文件中了,而这个文件会在apache重新启动时被读入。
/etc/php.ini:这是PHP的主要配置文件,包括PHP能不能允许用户上传文件,能不能允许某些低安全性的标志等,都在这个配置文件中设置。
/etc/php.d/mysql.ini /usr/lib/php4/mysql.so:PHP能否可以支持MySQL接口就看这两个文件了。这两个文件是由php-mysql软件提供的
/usr/bin/phpize /usr/include/php:如果您以后想要安装类似PHP加速器可以让浏览速度加快的话,那么这个文件与目录就需要存在,否则加速器软件没法用。
httpd.conf的基本设置
首先,你需要在/etc/hosts内需要有个一个完整的主机名,否则在重启apache服务时,会提示找不到完整的主机名。
httpd.conf的基本设置是这样的:
次设置项目内的相关参数
。。。。
例如,你想要针对首页/var/www/html提供额外的功能,那么可以进行如下设置:
Options Indexes
......
针对主机环境的设置项目
#vi /etc/httpd/conf/httpd.conf
ServerTokens OS
# 这个项目在告诉客户端WWW服务器的版本和操作系统,不需要改编它
#如果你不想告诉太多的主机信息,将这个项目的OS改成Minor
ServerRoot "/etc/httpd"
#这个是设置文件的最顶层目录,通常使用绝对路径,下面某些数据设置使用相对路径时
#就是与这个目录设置值有关的下层目录,不需要更改它
ServerRoot
设定Apache 安装的绝对路径
TimeOut
设定 服务器接收至完成的最长等待时间
KeepAlive
设定服务器是否开启连续请求功能,真实服务器一般都要开启
Port
设定http服务的默认端口。
User/Group
设定 服务器程序的执行者与属组,这个一般是apache
下面我们就针对Apache做几个实验
1:我们测试把默认网站目录改到root家目录下
新建/root/website目录
#mkdir -p /root/website
#echo "website page" >> /root/website/index.html
#vi /etc/httpd/conf/httpd.conf
找到 DocumentRoot "/var/www/html" 这一段 //apache的根目录
把/var/www/html 这个目录改到 /root/website
在找到 //定义apache /var/www/html这个区域
把 /var/www/html改成/root/website
这样我们就把apahce的默认路径改掉了
然后重启服务
#service httpd restart
//这里在你重启服务的时候,可能会报错,说找不到目录,这个主要是由于selinux导致的
那怎么解决呢?有2个办法,关掉selinux
#setenforce 0
或者更改/root/website这个文件的selinux属性,让它匹配httpd这个服务器的要求
怎么改?我们可以复制/var/www/html这个目录的selinux属性
#chcon -R --reference /var/www/html /root/website
然后在重启服务,之后你就看到它没有报错了
不过你去访问localhost的时候,会发现访问拒绝 这是为什么呢?主要是因为你的/root的权限是750,ahache这个用户没有权限访问,你需要更改掉权限,可以这样改
#chmod -R 755 /root
然后去访问 发现正常了
2:基于名称的虚拟主机
需要两个域名解析到你的服务器,对应关系是
/var/www/server server.example.com
/var/www/client client.example.com
当访问这两个域名时,可以分别显示出不同文件里面主页的内容
#echo "server page" >> /var/www/server/index.html
#echo "client page" >> /var/www/client/index.html
然后我们编辑一个配置文件
#vi /etc/httpd/conf.d/virtual.conf //记住conf.d里面的内容也是apache的配置文件
添加如下内容:
NameVirtualHost 192.168.76.133:80
ServerName service.example.com
DocumentRoot /var/www/server
ServerName client.example.com
DocumentRoot /var/www/client
#service httpd restart
这样基于名称的虚拟主机就配置好了
如果你没有DNS你可以再你的机器上hosts文件里加记录 linux在/etc/hosts这个文件 windows在C:\windows\system32\drivers\etc\hosts文件
加上这两行
192.168.76.133 server.example.com
192.168.76.133 client.example.com
这样你在去测试,就会发现访问不同的域名显示不同的内容了 这样基于名称的虚拟主机就配置好了!
3:基于IP地址的虚拟主机
先添加一个临时网卡
#ifconfig eth0:0 192.168.76.132 //临时使用,重启后就会消失
然后便捷virtual.conf文件
#vi /etc/httpd/conf.d/virtual.conf
把内容修改为
#NameVirtualHost 192.168.76.133:80
ServerName service.example.com
DocumentRoot /var/www/server
ServerName client.example.com
DocumentRoot /var/www/client
让后你在用ip访问,发现也能显示不同的内容,或者你编辑hosts文件,用域名访问也没问题
这样基于IP地址的虚拟主机也成功了!
4:别名
在/etc/httpd/conf/httpd.conf里加入
Alias /test "/root/website/" // 别名 这样你用192.168.76.133/test访问 也会显示192.168.76.133的页面
这个地方需要注意的就是/test 还是/test/ 这个是用区别的 你用/test 那么你访问的时候只能用192.168.76.133/test访问 如果你用/test/ 那么192.168.76.133/test/访问,而/test将不会放你访问
忘了这里你的先把/etc/httpd/conf.d目录里面刚刚设置的虚拟目录注释掉 不然没法访问,是因为做了虚拟目录,而httpd.conf里面的设置就无法访问 当然可以用localhost来访问,其他的访问都不行
5:实现网页的资源下载
首先添加别名
#vi /etc/httpd/conf/httpd.conf
在Alias /test "/root/website/" 后面加入
Alias /down "/var/ftp/pub"
让后对/var/ftp/pub区域设置参数
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
在Options 加入 MultiViews //没有index时自动列出目录文档
然后重启服务,这样http://192.168.76.133/down/里面就可以列出/var/ftp/pub里面的文件了,试着点一个另存为,是否可以下载? 呵呵 成功!
6:.htpasswd的实现
#vi /etc/httpd/conf/httpd.conf
我们针对刚刚做的/var/ftp/pub来做
加入如下信息
Alias /down "/var/ftp/pub/"
Options Indexes MultiViews
AllowOverride AuthConfig
Order allow,deny
Allow from all
AuthType Basic
AuthName "this is test"
AuthUserFile /etc/httpd/htpasswd
Require User test
然后重启httpd服务,
让后生成.htpasswd用户密码
htpasswd -c /etc/httpd/htpasswd test
让后去访问192.168.76.133/down会需要密码
这样就成功了
本文来自qkweb.net,转载请标明出处 http://www.qkweb.net/showa/715.html
CentOS 5.9 yum安装LAMP(Apache+MySQL+PHP)
1、 yum -y install mysql mysql-server /*yum安装MySQL*/2、chkconfig --levels 235 mysqld on /*设置开机启动*/
3、以MySQL用户root登陆: mysql -u root 登陆后设置root密码: set password for root@localhost=password('' 在这里填入root密码 '');
4、yum安装apache
yum –y install httpd
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
5、yum安装PHP:
yum –y install php
/etc/init.d/httpd restart
yum search php /*搜索可用的php模块*/
yum –y install php-mysql php-common php-mbstring php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
/*选择需要的模块进行安装*/
/etc/init.d/httpd restart
CentOS 6 yum安装 Nginx1.6 + MySQL5.5 + PHP5.6
CentOS 6.8 yum安装 Nginx
下载nginx yum源
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
安装
rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm //得到yum源文件nginx.repo
显示结果 yum list | grep nginx
nginx-release-centos.noarch 6-0.el6.ngx installed
nginx.x86_64 1.16.0-1.el6.ngx nginx
nginx-debug.x86_64 1.8.0-1.el6.ngx nginx
nginx-debuginfo.x86_64 1.16.0-1.el6.ngx nginx
nginx-module-geoip.x86_64 1.16.0-1.el6.ngx nginx
nginx-module-geoip-debuginfo.x86_64 1.16.0-1.el6.ngx nginx
nginx-module-image-filter.x86_64 1.16.0-1.el6.ngx nginx
nginx-module-image-filter-debuginfo.x86_64 1.16.0-1.el6.ngx nginx
nginx-module-njs.x86_64 1.16.0.0.3.2-1.el6.ngx nginx
nginx-module-njs-debuginfo.x86_64 1.16.0.0.3.2-1.el6.ngx nginx
nginx-module-perl.x86_64 1.16.0-1.el6.ngx nginx
nginx-module-perl-debuginfo.x86_64 1.16.0-1.el6.ngx nginx
nginx-module-xslt.x86_64 1.16.0-1.el6.ngx nginx
nginx-module-xslt-debuginfo.x86_64 1.16.0-1.el6.ngx nginx
nginx-nr-agent.noarch 2.0.0-12.el6.ngx nginx
pcp-pmda-nginx.x86_64 3.10.9-9.el6 base
安装nginx
yum install nginx.x86_64
启动
service nginx start
Nginx 配置 php
server {
listen 80;
server_name localhost;
root /www/video; #放在外面
index index.php;
charset utf-8;
error_log /root/nginx.error.log error;
access_log /root/nginx.access.log main;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$; #开启path_info
fastcgi_param PATH_INFO $fastcgi_path_info; #开启path_info
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
include /etc/nginx/maccms.conf; #开启伪静态
}
CentOS 6.5下yum安装 MySQL5.5
检查是否安装过
1. rpm -qa|grep mysql 是否安装过mysql5.1有就卸载.
2. 卸载命令:rpm -e mysql-libs --nodeps
添加repo(需要增加两个repo)
//下载
wget http://mirror.steadfast.net/epel/6/i386/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
//添加
rpm -Uvh http://mirror.steadfast.net/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
检查是否增加成功
yum --enablerepo=remi,remi-test list mysql mysql-server
安装MySQL5.5
yum --enablerepo=remi,remi-test install mysql mysql-server
启动一下MySQL
/etc/init.d/mysqld start
开机自启动
chkconfig --levels 345 mysqld on
启用MySQL安全设置
/usr/bin/mysql_secure_installation
验证一下MySQL是否安装成功
mysql -uroot -p12345
配置my.ini
vi /etc/my.cnf
Centos 6.x/7.x yum安装php5.6
检查当前安装的PHP包
yum list installed | grep php
如果有安装的PHP包,先删除他们
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
配置yum源
//以下是CentOS 6的源。
rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
//以下是CentOS 7.0的源。
yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
使用yum list命令查看可安装的包(Packege)。
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
安装PHP5.6.x
yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-gd php-redis
安装PHP-fpm
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm
安装GD库
yum --enablerepo=remi-php56 install php-gd
CentOS 6.3 yum安装LAMP(Apache+MySQL+PHP )
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE ! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we''ll need the current password for the root user . If you''ve just inst
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we''ll need the current
password for the root user. If you''ve just installed MySQL, and
you haven''t set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
- This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n]
... Success!
Normally, root should only be allowed to connect from ''localhost''. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n]
... Success!
By default, MySQL comes with a database named ''test'' that anyone can
- This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n]
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n]
... Success!
Cleaning up...
All done! If you''ve completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
关于yum安装php,mysql日志和yum安装php5.6的介绍已经告一段落,感谢您的耐心阅读,如果想了解更多关于CentOS 5.5使用yum安装Apache+PHP+MySQL、CentOS 5.9 yum安装LAMP(Apache+MySQL+PHP)、CentOS 6 yum安装 Nginx1.6 + MySQL5.5 + PHP5.6、CentOS 6.3 yum安装LAMP(Apache+MySQL+PHP )的相关信息,请在本站寻找。
本文标签: