sudo apt-get install python-software-properties sudo apt-add-repository ppa:rubiojr/airvideo sudo apt-get update sudo apt-get install airvideo-server
iptables -L
iptables -nL
/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
- CN:中国
- GB:イギリス
- ID:インドネシア
- IN:インド
- RU:ロシア
- DROP_COUNTRY_MAKE BD
- DROP_COUNTRY_MAKE BR
- DROP_COUNTRY_MAKE CN
- DROP_COUNTRY_MAKE DE
- DROP_COUNTRY_MAKE FR
- DROP_COUNTRY_MAKE GB
- DROP_COUNTRY_MAKE ID
- DROP_COUNTRY_MAKE IN
- DROP_COUNTRY_MAKE IT
- DROP_COUNTRY_MAKE KR
- DROP_COUNTRY_MAKE MX
- DROP_COUNTRY_MAKE NL
- DROP_COUNTRY_MAKE PL
- DROP_COUNTRY_MAKE RO
- DROP_COUNTRY_MAKE RS
- DROP_COUNTRY_MAKE RU
- DROP_COUNTRY_MAKE SA
- DROP_COUNTRY_MAKE TR
- DROP_COUNTRY_MAKE UA
- さらにちなみに攻撃?というか、Wikiを宣伝で変えようとするのは圧倒的に中国が多いです。アクセス履歴をDBにまとめて集計するとそれなりに面白いです(^^)
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 mysql -u root -p
CREATE DATABASE lychee_db CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE USER 'lychee_user'@'localhost' IDENTIFIED BY 'UltraSecurePassword'; GRANT ALL PRIVILEGES ON lychee_db.* TO 'lychee_user'@'localhost';
wget https://github.com/electerious/Lychee/archive/refs/tags/v3.1.6.zip
unzip v3.1.6.zip
sudo mv -v Lychee-3.1.6 /var/www/html/lychee
cd /var/www/html sudo chown -R apache:apache lychee
cd /var/www/html/lychee sudo chmod -R 777 data/ upload/
sudo systemctl restart httpd
http://(ip address)/lychee
http://192.168.110.1/lychee
/var/www/html/lychee/data/config.php
sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm sudo yum install --enablerepo=remi-php74 php which
sudo yum install https://rpms.remirepo.net/enterprise/remi-release-8.rpm sudo yum install --enablerepo=remi php which
export APACHE_RUN_USER=apacheUser export APACHE_RUN_GROUP=ApacheUsers
sudo chown apacheUser:ApacheUsers /var/lib/php/sessions -R
wget http://piwigo.org/download/dlcounter.php?code=latest -O piwigo.zip
unzip piwigo.zip
cp -fr piwigo /var/www/html/
chown -R apache:apache /var/www/html/
chmod -R 755 /var/www/html/ chmod -R 777 /var/www/html/_data/
http://(ip address)/piwigo
vim piwigo/include/config_default.inc.php
$conf['picture_ext'] = array('jpg','jpeg','png','gif','PNG','JPG');
$conf['picture_ext'] = array('jpg','jpeg','png','gif');
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
[keyfile] unmanaged-devices=none
sudo service network-manager restart