2023年12月27日水曜日

2023年12月26日火曜日

Rocky Linux Web コンソール ( cockpit )

# dnf install cockpit
# systemctl  enable --now cockpit.socket
# firewall-cmd --list-all
# firewall-cmd --add-service=cockpit
# firewall-cmd --runtime-to-permanent

2023年12月14日木曜日

Rocky linux8 にpython3.9をインストール

# dnf module  install python39
# python3 -V
# alternatives --config python3
# python3 -V
# alternatives --config python
# python  -V

dnf module  -y  install python39
python3 -V
alternatives --config python3
alternatives --config python
#python3 -V
#python  -V

 ERROR) RuntimeError: The 'apxs' command appears not to be installed or is not executable.
→dnf install httpd-devel

ERROR)  RuntimeError: Failed to build APR.
→dnf install gcc make

ERROR) /bin/sh: mariadb_config: コマンドが見つかりません
→ dnf install MariaDB-devel

※ curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash

ERROR)  pg_config executable not found.
→ dnf install libpq-devel

ERROR)  Python.h: そのようなファイルやディレクトリはありません
→ dnf install python39-devel

ERROR)  /usr/lib/rpm/redhat/redhat-hardened-cc1: そのようなファイルやディレクトリはありません
→ dnf install redhat-rpm-config

ERROR) Unable to find zbar shared library
→ dnf install zbar

ERROR)  ImportError: Module "debug_toolbar.panels.profiling" does not define a "ProfilingPanel" attribute/class
→ ????

ERROR)Trying pkg-config --exists mysqlclient                v 2.2.1
ERROR)  Building wheel for mysqlclient (pyproject.toml) did not run successfully.
ERROR)  /usr/bin/ld: -lz が見つかりません
ERROR)  Failed building wheel for mysqlclient
ERROR) Could not build wheels for mysqlclient, which is required to install pyproject.toml-based projects
→ mysqlclient バージョンダウン    -> 2.1.1

ERROR)  libclntsh.so: cannot open shared object file: No such file or directory
→オラクルクライアントインストール
# find / -print |grep libclntsh
/usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1
/usr/lib/oracle/11.2/client64/lib/libclntsh.so

# vi /etc/ld.so.conf.d/oracle.conf <<__EOF__
/usr/lib/oracle/11.2/client64/lib/
__EOF__
# ldconfig
# find / -print |grep libclntsh
# ldconfig -p |grep libclntsh

ERROR)  libnsl.so.1: cannot open shared object file: No such file or directory
→ dnf install libnsl

ERROR) django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 or psycopg module
→ dnf install python39-psycopg2

ERROR)  DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory".
→cd /aws/s3/oracle
    dnf localinstall oracle-instantclient19.18-basic-19.18.0.0.0-2.x86_64.rpm --allowerasing

ERROR) ImportError: Unable to find zbar shared library
→ dnf install zbar

ERROR)  NameError: name '_mysql' is not defined
→ dnf remove mysql* Mariadb* MariaDB*
     curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
     dnf install MariaDB-client MariaDB-devel

ERROR)  configure: error: in `/tmp/pip-install-0ldu01pz/mod-wsgi-httpd_02c8a3430d8d48a8b8a6853133b71af8/build/apr-1.7.0':
→ dnf install gcc make

ERROR) failed to map segment from shared object
ls -lZ /var/www/wsgi/utilities/.venv/lib64/python3.9/site-packages/mod_wsgi/server/mod_wsgi-py39.cpython-39-x86_64-linux-gnu.so
-rwxr-xr-x. 1 apache apache unconfined_u:object_r:httpd_sys_content_t:s0 1321400 12月 26 09:54 /var/www/wsgi/utilities/.venv/lib64/python3.9/site-packages/mod_wsgi/server/mod_wsgi-py39.cpython-39-x86_64-linux-gnu.so
chcon -R -h -t httpd_sys_script_exec_t  /var/www/wsgi/utilities/.venv/lib64/python3.9/site-packages/mod_wsgi/server/mod_wsgi-py39.cpython-39-x86_64-linux-gnu.so
※ 当分は、setenforce 0

ERROR) firewall 
→firewall-cmd --add-service=http --zone=public --permanent
    firewall-cmd --reload

ERROR) ImportError: /var/www/wsgi/utilities/django/cx_Oracle.cpython-39-x86_64-linux-gnu.so: failed to map segment from shared object

ERROR) curl: (7) Failed to connect to 192.168.100.254 port 3128: 接続を拒否されました
→vi /etc/profile.d/sh.local
export  HTTP_PROXY=http://192.168.254.253:3128
export HTTPS_PROXY=http://192.168.254.253:3128

ERROR) Errors during downloading metadata for repository 'mariadb-main':
  - Status code: 404 for https://dlm.mariadb.com/repo/mariadb-server/10.7....
→ curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash

ERROR) ifconfig netstat command not found
→dnf install net-tools








2023年12月11日月曜日

The GPG keys listed for the "google-chrome" repository are already installed but they are not correct for this package.

 warning: /var/cache/yum/x86_64/7/google-chrome/packages/google-chrome-stable-120.0.6099.71-1.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID a3b88b8b: NOKEY

https://dl.google.com/linux/linux_signing_key.pub から鍵を取得中です。

The GPG keys listed for the "google-chrome" repository are already installed but they are not correct for this package.

Check that the correct key URLs are configured for this repository.

 Failing package is: google-chrome-stable-120.0.6099.71-1.x86_64

 GPG Keys are configured as: https://dl.google.com/linux/linux_signing_key.pub


→yum install google-chrome-stable.x86_64 --nogpgcheck



2023年12月6日水曜日

oracle statspack

$ sqlplus / as sysdba
-- インストール
SQL> @?/rdbms/admin/spcreate.sql
perfstat_passwordに値を入力してください: password
default_tablespaceに値を入力してください: USERS
temporary_tablespaceに値を入力してください: TEMP
--確認
SQL> SELECT user_id, username FROM dba_users WHERE username = 'PERFSTAT'

$ sqlplus perfuser/password as sysdba
SQL> execute statspack.modify_statspack_parameter(i_snap_level=> 7)
SQL> select snap_id,to_char(snap_time,'yy-mm-dd hh24:mi:ss') snap_time, snap_level from stats$snapshot order by snap_id;

--現在のスナップショットを取得
SQL> execute statspack.snap
SQL> execute statspack.snap(i_snap_level=> 7)

--一時間毎に取得
SQL> @?/rdbms/admin/spauto
SQL> select JOB,NEXT_DATE,INTERVAL,WHAT from dba_jobs;    -- JOB 確認
SQL> execute dbms_job.interval([ジョブID], 'sysdate+(1/48)');   -- インターバル変更
SQL> execute dbms_job.remove([ジョブID]);                                    -- JOΒ削除

--レポート出力
SQL> @?/rdbms/admin/spreport

SQL> @?/rdbms/admin/sprepsql       --SQL単位レポート (Snapshot Level 6 以上)

    シャットダウン時の後処理 (shutdown)

    # vi /etc/systemd/system/drop.service [Unit] Description= stop httpgwd DefaultDependencies=no Before=shutdown.target RefuseManualStart=true ...