wdcp-php升级到5.4

下载脚本并解压后上传到自己的安装目录
下载地址:http://pan.baidu.com/s/1dD9vXBV

  • 更新mysql
    sh mysql_up55.sh
  • 更新php
    sh php_up54.sh
    如果需要安装其它版本用这样即可:sh php_up54.sh 版本号,如最新的版本号是5.5.15,使用sh php_up54.sh 5.5.15即可
  • 更新Zendguard
    sh Zendguard6.sh
  • 安装好zend后记得重启下web服务器
wangxiong@Dell:~/Soft/lanmp_dir$ sudo service httpd restart
[sudo] password for wangxiong: 
AH00543: httpd: bad user name www
   ...fail!

网上方案:
http://superuser.com/questions/525348/httpd-bad-user-name-apache

wangxiong@Dell:~/Soft/lanmp_dir$ /etc/init.d/httpd configtest
 * Usage: /etc/init.d/httpd {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}

定位httpd.conf

wangxiong@Dell:~/Soft/lanmp_dir$ locate httpd.conf
wangxiong@Dell:/www/wdlinux/httpd-2.4.18/conf$ gedit httpd.conf

定位www这个用户标记

# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User www
Group www

因为当前没有这个用户 和 用户组,所以启动不了httpd~
所以解决方案:

wangxiong@Dell:~/Soft/lanmp_dir$ groupadd www
groupadd: group 'www' already exists
wangxiong@Dell:~/Soft/lanmp_dir$ useradd -g www www
useradd: Permission denied.
useradd: cannot lock /etc/passwd; try again later.
wangxiong@Dell:~/Soft/lanmp_dir$ sudo useradd -g www www
[sudo] password for wangxiong: 

增加用户和用户组
启动:

wangxiong@Dell:~/Soft/lanmp_dir$ sudo service httpd restart
 * Restarting web server httpd  
wangxiong@Dell:~/Soft/lanmp_dir$ sudo service nginxd restart
Restarting nginx: nginx.

启动mySQL出错:
后台登录不了,急死宝宝了~~~

wangxiong@Dell:~/Soft/lanmp_dir$ sudo /etc/init.d/mysqld start
Starting MySQL. * The server quit without updating PID file (/www/wdlinux/mysql-5.5.36/data/Dell.pid).

修改权限:

wangxiong@Dell:/www/wdlinux/mysql-5.5.36$ ls
bin      data  include         lib  mysql-test  scripts  sql-bench      var
COPYING  docs  INSTALL-BINARY  man  README      share    support-files
wangxiong@Dell:/www/wdlinux/mysql-5.5.36$ ls -l
total 204
drwxr-xr-x  2 root  root    4096 Jul 30 00:04 bin
-rw-r--r--  1 root  root   17987 Jan 14  2014 COPYING
drwxr-xr-x  3 root  root    4096 Jul 30 10:36 data
drwxr-xr-x  2 root  root    4096 Jul 30 00:04 docs
drwxr-xr-x  3 root  root    4096 Jul 30 00:04 include
-rw-r--r--  1 root  root  133765 Jan 14  2014 INSTALL-BINARY
drwxr-xr-x  3 root  root    4096 Jul 30 00:04 lib
drwxr-xr-x  4 root  root    4096 Jul 30 00:04 man
drwxr-xr-x 10 root  root    4096 Jul 30 00:04 mysql-test
-rw-r--r--  1 root  root    2496 Jan 14  2014 README
drwxr-xr-x  2 root  root    4096 Jul 30 00:04 scripts
drwxr-xr-x 27 root  root    4096 Jul 30 00:04 share
drwxr-xr-x  4 root  root    4096 Jul 30 00:04 sql-bench
drwxr-xr-x  3 root  root    4096 Jul 30 00:04 support-files
drwx------  5 mysql mysql   4096 Jul 30 00:04 var
wangxiong@Dell:/www/wdlinux/mysql-5.5.36$ cd ..
wangxiong@Dell:/www/wdlinux$ ls
apache             etc           mysql         nginx        pureftpd-1.0.42
apache_php         httpd-2.4.18  mysql-5.5.36  nginx-1.8.1  wdcp
apache_php-5.4.26  init.d        mysql-5.5.49  php          wdcp_bk
apache_php-5.6.21  memcached     mysql_bk      pureftpd     Zend
wangxiong@Dell:/www/wdlinux$ cd mysql-5.5.36/
wangxiong@Dell:/www/wdlinux/mysql-5.5.36$ ls -l
total 204
drwxr-xr-x  2 root  root    4096 Jul 30 00:04 bin
-rw-r--r--  1 root  root   17987 Jan 14  2014 COPYING
drwxr-xr-x  3 root  root    4096 Jul 30 10:36 data
drwxr-xr-x  2 root  root    4096 Jul 30 00:04 docs
drwxr-xr-x  3 root  root    4096 Jul 30 00:04 include
-rw-r--r--  1 root  root  133765 Jan 14  2014 INSTALL-BINARY
drwxr-xr-x  3 root  root    4096 Jul 30 00:04 lib
drwxr-xr-x  4 root  root    4096 Jul 30 00:04 man
drwxr-xr-x 10 root  root    4096 Jul 30 00:04 mysql-test
-rw-r--r--  1 root  root    2496 Jan 14  2014 README
drwxr-xr-x  2 root  root    4096 Jul 30 00:04 scripts
drwxr-xr-x 27 root  root    4096 Jul 30 00:04 share
drwxr-xr-x  4 root  root    4096 Jul 30 00:04 sql-bench
drwxr-xr-x  3 root  root    4096 Jul 30 00:04 support-files
drwx------  5 mysql mysql   4096 Jul 30 00:04 var
wangxiong@Dell:/www/wdlinux/mysql-5.5.36$ chown mysql.mysql *
chown: changing ownership of ‘bin’: Operation not permitted
chown: changing ownership of ‘COPYING’: Operation not permitted
chown: changing ownership of ‘data’: Operation not permitted
chown: changing ownership of ‘docs’: Operation not permitted
chown: changing ownership of ‘include’: Operation not permitted
chown: changing ownership of ‘INSTALL-BINARY’: Operation not permitted
chown: changing ownership of ‘lib’: Operation not permitted
chown: changing ownership of ‘man’: Operation not permitted
chown: changing ownership of ‘mysql-test’: Operation not permitted
chown: changing ownership of ‘README’: Operation not permitted
chown: changing ownership of ‘scripts’: Operation not permitted
chown: changing ownership of ‘share’: Operation not permitted
chown: changing ownership of ‘sql-bench’: Operation not permitted
chown: changing ownership of ‘support-files’: Operation not permitted
chown: changing ownership of ‘var’: Operation not permitted
wangxiong@Dell:/www/wdlinux/mysql-5.5.36$ sudo chown mysql.mysql *
[sudo] password for wangxiong: 
wangxiong@Dell:/www/wdlinux/mysql-5.5.36$ ls -l
total 204
drwxr-xr-x  2 mysql mysql   4096 Jul 30 00:04 bin
-rw-r--r--  1 mysql mysql  17987 Jan 14  2014 COPYING
drwxr-xr-x  3 mysql mysql   4096 Jul 30 10:36 data
drwxr-xr-x  2 mysql mysql   4096 Jul 30 00:04 docs
drwxr-xr-x  3 mysql mysql   4096 Jul 30 00:04 include
-rw-r--r--  1 mysql mysql 133765 Jan 14  2014 INSTALL-BINARY
drwxr-xr-x  3 mysql mysql   4096 Jul 30 00:04 lib
drwxr-xr-x  4 mysql mysql   4096 Jul 30 00:04 man
drwxr-xr-x 10 mysql mysql   4096 Jul 30 00:04 mysql-test
-rw-r--r--  1 mysql mysql   2496 Jan 14  2014 README
drwxr-xr-x  2 mysql mysql   4096 Jul 30 00:04 scripts
drwxr-xr-x 27 mysql mysql   4096 Jul 30 00:04 share
drwxr-xr-x  4 mysql mysql   4096 Jul 30 00:04 sql-bench
drwxr-xr-x  3 mysql mysql   4096 Jul 30 00:04 support-files
drwx------  5 mysql mysql   4096 Jul 30 00:04 var

看一下启动的是mysql所在路径

gedit /www/wdlinux/init.d/mysqld
# Set some defaults
mysqld_pid_file_path=
if test -z "$basedir"
then
  basedir=/www/wdlinux/mysql-5.5.36
  bindir=/www/wdlinux/mysql-5.5.36/bin
  if test -z "$datadir"
  then
    datadir=/www/wdlinux/mysql-5.5.36/data
  fi
  sbindir=/www/wdlinux/mysql-5.5.36/bin
  libexecdir=/www/wdlinux/mysql-5.5.36/bin
else
  bindir="$basedir/bin"
  if test -z "$datadir"
  then
    datadir="$basedir/data"
  fi
  sbindir="$basedir/sbin"
  libexecdir="$basedir/libexec"
fi

网上又查了下,是设置问题

sudo vim /www/wdlinux/init.d/mysqld 
basedir=/www/wdlinux/mysql
datadir=/www/wdlinux/mysql/var

我擦,还是登录不进去

wangxiong@Dell:/www/wdlinux/mysql$ sudo service mysqld restart
 * MySQL server PID file could not be found!
Starting MySQL... * The server quit without updating PID file (/www/wdlinux/mysql/var/Dell.pid).

看下文件权限:

wangxiong@Dell:/www/wdlinux/mysql$ ls -l
total 204
drwxr-xr-x  2 root  root    4096 Jul 30 00:04 bin
-rw-r--r--  1 root  root   17987 Jan 14  2014 COPYING
drwxr-xr-x  3 root  root    4096 Jul 30 11:03 data
drwxr-xr-x  2 root  root    4096 Jul 30 00:04 docs
drwxr-xr-x  3 root  root    4096 Jul 30 00:04 include
-rw-r--r--  1 root  root  133765 Jan 14  2014 INSTALL-BINARY
drwxr-xr-x  3 root  root    4096 Jul 30 00:04 lib
drwxr-xr-x  4 root  root    4096 Jul 30 00:04 man
drwxr-xr-x 10 root  root    4096 Jul 30 00:04 mysql-test
-rw-r--r--  1 root  root    2496 Jan 14  2014 README
drwxr-xr-x  2 root  root    4096 Jul 30 00:04 scripts
drwxr-xr-x 27 root  root    4096 Jul 30 00:04 share
drwxr-xr-x  4 root  root    4096 Jul 30 00:04 sql-bench
drwxr-xr-x  3 root  root    4096 Jul 30 00:04 support-files
drwx------  5 mysql mysql   4096 Jul 30 11:13 var

修改为mysql权限,启动也不行!
修改my.cnf权限,不能解决!

wangxiong@Dell:/www/wdlinux/etc$ sudo chmod 777 my.cnf 
wangxiong@Dell:/www/wdlinux/etc$ ls
memcached.conf  my.cnf  php.ini  pure-ftpd.conf  pureftpd-mysql.conf

一切回到解放前!
从头来过:
升级数据库

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/www/wdlinux/mysql/bin/mysqladmin -u root password 'new-password'
/www/wdlinux/mysql/bin/mysqladmin -u root -h  password 'new-password'

Alternatively you can run:
/www/wdlinux/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /www/wdlinux/mysql ; /www/wdlinux/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /www/wdlinux/mysql/mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

cp: cannot stat ‘/www/wdlinux/mysql_bk/*’: No such file or directory
 * MySQL server PID file could not be found!
Starting MySQL. * The server quit without updating PID file (/www/wdlinux/mysql-5.5.36/data/Dell.pid).

sh: /www/wdlinux/tools/mysql_wdcp_chg.sh: No such file or directory

mysql update is OK
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值