qq分分彩app|qq分分彩开奖记录官网

CentOS 6.x LAMP配置 mysql5.7.7+php5.6

瀏覽:73 發布日期:2019/04/05 分類:求助交流 關鍵字: LAMP配置
到http://dev.mysql.com/downploads/repo/yum/下載centos6.x的rpm文件,我們選擇:

Red Hat Enterprise Linux 6 / Oracle Linux 6 (Architecture Independent), RPM Package



直接wget下載到/var目錄:

1.
2.
1.
# cd /var/# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
下載后我們在/var/下會發現mysql-community-release-el6-5.noarch.rpm這個文件;



安裝RPM文件

1.
1.
# sudo yum localinstall mysql-community-release-el6-5.noarch.rpm


查看RPM文件是否安裝成功:

1.
1.
# yum repolist all| grep "mysql.*-community.*"
如果安裝好會出現:

1.
2.
3.
4.
5.
6.
1.
mysql55-community MySQL 5.5 Community Server disabledmysql55-community-source MySQL 5.5 Community Server - So disabledmysql56-community MySQL 5.6 Community Server enabledmysql56-community-source MySQL 5.6 Community Server - So disabledmysql57-community-dmr MySQL 5.7 Community Server Deve disabled mysql57-community-dmr-source MySQL 5.7 Community Server Deve disabled
禁用老版本的mysql,并啟用mysql5.7

1.
2.
1.
# sudo yum-config-manager --disable mysql56-community# sudo yum-config-manager --enable mysql57-community-dmr
查看是否啟用成功:

1.
1.
# yum repolist enabled | grep mysql

安裝mysql:

1.
1.
# sudo yum install mysql-community-server
下載中...(那天等了好久喲,不知是不是自己人品不行),這里要回答幾個Yes;

安裝好后,開啟一下mysql:

1.
1.
# sudo service mysqld start
提示:

1.
1.
Starting mysqld: [ OK ]
設置mysql開機啟動:

1.
1.
# chkconfig --levels 235 mysqld on
先關閉mysql:

1.
1.
# sudo service mysqld stop
設置mysql密碼:(這里比較難懂,mysql5.7.7默認給你設置了一個初始密碼,但又不告訴你,所以只能做忘記root密碼處理了)

1.
1.
# mysqld_safe --skip-grant-tables & mysql -u root -p
會提示輸入密碼,這里直接回車



更新一下mysql權限:

1.
1.
mysql> FLUSH PRIVILEGES; (這里是mysql的語句FLUSH PRIVILEGES;)
修改密碼:

1.
1.
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass'; (MyNewPass就是你的新密碼)
最后退出mysql:

1.
1.
mysql> \q;
重啟mysql:

1.
1.
# sudo service mysql restart
密碼修改完畢,嘗試用新密碼登錄:

1.
1.
# mysql -u root -p
提示輸入密碼,輸入你剛修改的密碼就行了;



二.安裝并配置Apache
安裝apache:

1.
1.
# yum -y install httpd
設置apache開機啟動:

1.
1.
# chkconfig --levels 235 httpd on
開啟apache:

1.
1.
# service httpd start
測試:現在直接在瀏覽器鍵入

https://www.thinkcmf.com/user/index/index/id/10604.html

https://www.thinkcmf.com/user/index/index/id/10607.html

https://www.thinkcmf.com/user/index/index/id/10608.html

https://www.thinkcmf.com/user/index/index/id/10609.html

https://www.thinkcmf.com/user/index/index/id/10610.html

https://www.thinkcmf.com/user/index/index/id/10611.html

https://www.thinkcmf.com/user/index/index/id/10612.html

https://www.thinkcmf.com/user/index/index/id/10613.html

https://www.thinkcmf.com/user/index/index/id/10614.html

https://www.thinkcmf.com/user/index/index/id/10615.html

https://www.thinkcmf.com/user/index/index/id/10616.html

https://www.thinkcmf.com/user/index/index/id/10617.html

https://www.thinkcmf.com/user/index/index/id/10618.html

https://www.thinkcmf.com/user/index/index/id/10619.html

https://www.thinkcmf.com/user/index/index/id/10621.html

https://www.thinkcmf.com/user/index/index/id/10620.html

https://www.thinkcmf.com/user/index/index/id/10622.html

https://www.thinkcmf.com/user/index/index/id/10623.html

https://www.thinkcmf.com/user/index/index/id/10624.html

三.安裝并配置PHP5.6
添加php5.6的源

1.
1.
# rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
安裝php模塊:(這里列出的都是一些常用的,如果不需要可以選擇性安裝)

1.
1.
yum install php56w php56w-common php56w-gd php56w-imap php56w-intl php56w-ldap php56w-mbstring php56w-mcrypt php56w-mssql php56w-mysqlnd php56w-odbc php56w-pdo php56w-pgsql php56w-snmp php56w-soap php56w-tidy php56w-xml php56w-xmlrpc php56w-opcache php56w-pecl-memcache

這里有關于php5.6模塊的詳細說明,https://webtatic.com/packages/php56/



重啟apache:

1.
1.
# service httpd restart
四.安裝并配置phpMyAdmin
下載一個phpmyadmin的安裝包,放到可以訪問到的目錄就可以了



注:winscp是一個很不錯的linux資源管理工具,很類似ftp客戶端;
最佳答案
評論( 相關
后面還有條評論,點擊查看>>
qq分分彩app