阿里云linux一键安装web环境 升级

说是升级,实际是重装了,

mv www /home/www
mv rewrite /home/rewrite/
mv vhosts /home/vhosts
mv mysql/var /home/var

然后下载最新的一键安装脚本,http://market.aliyun.com/product/12-121590002-cmgj000262.html?spm=5176.775974333.2.4.Q5uTDp
进到脚本目录执行./install.sh,等待一段时间,估计半个小时。
安装完成后,提示如下,
---------- make dir ok ----------
---------- env ok ----------
---------- mysql-5.6.21 ok ----------
---------- nginx-1.4.4 ok ----------
---------- php-5.3.29 ok ----------
---------- php extension ok ----------
---------- vsftpd-2.3.5 ok ----------
---------- phpwind-8.7 ok ----------
---------- phpmyadmin-4.1.8 ok ----------
---------- web init ok ----------
---------- rc init ok ----------
---------- mysql init ok ----------

修改mysql数据库密码 :set password for 'root'@'localhost' = PASSWORD('XXXXXXX')

然后:
mv /home/www www
mv /home/rewrite/ rewrite
mv /home/vhosts vhosts
mv /home/var var

修改/etc/my.cnf:增加 :datadir=/alidata/server/mysql/var

重启了下机器,

ps -ef|grep mys

发现没有相应进程,
手动启动mysql,/etc/init.d/mysqld start

Starting MySQL.The server quit without updating PID file (/var/lib/mysql/tserver.pid).[FAILED]

查看了下日志

150330 01:17:34 mysqld_safe mysqld from pid file /alidata/server/mysql/var/AY130302115939322bd1.pid ended
150330 01:19:31 mysqld_safe Starting mysqld daemon with databases from /alidata/server/mysql/var
2015-03-30 01:19:31 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more detail
s).
2015-03-30 01:19:31 5193 [Note] Plugin 'FEDERATED' is disabled.
2015-03-30 01:19:31 5193 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-03-30 01:19:31 5193 [Note] InnoDB: The InnoDB memory heap is disabled
2015-03-30 01:19:31 5193 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-03-30 01:19:31 5193 [Note] InnoDB: Memory barrier is not used
2015-03-30 01:19:31 5193 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-03-30 01:19:31 5193 [Note] InnoDB: Using Linux native AIO
2015-03-30 01:19:31 5193 [Note] InnoDB: Using CPU crc32 instructions
2015-03-30 01:19:31 5193 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-03-30 01:19:31 5193 [Note] InnoDB: Completed initialization of buffer pool
2015-03-30 01:19:31 5193 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pag
es, max 0 (relevant if non-zero) pages!
2015-03-30 01:19:31 5193 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you shou
ld now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zero
s, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2015-03-30 01:19:31 5193 [ERROR] Plugin 'InnoDB' init function returned error.
2015-03-30 01:19:31 5193 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-03-30 01:19:31 5193 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-03-30 01:19:31 5193 [ERROR] Aborting

2015-03-30 01:19:31 5193 [Note] Binlog end
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'partition'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'BLACKHOLE'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_METRICS'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_CMPMEM'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_CMP'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_LOCKS'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'INNODB_TRX'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'ARCHIVE'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'MyISAM'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'CSV'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'MRG_MYISAM'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'MEMORY'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'sha256_password'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'mysql_old_password'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'mysql_native_password'
2015-03-30 01:19:31 5193 [Note] Shutting down plugin 'binlog'
2015-03-30 01:19:31 5193 [Note] /alidata/server/mysql/bin/mysqld: Shutdown complete

百度了一下,解决方法,删除下面文件,再启动就ok了:

mv ibdata1 /home/ibdata1
mv ib_logfile0 /home/ib_logfile0
mv ib_logfile1 /home/ib_logfile1
mv mysql-bin.000001 /home/mysql-bin.000001

此时打开博客,发现出现502 bad gateway nginx,但是打开其他静态页面有正常,百度了没有找到看起来像能解决的方法;
郁闷,nginx -t 报log_format 警告,将vhosts下的配置文件中的
log_format '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

删除后,nginx -t 正常,重启后发现还是502,无语了;
然后想着,所有进程都重启下吧,
root@AY130302115939322bd1:/alidata/server/php/etc# /etc/init.d/php-fpm restart
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting php-fpm done

我擦,为什么不会开机自启动,再去刷新页面 ok了,

php-fpm 开机为什么没起来
[30-Mar-2015 00:27:43] NOTICE: fpm is running, pid 2994
[30-Mar-2015 00:27:43] NOTICE: ready to handle connections
[30-Mar-2015 00:28:20] NOTICE: Finishing ...
[30-Mar-2015 00:28:20] NOTICE: exiting, bye-bye!
[30-Mar-2015 00:28:21] NOTICE: fpm is running, pid 5984
[30-Mar-2015 00:28:21] NOTICE: ready to handle connections
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5985 exited on signal 15 (SIGTERM) after 672.692836 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6702 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5986 exited on signal 15 (SIGTERM) after 672.692858 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6703 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5987 exited on signal 15 (SIGTERM) after 672.692836 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6704 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5988 exited on signal 15 (SIGTERM) after 672.692811 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6705 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5989 exited on signal 15 (SIGTERM) after 672.692809 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6706 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5990 exited on signal 15 (SIGTERM) after 672.692849 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6707 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5991 exited on signal 15 (SIGTERM) after 672.692889 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6708 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5992 exited on signal 15 (SIGTERM) after 672.692927 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6709 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5993 exited on signal 15 (SIGTERM) after 672.703991 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6710 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5994 exited on signal 15 (SIGTERM) after 672.704049 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6711 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5995 exited on signal 15 (SIGTERM) after 672.704152 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6713 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5997 exited on signal 15 (SIGTERM) after 672.706674 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6715 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5998 exited on signal 15 (SIGTERM) after 672.706725 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6716 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 5999 exited on signal 15 (SIGTERM) after 672.706905 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6717 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 6000 exited on signal 15 (SIGTERM) after 672.706947 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6718 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 6001 exited on signal 15 (SIGTERM) after 672.707086 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6719 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 6002 exited on signal 15 (SIGTERM) after 672.707264 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6720 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 6003 exited on signal 15 (SIGTERM) after 672.707440 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6721 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 6004 exited on signal 15 (SIGTERM) after 672.707619 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6722 started
[30-Mar-2015 00:39:33] WARNING: [pool www] child 6005 exited on signal 15 (SIGTERM) after 672.711375 seconds from start
[30-Mar-2015 00:39:33] NOTICE: [pool www] child 6723 started
[30-Mar-2015 00:39:33] NOTICE: Terminating ...
[30-Mar-2015 00:39:33] NOTICE: exiting, bye-bye!
[30-Mar-2015 01:42:40] NOTICE: fpm is running, pid 1575
[30-Mar-2015 01:42:40] NOTICE: ready to handle connections
[30-Mar-2015 02:04:50] WARNING: [pool www] child 1576 exited on signal 15 (SIGTERM) after 1330.160514 seconds from start
[30-Mar-2015 02:04:50] NOTICE: [pool www] child 2206 started
[30-Mar-2015 02:04:50] WARNING: [pool www] child 1582 exited on signal 15 (SIGTERM) after 1330.159393 seconds from start
[30-Mar-2015 02:04:50] NOTICE: [pool www] child 2207 started
[30-Mar-2015 02:04:50] WARNING: [pool www] child 1590 exited on signal 15 (SIGTERM) after 1330.148152 seconds from start
[30-Mar-2015 02:04:50] NOTICE: [pool www] child 2208 started
[30-Mar-2015 02:04:50] WARNING: [pool www] child 1593 exited on signal 15 (SIGTERM) after 1330.147688 seconds from start
[30-Mar-2015 02:04:50] NOTICE: [pool www] child 2209 started
[30-Mar-2015 02:04:50] NOTICE: Terminating ...
[30-Mar-2015 02:04:50] NOTICE: exiting, bye-bye!
[30-Mar-2015 02:06:23] NOTICE: fpm is running, pid 1355
[30-Mar-2015 02:06:23] NOTICE: ready to handle connections

chkconfig
aegis on
aliyun-rdate 2345
apparmor on
atd off
bind9 on
bootlogd off
console-setup off
cron off
dbus off
dmesg off
dns-clean on
friendly-recovery off
grub-common on
hostname off
hwclock off
hwclock-save off
i2cs off
i2node off
irqbalance off
killprocs on
module-init-tools off
mysqld off
network-interface off
network-interface-container off
network-interface-security off
networking 0
nginx off
ntp on
ondemand on
passwd off
php-fpm off

## 设置开机自启
chkconfig php-fpm on
/sbin/insserv: No such file or directory

whereis insserv
insserv: /etc/insserv /etc/insserv.conf /usr/lib/insserv /usr/share/insserv /usr/share/man/man8/insserv.8.gz

ln -s /usr/lib/insserv/insserv /sbin/insserv

chkconfig php-fpm on
chkconfig nginx on
chkconfig mysqld on

再次尝试重启机器,运行正常。

未经允许不得转载:ganlei的个人博客 » 阿里云linux一键安装web环境 升级

赞 (0)
分享到:更多 ()