Pages

2017年12月26日 星期二

CentOS 6.x安裝PHP 5.5 與MySQL 5.5



  1. wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
  2. wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
  3. rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
  4. yum --enablerepo=remi update -y
  5. # update php5
  6. yum --enablerepo=remi,remi-php55 update -y
  7.  
  8. yum clean all
  9. yum remove mysql* php* mysql-libs-5.1.73-5.el6_6.x86_64
  10. yum remove php*
  11. yum --enablerepo=remi install mysql mysql-server mysql-connector-odbc mysql-devel libdbi-dbd-mysql
  12. yum --enablerepo=remi install php php-fpm php-gd php-cli php-pdo php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml php-xmlrpc php-pear php-pecl-memcache php-eaccelerator php-bcmath php-sqlite php-xnmp php-ldap php-pear php-devel
  13. yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
  14.  
  15. vim /etc/php.ini
  16. #修改php.ini中的屬性值
  17. date.timezone = "Asia/Taipei"
  18. short_open_tag = on
  19.  
  20. # Mysql 5.5 啟動與設定
  21. vim /etc/my.cnf
  22. #設定MySQL編碼
  23. [mysqld]
  24. .....
  25. character-set-server=utf8
  26. collation-server=utf8_general_ci
  27.  
  28. #編輯完後啟動Mysqld
  29. service mysqld start
  30. mysqladmin -u root password 'PASSWORDS'
  31. mysqladmin --user=root --password reload
  32. chkconfig --level 2345 mysqld on
  33.  
  34. service httpd restart

Related Posts:

  • CentOS 6.9上修改TimeZone方式在Azure上的CentOS 6.9上修改TimeZone的方式如下: vim /etc/sysconfig/clock #下方為m原本的位置是在America,修改成您想要的位置。 Zone=“Asia/Shanghai” 接下來,透過以下Shell指令,我們可以將修改好的TimeZone設定生效。 cp /etc/localtime /root/old.timezone rm -rf /etc/localtime #要與TimeZ… Read More
  • Linux nohup with out nohup.outThe command is below: nohup some_command > /dev/null 2>&1& for example: nohup /jboss-eap-6.0/bin/standalone.sh -Djboss.server.base.dir=/jboss-eap-6.0/test -Djboss.server.log.dir=d:/webaplog/test > /dev/null … Read More
  • CentOS 6.x安裝PHP 5.5 與MySQL 5.5 wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm yum --enablerepo=remi update -y … Read More
  • 【Shell】Mysql Dump多個MySQL資料庫透過vi寫一個備份MySQL多個資料的 db_backup.sh db_backup.sh檔案內容: #!/bin/sh . ~/.bashrc for DB in db1 db2 db3 do DATE=`date +%Y-%m-%d` HOST="xxx.xxx.xxx.xxx" DEST=/db_backup/${HOST}_mysql_dump_${DB}_${DATE}.sql ### dump db mysqldump --… Read More
  • CentOS 6.9安裝Python 2.7與Azure CLI在Azure上的CentOS 6.9安裝Azure CLI方式如下: # 安裝Python 2.7 wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64//python27-libs-2.7.14-1.ius.centos6.x86_64.rpm rpm -Uvh python27-libs-2.7.14-1.ius.centos6.x86_64.rpm rm -rf p… Read More

0 意見: