Open muitimon opened 3 years ago
これは Docker でやってるので気にしなくて良い
開発ツール(Cコンパイラ等)のインストール
# yum -y groupinstall "Development Tools"
Loaded plugins: fastestmirror, ovl
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
* base: ftp-srv2.kddilabs.jp
* extras: ftp-srv2.kddilabs.jp
* updates: ftp-srv2.kddilabs.jp
...
Complete!
RubyとPassengerのビルドに必要なヘッダファイルなどのインストール
# yum -y install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel libffi-devel
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: ftp-srv2.kddilabs.jp
* extras: ftp-srv2.kddilabs.jp
* updates: ftp-srv2.kddilabs.jp
Resolving Dependencies
--> Running transaction check
---> Package libcurl-devel.x86_64 0:7.29.0-59.el7_9.1 will be installed
...
Complete!
PostgreSQLとヘッダファイルのインストール
# yum -y install postgresql-server postgresql-develLoaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: ftp-srv2.kddilabs.jp
* extras: ftp-srv2.kddilabs.jp
* updates: ftp-srv2.kddilabs.jp
Resolving Dependencies
--> Running transaction check
---> Package postgresql-devel.x86_64 0:9.2.24-4.el7_8 will be installed
--> Processing Dependency: postgresql-libs(x86-64) = 9.2.24-4.el7_8 for package: postgresql-devel-9.2.24-4.el7_8.x86_64
--> Processing Dependency: postgresql(x86-64) = 9.2.24-4.el7_8 for package: postgresql-devel-9.2.24-4.el7_8.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-devel-9.2.24-4.el7_8.x86_64
--> Processing Dependency: libpgtypes.so.3()(64bit) for package: postgresql-devel-9.2.24-4.el7_8.x86_64
--> Processing Dependency: libecpg_compat.so.3()(64bit) for package: postgresql-devel-9.2.24-4.el7_8.x86_64
--> Processing Dependency: libecpg.so.6()(64bit) for package: postgresql-devel-9.2.24-4.el7_8.x86_64
---> Package postgresql-server.x86_64 0:9.2.24-4.el7_8 will be installed
--> Running transaction check
Apacheとヘッダファイルのインストール
# yum -y install httpd httpd-devel
...
Complete!
ImageMagickとヘッダファイル・日本語フォントのインストール
# yum -y install ImageMagick ImageMagick-devel ipa-pgothic-fonts
ソースコードのダウンロード
# curl -O https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16.0M 100 16.0M 0 0 7665k 0 0:00:02 0:00:02 --:--:-- 7668k
Rubyのビルド
# tar xvf ruby-2.7.2.tar.gz
略
# cd ruby-2.7.2
# ./configure --disable-install-doc
略
# make
略
# make install
バージョン確認
# ruby -v
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
bundler install
# gem install bundler
Fetching bundler-2.2.11.gem
Successfully installed bundler-2.2.11
Parsing documentation for bundler-2.2.11
Installing ri documentation for bundler-2.2.11
Done installing documentation for bundler after 3 seconds
1 gem installed
データベースクラスタの新規作成
# postgresql-setup initdb
Initializing database ... OK
RedmineからPostgreSQLに接続するための設定を追加
/var/lib/pgsql/data/pg_hba.conf
に追加
host redmine redmine 127.0.0.1/32 md5
host redmine redmine ::1/128 md5
PostgreSQL の起動および自動起動の設定
# service postgresql start
Redirecting to /bin/systemctl start postgresql.service
# systemctl enable postgresql
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to /usr/lib/systemd/system/postgresql.service.
>
git clone https://github.com/CentOS/CentOS-Dockerfiles.git
Cloning into 'CentOS-Dockerfiles'...
remote: Enumerating objects: 1421, done.
remote: Total 1421 (delta 0), reused 0 (delta 0), pack-reused 1421
Receiving objects: 100% (1421/1421), 325.40 KiB | 577.00 KiB/s, done.
Resolving deltas: 100% (520/520), done.
> cd CentOS-Dockerfiles/postgres/centos7
> ls
Dockerfile README.md postgresql-setup start_postgres.sh
LICENSE cccp.yml postgresql.conf supervisord.conf
前準備
docker 環境準備
centos pull
権限付与
exec
httpd(apache) install
参考
何を入れるか確認
install!
Dependencies Resolved
================================================================================== Package Arch Version Repository Size
Installing: httpd x86_64 2.4.6-97.el7.centos updates 2.7 M Installing for dependencies: apr x86_64 1.4.8-7.el7 base 104 k apr-util x86_64 1.5.2-6.el7 base 92 k centos-logos noarch 70.0.6-3.el7.centos base 21 M httpd-tools x86_64 2.4.6-97.el7.centos updates 93 k mailcap noarch 2.1.41-2.el7 base 31 k
Transaction Summary
Install 1 Package (+5 Dependent packages)
Total download size: 24 M Installed size: 32 M Downloading packages: warning: /var/cache/yum/x86_64/7/base/packages/apr-util-1.5.2-6.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY Public key for apr-util-1.5.2-6.el7.x86_64.rpm is not installed (1/6): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00:00
Public key for httpd-tools-2.4.6-97.el7.centos.x86_64.rpm is not installed (2/6): httpd-tools-2.4.6-97.el7.centos.x86_64.rpm | 93 kB 00:00:00
(3/6): apr-1.4.8-7.el7.x86_64.rpm | 104 kB 00:00:00
(4/6): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:00
(5/6): httpd-2.4.6-97.el7.centos.x86_64.rpm | 2.7 MB 00:00:01
(6/6): centos-logos-70.0.6-3.el7.centos.noarch.rpm | 21 MB 00:00:03
Total 7.3 MB/s | 24 MB 00:03
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 Importing GPG key 0xF4A80EB5: Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) security@centos.org" Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5 Package : centos-release-7-9.2009.0.el7.centos.x86_64 (@CentOS) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : apr-1.4.8-7.el7.x86_64 1/6 Installing : apr-util-1.5.2-6.el7.x86_64 2/6 Installing : httpd-tools-2.4.6-97.el7.centos.x86_64 3/6 Installing : centos-logos-70.0.6-3.el7.centos.noarch 4/6 Installing : mailcap-2.1.41-2.el7.noarch 5/6 Installing : httpd-2.4.6-97.el7.centos.x86_64 6/6 Verifying : mailcap-2.1.41-2.el7.noarch 1/6 Verifying : apr-1.4.8-7.el7.x86_64 2/6 Verifying : apr-util-1.5.2-6.el7.x86_64 3/6 Verifying : httpd-2.4.6-97.el7.centos.x86_64 4/6 Verifying : httpd-tools-2.4.6-97.el7.centos.x86_64 5/6 Verifying : centos-logos-70.0.6-3.el7.centos.noarch 6/6
Installed: httpd.x86_64 0:2.4.6-97.el7.centos
Dependency Installed: apr.x86_64 0:1.4.8-7.el7
apr-util.x86_64 0:1.5.2-6.el7
centos-logos.noarch 0:70.0.6-3.el7.centos
httpd-tools.x86_64 0:2.4.6-97.el7.centos
mailcap.noarch 0:2.1.41-2.el7
Complete!
httpd -version
Server version: Apache/2.4.6 (CentOS) Server built: Nov 16 2020 16:18:20
systemctl start httpd.service
systemctl stop httpd.service