#author("2025-07-03T10:59:29+09:00","default:dramsukohome","dramsukohome") #author("2025-07-03T11:05:10+09:00","default:dramsukohome","dramsukohome") [[FrontPage]] #shadowheader(1,Linux Server); #shadowheader(2,目次); #contents * インストール関連 [#t5025bb4] ** Ubuntu 24.04 Install(Server用途) [#k5dd806a] -[[(wiki.js) Ubuntu,24-04,Install(Server用途):https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/LinuxOsInstallServer/Ubuntu,24-04,Install(Server%E7%94%A8%E9%80%94)]] - [[(pukiwiki) Ubuntu,24-04,Install(Server用途)]] ** CentOS_6.3_初期インストール [#of992259] -[[CentOS_6.3_初期インストール]]~ ** CentOS_7_初期インストール [#q66aa966] -[[CentOS_7_初期インストール]]~ ** AlmaLinux 8 初期インストール [#d8a04542] -[[AlmaLinux 8 初期インストール]] ** debian系_初期インストール(ほとんど中身無し。これから書きます) [#od23d60f] -[[debian系,初期インストール]]~ * Machine [#tefac31b] - tar3.net サーバ -- tar3.net ドメインのホームページやソフトは以下のコンピューターで動いてます。 ---[[HP ProLiant ML110 G6:http://h50146.www5.hp.com/products/old/servers/proliant/ml110g6/]] --ここに無料の VMWare ESXi を入れて~ 仮想コンピューター上でサーバーを起動しています。~ -- 正確には VMWare ESXi がプリインストールされた~ サーバー(HP ProLiant ML110 G6)を買いました。~ ** ラズベリーパイ_Raspberry_Pi [#wc7c7153] [[ラズベリーパイ_Raspberry_Pi]]~ *Linux、分散ファイルストレージ、moose file system、moosefs、mfs [#of0f5d8a] -[[(wiki.js) Moose File System:https://wikijs.tar3.net:3443/ja/110-WindowsLinuxCommon/mooseFileSystem]] * Server Soft [#y286c254] ** Air Video Server のインストールと設定(Ubuntu) [#hf96ff6c] +レポジトリの登録 sudo apt-get install python-software-properties sudo apt-add-repository ppa:rubiojr/airvideo sudo apt-get update sudo apt-get install airvideo-server **apache [#q97ffa7b] -[[(wiki.js) Apache,Httpd,Web Server:https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/LinuxServerSoft/ApacheHttpdWebServer]] **DHCP [#v2f9ea22] -[[DHCP]]~ **bind_DNS [#ma245308] -[[bind_DNS]]~ **pi-hole,DNS [#wf6b9296] -[[pi-hole,DNS]] **Docker [#a009c508] -[[Docker]] ** epgrec [#ecb44c89] -[[epgrec]]~ **friio-CentOS6 [#v2f9ea22] -[[friio-CentOS6]]~ **ftp_proftp [#z1af3db2] -[[ftp_proftp]]~ ** git [#r60a1702] -[[git]] ** Hinemos [#t548cf42] -[[Hinemos]] **HomePage [#z1af3db2] -[[HomePage]]~ **iptables,firewall,ufw [#b5d134e8] +CentOS6 ++ 現場確認 iptables -L --- 遅い場合(逆引き停止) iptables -nL ++ 設定ファイルの読み込み /sbin/iptables-restore < iptables ++ iptables を再起動した時に設定が保存されるようにする /etc/init.d/iptables save ++ log 出力設定 (下記2つのどちらかを追加) --- vi /etc/syslog.conf # iptables log *kern.debug /var/log/iptables --- vi /etc/rsyslog.conf # iptables log *kern.debug /var/log/iptables ++ iptables の状態表示 yum install iptstate iptstate +CentOS7 --参考サイト(外部):[[ファイアウォール構築(iptables):https://centossrv.com/iptables.shtml]] --- 知らなかったのですが、「全国警察施設への攻撃元上位5カ国」という情報があるらしいです。 > +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にまとめて集計するとそれなりに面白いです(^^) < -- Install --- 参考サイト(外部):[[CentOS7でのiptablesの設定忘れるのでメモ:https://qiita.com/miosee/items/0599baa3a01301265a43]] --- firewalld を停止 >~ fiwawalldの停止~ sudo systemctl stop firewalld < >~ 自動起動の停止~ sudo systemctl disable firewalld < >~ ステータスの確認~ sudo systemctl status firewalld < --- install sudo yum install iptables-services -- iptables の起動 --- 起動 sudo systemctl start iptables --- 自動機能有効化 sudo systemctl enable iptables --- Statusの確認 sudo systemctl status iptables -- iptables save のやり方 --- CentOS7 /usr/libexec/iptables/iptables.init save -- logrotate --- sudo vi /etc/logrotate.d/iptables /var/log/iptables { weekly rotate 10 create postrotate /bin/systemctl reload iptables.service > /dev/null 2> /dev/null || true endscript } +ufw(Uncomplicated Firewall,ubuntu) --[[参考サイト(外部), Ubuntuのポート開放方法(ファイアウォールを設定する):https://qiita.com/toujika/items/be21d361cf80d664859c]] --Port状態の確認 sudo ufw status --10050 port の開放 sudo ufw allow 10050 sudo ufw reload --再度確認 sudo ufw status --ufwの無効化 sudo ufw disable --ufwの有効化 sudo ufw enable ** ubuntu に lamp 環境をインストールする [#y6912a9f] + lamp とは以下のプログラムの頭文字だYO ++Linux ++Apache(Web) ++Mysal(Database) ++PHP(Web programing言語) + install ++ sudo apt-get update ++ sudo apt-get install tasksel ++ sudo tasksel install lamp-server ** lychee,Web用の画像サーバー,Google Photoの代わりになるか [#qe0fe430] -参考サイト[[https://cloudo3.com/ja/%E3%82%AF%E3%83%A9%E3%82%A6%E3%83%88%E3%82%99%E3%82%B3%E3%83%B3%E3%83%92%E3%82%9A%E3%83%A5%E3%83%BC%E3%83%86%E3%82%A3%E3%83%B3%E3%82%AF%E3%82%99/centos-7-lamp-vps%E3%81%ABlychee-3-1%E3%83%95%E3%82%A9%E3%83%88%E3%82%A2%E3%83%AB%E3%83%8F%E3%82%99%E3%83%A0%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/1734#Step_8__Create_Database_for_Lychee]] -前提 -- 参考サイトはまぁまぁすっとばして、LAMP(Linux,Apache,Mysql,Php)環境は構築済みとします。 -- CentOS 7 で組みました。 + データベースの作成 ++ ログイン sudo mysql -u root -p ++ root のパスワードを入力 ++ 以下のコマンドを発行 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'; + lycheeのダウンロード ++ 以下のサイトで latest 版を探す --- [[https://github.com/electerious/Lychee/releases]] ++ zip file のダウンロード(例) wget https://github.com/electerious/Lychee/archive/refs/tags/v3.1.6.zip ++ unzip unzip v3.1.6.zip ++ Lychee file の移動 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/ + Apacheの再起動 sudo systemctl restart httpd + Web site へアクセスして設定 http://(ip address)/lychee -- 例 http://192.168.110.1/lychee ++ Database Host: localhost ++ Database Username: lychee ++ Password: UltraSecurePassword +ユーザー名とパスワードを設定 -> Create Login -- 自分はここで色々とエラーが出たけど、apache のログ /var/log/httpd/ の error ログを見ながら少しずつ対応 + 参考 -- 設定ファイルは以下 /var/www/html/lychee/data/config.php ** openldap [#x08eb5da] -[[openldap]]~ ** logwatch [#e9aeb1e7] -[[logwatch]]~ **mail,postfix,dovecot [#n02856a4] -[[wiki.js(Mail,Postfix,Dovecot,Rainloop):https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/Mail,PostFIx,Dovecot,Rainloop]]~ ** minecraft [#o0025328] -[[minecraft]] **mysql [#l499ba51] -[[(wiki.js)mysql:https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/LinuxServerSoft/MysqlMariaDB]] ** nagios,サーバー監視 [#ga47580b] -[[nagios]] ** nextcloud [#adbee88e] -[[(wiki.js) NextCloud:https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/LinuxServerSoft/NextCloud]] ** ntpサーバ [#xbd9c988] -[[(wiki.js) NTP server:https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/LinuxServerSoft/NtpServer]] **nfs [#m5318b0e] -[[nfs]]~ ** php [#i71c0eea] -インストール方法 ++ CentOS7, RHEL7 sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm sudo yum install --enablerepo=remi-php74 php which ++ RHEL8, CentOS8, AlmaLinux8, RockyLinux8 sudo yum install https://rpms.remirepo.net/enterprise/remi-release-8.rpm sudo yum install --enablerepo=remi php which -Apache実行ユーザー、グループの変更 ++ sudo vim /etc/apache2/envvars export APACHE_RUN_USER=apacheUser export APACHE_RUN_GROUP=ApacheUsers ++ php sessionフォルダの権限変更も忘れずに。。。 sudo chown apacheUser:ApacheUsers /var/lib/php/sessions -R ** piwigo,Web用の画像サーバー,Google Photoの代わりになるか [#yc3a5de2] + 参考サイト:[[https://ja.linux-console.net/?p=319]] + 前提 -- LAMP環境は構築済み -- CentOS 7 + mysql へデータベースの作成とユーザー追加 ++ mysql -u root -p ++ create database piwigo; ++ grant all privileges on piwigo.* to 'piwigouser'@'localhost' identified by 'pass123'; ++ flush privileges; ++ exit + Install方法 ++ download 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 ++ あとは多分、フィーリングでセットアップ可能なはず +同期 ++ 日本語不可 ++ 以下意外の語句不可 +++ [-] +++ [_] +++ [.] ピリオド +++ アルファベット ++ 不可語句例 +++ [ ] スペース +++ [(] +++ [)] +PNGなど大文字の拡張子を認識しない ++ 以下を編集 vim piwigo/include/config_default.inc.php ++ 43行目あたり --- 変更後 $conf['picture_ext'] = array('jpg','jpeg','png','gif','PNG','JPG'); --- 変更前 $conf['picture_ext'] = array('jpg','jpeg','png','gif'); ** Proxmox VE [#ta378834] -[[ProxMox(wiki.js):https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/ServerSoft/ProxMoxVE]] **proxy_squid [#cea21210] -[[proxy_squid]]~ **pukiwiki [#cea21210] -[[pukiwiki_tips]]~ **router [#ldbef79c] -[[router]]~ **rsync [#k72cda07] -[[rsync]]~ **samba [#w54e5af1] -[[samba]]~ ** snmp [#ma0af4a1] - ubuntu に snmp をインストールする。 sudo apt-get install snmpd snmp ** ssh [#m06ac720] - [[ssh]] **ssl証明書の購入 [#ncd99154] -[[(wiki.js) SSL(TLS) 証明書:https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/Other/Ssl%E8%A8%BC%E6%98%8E%E6%9B%B8]] ** tomcat [#v904412a] - [[tomcat]] ** tv,terevison,cable,satellite,japan,epgstation [#fb7102dc] - [[tv,terevison,cable,satellite,japan,録画]] ** vnc,ubuntu [#r79d4857] - [[vnc,ubuntu]] **vpn [#c281815a] -[[vpn]]~ **webdav_owncloud [#v458921e] -[[webdav_owncloud]]~ ** wiki.js 構築手順 [#z8103ae2] - (wiki.jsが落ちると見えなくなるので残す) - [[wiki.js]] **wordpress_ブログ作成 [#kcfc84a4] -[[wordpress_ブログ作成]]~ **x11vnc [#f524269a] -[[x11vnc]]~ **zabbix [#ybd956be] -[[(wiki.js) Zabbix:https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/LinuxServerSoft/zabbix]] * その他 [#bd5f6808] ** その他, wiki.js [#z543c9e9] -[[(wiki.js) Linux, Server, Other:https://wikijs.tar3.net:3443/ja/310-Linux/313-LinuxServer/Other/Other]]