标签: Linux

11 篇文章

如何在红帽Linux系统中添加swap文件?
如何在红帽企业版Linux系统中添加swap文件? 解决方法: 1. 确定swap文件的大小,单位为M。将该值乘以1024得到块大小。例如,64MB的swap文件的块大小是65536。 2. 在root提示符下,键入下面的命令,其中count大小等于所要求的块大小: dd if=/dev/zero f=/swapfile bs=1024 count…
centos下memcached安装与配置
1、yum安装memcached yum search memcached yum -y install memcached.x86_64 2、验证是否安装 #执行以下命令会输出帮助信息 memcached -h 3、memcached启动 memcached -p 9011 -l 127.0.0.1 -d -u root #验证是否启动 ps -…
centos使用pptpd搭建vpn
1、安装pptpd yum install pptpd 2、配置pptpd vi /etc/pptpd.conf #添加如下配置 localip 172.16.100.254 remoteip 172.16.100.100-105 3、修改dns为google公共dns服务器 vi /etc/ppp/options #添加如下配置 ms-dns 8…
Linux安装lamp环境
yum方式安装lamp环境: yum -y update yum -y install gcc gcc-c++ authconf automake libtool libevent libevent-devel yum -y install ncurse nucrse-devel gd gd-deevel freetype freetype-dev…
Linux开启iptables下UDP端口
此处以开启UDP端口9966为例,方法有两个。 方法一,执行以下命令: iptables -I INPUT -p UDP --dport 9966 -j ACCEPT service iptables save 方法二,执行以下命令: vi /etc/sysconfig/iptables #插入下面这一行 -A INPUT -p udp -m ud…
linux下定时备份mysql数据库
设置每周3凌晨1点自动备份mysql数据库test,数据库账号为root,密码为123456,备份文件目录为/web/backup/。 1、首先写自动备份脚本db_backup.sh cd /web/backup/ vi db_backup.sh #脚本内容如下: #!/bin/sh echo 'db backup begin at '`date …
linux使用nload监控实时流量
1、下载nload wget http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz 2、安装noload tar -xzvf nload-0.7.4.tar.gz cd nload-0.7.4 ./configure -prefix=/usr/local/nload make make insta…
修改Linux系统最大连接数
Linux系统默认最大连接数为1024,可以执行命令ulimit -n查询,无法实现大的并发,可以修改如下: 1、修改配置文件/etc/security/limits.conf vi /etc/security/limits.conf * soft nofile 32768 * hard nofile 65536 2、修改/etc/profile …
Linux开启防火墙并限制开放端口
1、编辑/etc/sysconfig/iptables,若不存在则创建 vi /etc/sysconfig/iptables 2、开启端口1022的iptables内容如下 # Firewall configuration written by system-config-firewall # Manual customization of thi…
Linux修改ssh端口并禁用root登录
1、修改ssh端口 vi /etc/ssh/sshd_config Port 22修改改为Port 1022(或其他自定义的端口) 2、禁用root账号登录 vi /etc/ssh/sshd_config PermitRootLogin no 3、重启sshd服务 service sshd restart 原创内容转载请保留出处GEEK笔记(htt…
Linux添加新用户
1、添加用户server并制定用户目录为/home/server useradd server -d /home/server 2、修改用户server密码为123456 passwd server 然后按提示输入2次新密码。 原创内容转载请保留出处GEEK笔记(http://www.geekapp.cn/)。