ubuntu apt-get出错 mysql无法启动 问题解决

早上像往常一样打开phpstorm改项目,然后上传到服务器,结果报错了,信息如下。

Failed to transfer file 'F:\workspace\www\tickets\addons\zc_shop\core\model\common.php': could not close the output stream for file "sftp://117.34.000.64/addons/zc_shop/core/model/common.php".

百思不得其解啊,然后试了一下其他的服务器都没有问题,唯独这个服务器,就是除了问题。

再打开这个服务器的其他网站,统统无法访问。。。。

懵逼30s,,,,

 重启apache,无效。

重启服务器,无效。

更新源,出错

oot@cloud:~# apt-get update

Ign http://cn.archive.ubuntu.com trusty InRelease                   

Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB]

Hit http://ppa.launchpad.net trusty InRelease                                  

Ign http://ppa.launchpad.net trusty InRelease                                  

E: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures were invalid: NODATA 2

重启数据库,

 

ubuntu apt-get出错 mysql无法启动 问题解决_第1张图片

刚开始以为是数据库连接数的问题,就改了配置文件 vi  /etc/mysql/my.cnf

port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 160M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
max_connections=100

无效

话不多说,马上联系天互的运维,在他的指导下,终于一步步得到了解决。

原因:  /tmp文件夹满了(最后一行)

linux文件介绍参考:Linux文件系统的结构,Linux系统根目录介绍

 ubuntu apt-get出错 mysql无法启动 问题解决_第2张图片

 

解决方案:

扩容  /tmp

参考文献:Linux下两种增加/tmp文件的方法

当然作为一个新手的我,选择的是第二种方案。

vim /etc/fsta

加入如下内容

tmpfs /tmp      tmpfs defaults,size=15G          0 0 

重启服务器后所有问题迎刃而解。

你可能感兴趣的:(Ubuntu,apt-get出错,mysql无法启动,could,not,close,the,output,The,following,signatures)