ProdigYu's Blog

CentOS更新不升级内核设置

by on Feb.08, 2017, under Linux

修改yum的配置文件 vim /etc/yum.conf,在 [main] 的最后添加 exclude=kernel*

Leave a Comment : more...

Linode新KVM架构VPS更换内核以安装锐速BBR等程序

by on Jan.14, 2017, under Linux

安装Grub
安装过程中可能会询问安装位置,不需要安装到MBR

Arch Linux

pacman -S linux grub
CentOS 7

yum install kernel grub2
Debian

apt-get install linux-image-amd64 grub2
Fedora 22

dnf install kernel-core grub2
Ubuntu

apt-get install linux-image-virtual grub2
Gentoo (continue reading…)

Leave a Comment : more...

Supervisor守护Python进程

by on Jan.14, 2017, under Linux, Python

Debian下使用supervisor进程守护的方法

安装supervisor
apt-get install supervisor
配置supervisor进程守护
在目录/etc/supervisor/conf.d/下, 新建一个文件,名字:yourpython.conf
在yourpython.conf文件里编辑添加:

[program:yourpython]
directory=/root/yourpython
command=python server.py -c /root/yourpython/user-config.json
user=root
autostart = true
autoresart = true
stderr_logfile = /var/log/yourpython.log
stdout_logfile = /var/log/yourpython.log
stderr_logfile_maxbytes=4MB
stderr_logfile_backups=10
startsecs=3
command就是ss的运行命令;
user是执行命令的用户;
autostart和autoresart指自动启动和自动重启;
stdout_logfile重定向程序输出到此文件;
stderr_logfile重定向程序错误到此文件;
修改以下文件
/etc/profile
/etc/default/supervisor (continue reading…)

Leave a Comment :, more...

PHP显示500错误详细信息一句话方法

by on Nov.06, 2016, under PHP

在页面中加入以下代码即可显示错误,无需修改php.ini

register_shutdown_function(function(){ var_dump(error_get_last()); });

Leave a Comment : more...

Debian下Python错误No module named MySQLdb

by on Oct.24, 2016, under Python

1、安装pip
2、pip install mysql-python
3、如果是debian的话就会再报错fails with EnvironmentError: mysql_config not found
先安装apt-get install libmysqlclient-dev 再安装mysql-python就可以搞定了

Leave a Comment :, more...

CentOS7安装Gnome桌面及VNC远程方便挂机

by on Oct.05, 2016, under Linux

第一步安装桌面
yum groupinstall "GNOME Desktop"

第二步安装VNC服务器及配置
yum install tigervnc-server
复制配置文件 (continue reading…)

Leave a Comment : more...

MySQL导入导出数据库备份还原 – mysqldump

by on Oct.03, 2016, under MySQL

mysqldump [OPTIONS] database [tables]
如果不给定任何表,整个数据库将被导出。

备份MySQL数据库的命令

mysqldump -hhostname -uusername -ppassword databasename > backupfile.sql
备份MySQL数据库为带删除表的格式
备份MySQL数据库为带删除表的格式,能够让该备份覆盖已有数据库而不需要手动删除原有数据库。
(continue reading…)

Leave a Comment :, more...

CentOS7\Ubuntu安装VMware Workstation 12

by on Oct.02, 2016, under Linux

1、更新系统源
# yum update [On RedHat Systems]
# apt-get update && apt-get upgrade [On Debian Systems]

2、VMware官网下载并增加执行权限
# chmod +x VMware-Workstation-Full-12.5.0-4352439.x86_64.bundle
(continue reading…)

Leave a Comment :, more...

lnmp一键环境更换MySQL数据库存放目录

by on Sep.30, 2016, under MySQL

首先需要停掉mysql服务器/etc/init.d/mysql stop,下面新目录以/data/mysql/ 为例,然后cp -a /usr/local/mysql/var/* /data/mysql/,再chown mysql:mysql -R /data/mysql/ 下面再修改/etc/my.cnf ,查找[mysqld] ,在下面加入datadir = /data/mysql/ 保存,如果开启了innodb还需要修改innodb_data_home_dir 和innodb_log_group_home_dir为新的/data/mysql,启动mysql。

Leave a Comment : more...

SSBC手撕包菜安装配置教程(DHT磁力搜索源码)

by on Sep.25, 2016, under Python

1、环境配置

[root@localhost ~]# python -V //执行python -V即可获取当前版本
Python 2.7.5
[root@localhost ~]# systemctl stop firewalld.service //关闭firewall防火墙
[root@localhost ~]# systemctl disable firewalld.service //禁止firewall防火墙开机启动
[root@localhost ~]# systemctl stop iptables.service //关闭iptables防火墙
[root@localhost ~]# systemctl disable iptables.service //禁止iptables防火墙开机启动

(continue reading…)

Leave a Comment : more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...