sudo apt-get install python-software-properties sudo apt-add-repository ppa:rubiojr/airvideo sudo apt-get update sudo apt-get install airvideo-server
/sbin/iptables-restore < iptables
/etc/init.d/iptables save
# iptables log *kern.debug /var/log/iptables
# iptables log *kern.debug /var/log/iptables
yum install iptstate iptstate
fiwawalldの停止
sudo systemctl stop firewalld
自動起動の停止
sudo systemctl disable firewalld
ステータスの確認
sudo systemctl status firewalld
sudo yum install iptables-services
sudo systemctl start iptables
sudo systemctl enable iptables
sudo systemctl status iptables
/usr/libexec/iptables/iptables.init save
/var/log/iptables { weekly rotate 10 create postrotate /bin/systemctl reload iptables.service > /dev/null 2> /dev/null || true endscript }
sudo ufw status
sudo ufw allow 10050 sudo ufw reload
sudo ufw status
sudo ufw disable
sudo ufw enable
sudo apt search openjdk-\(\.\)\+-jre$
sudo apt-get install openjdk-8-jre
java -version
wget https://launcher.mojang.com/v1/objects/3737db93722a9e39eeada7c27e7aca28b144ffa7/server.jar
mkdir build cd build
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
java -jar BuildTools.jar
mkdir ./minecraftSpigot cd ./minecraftSpigot mv ../build/spigot-1.*.jar ./spigot.jar
java -XX:MaxPermSize=1024M -Xms512M -Xmx1536M -jar spigot.jar
ps ax | grep spigot
2116 ? Sl 739:06 java -Xmx2G -Xms2G -jar ../mineSpigot/spigot.jar nogui
kill 2116
#!/bin/bash cd /home/minecraft/server; java -XX:MaxPermSize=1024M -Xms512M -Xmx1536M -jar spigot.jar
sudo apt-get install snmpd snmp
:%s/置換前文字列/置換後文字列/gc
%s;/var/home;/home;gc
:63,79s /beauty/hairnail/g
:set nu
コマンド | 説明 |
:!コマンド | vi を終了せずにシェルコマンドを実行 |
:sh | コマンドプロンプトを実行。exit で vi に戻る |
/
n
N
perl -MCPAN -e 'install HTML::Template'
install HTML::Template
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
ntpq -p
#インストール sudo aptitude -y install sysv-rc-conf #一覧の表示 sudo sysv-rc-conf -list sudo sysv-rc-conf -list | grep ssh #切り替え sudo sysv-rc-conf ssh onまたはoff
du -s /home/hogehoge/* /home/hogehoge/.[^\.]* | sort -rn
sudo vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFALUT="quiet splash text"
sudo update-grub
sudo add-apt-repository ppa:linrunner/tlp sudo apt-get update sudo apt-get install tlp tlp-rdw smartmontools ethtool
sudo vi /etc/default/tlp
sudo yum install cpuspeed
cd /lib/modules/[kernel]/kernel/arch/[arch tecture]/kernel/cpu/cpufreq/
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 3200000 2800000
sudo vi /etc/sysconfig/cpuspeed
GOVERNOR=userspace MAX_SPEED=2800000 MIN_SPEED=3200000
sudo /etc/init.d/cpuspeed start
sudo chkconfig cpuspeed on
tcpdump -i eth0 port 20 or port 21 or port 80
/etc/rsyslog.conf
sudo vi /etc/init/lightdm.override
manual
# manual
sudo lightdm
ctrl + alt + F7
enforcing=0を追加します。
enforcing=0を追加します。
sudo apt-get install etckeeper bzr
sudo etckeeper init
sudo etckeeper vcs diff
/etc/rsyslog.conf | 共通設定ファイル |
/etc/rsyslog.d/*.conf | 個別の設定ファイル |
/etc/sysconfig/rsyslog | 起動オプション |
vi /etc/rsyslog.conf
#iptables log kern.debug /var/log/iptables.log
HOSTNAME=unya.hogehoge.com NETWORKING=yes
sudo yum install rpm-build sudo yum install rpmdevtools yum-utils
sudo yum install bind-utils
elasticsearch というソフトを例で
sudo update-rc.d elasticsearch defaults
ifconfig lsmod
modprobe epic100
ifconfig eth0 up
ifconfig
ONBOOT=yes
service network restart
sudo: sorry, you must have a tty to run sudo
Defaults requiretty
Defaults:root !requiretty
Certificate for hostname 'host.localdomain', in file (or by nickname): /etc/pki/tls/certs/localhost.crt The certificate needs to be renewed; this can be done using the 'genkey' program. Browsers will not be able to correctly connect to this web site using SSL until the certificate is renewed.
sudo rm /etc/pki/tls/certs/localhost.crt sudo rm /etc/pki/tls/private/localhost.key
sudo genkey localhost
sudo fdisk /dev/sdb4
m
p
n
t 82
p
w
sudo shutdown -r now
sudo mkswap /dev/sdb4
sudo swapon /dev/sdb4
free
swapoff /dev/sdb4
vi /etc/fstab
/dev/sdb1 swap swap defaults 0 0