One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise:
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 57.9M 100 57.9M 0 0 14.5M 0 0:00:03 0:00:03 --:--:-- 21.4M
$ docker-compose --version Docker Compose version v2.20.2
docker-compose로 pgvector 올리기
1 2
$ docker-compose up -d [+] Running 1/1
postgre를 다시 다른 방법으로 설치해보자
1 2 3 4 5 6 7 8 9
$ aws s3 cp s3://aipin-bucket/postgresql-9.6.16.tar.gz /root download: s3://aipin-bucket/postgresql-9.6.16.tar.gz to ../postgresql-9.6.16.tar.gz
# 패키지 파일 압축해제 $ tar -zxvf postgresql-9.6.16.tar.gz # 설치 디렉토리는 디폴트로 함, --prefix=/usr/local/pgsql 이렇게 하는 경우도 있는듯 $ ./configure --without-readline $ make && make check $ make install
su - postgres [postgres@ec2-ct01-dev-slm-app-03 ~]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data The files belonging to this database system will be owned by user "postgres". This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /usr/local/pgsql/data ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default timezone ... Asia/Seoul selecting dynamic shared memory implementation ... posix creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok
WARNING: enabling "trust" authentication forlocal connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
$ /usr/local/pgsql/bin/psql psql (9.6.16) Type "help"forhelp.
# 비번 설정 postgres=# postgres=# ALTER USER postgres WITH PASSWORD 'new1234'; ALTER ROLE
# 종료 postgres=# \q
잘 돌고있는지 확인
1 2 3 4 5 6 7 8 9 10 11
ps aux | grep postgres root 16797 0.0 0.0 200768 3912 pts/1 S 22:04 0:00 su - postgres postgres 16798 0.0 0.1 124744 4012 pts/1 S 22:04 0:00 -bash postgres 17004 0.0 0.4 277808 16760 pts/1 S 22:06 0:00 /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data postgres 17009 0.0 0.0 277808 2748 ? Ss 22:06 0:00 postgres: checkpointer process postgres 17010 0.0 0.0 277808 2748 ? Ss 22:06 0:00 postgres: writer process postgres 17011 0.0 0.0 277808 2748 ? Ss 22:06 0:00 postgres: wal writer process postgres 17012 0.0 0.1 278208 5504 ? Ss 22:06 0:00 postgres: autovacuum launcher process postgres 17013 0.0 0.0 132824 2300 ? Ss 22:06 0:00 postgres: stats collector process postgres 17840 0.0 0.1 162296 3960 pts/1 R+ 22:14 0:00 ps aux postgres 17844 0.0 0.0 119420 912 pts/1 S+ 22:14 0:00 grep --color=auto postgres
1 2 3 4 5 6 7 8 9 10 11 12
[postgres@ec2-ct01-dev-slm-app-03 ~]$ /usr/local/pgsql/bin/psql psql (9.6.16) Type "help"forhelp.
postgres=# SELECT version(); version
---------------------------------------------------------------------------------------------------- ------- PostgreSQL 9.6.16 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-17), 64-bit (1 row)
다시 앞의 docker-compose로 pgvector 올리기
1 2 3 4
$ docker-compose up -d [+] Running 1/1 ✘ db Error 15.0s Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
흐음…
postgres 종료
$ sudo su - postgres
Last login: Mon Jun 24 22:16:42 KST 2024 on pts/0
$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/logs/logfile stop
waiting for server to shut down.... done
server stopped
- references
https://inblog.ai/guri-tech-blog/ec2%EC%97%90-postgressql-96-%EC%84%A4%EC%B9%98-%ED%8C%A8%ED%82%A4%EC%A7%80%EC%84%A4%EC%B9%98-tar-7393
https://wldnjd2.tistory.com/m/95