# # Install Docker # https://docs.docker.com/engine/installation/linux/docker-ce/centos/ yum update -y yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo yum makecache fast yum install -y docker-ce #yum list docker-ce.x86_64 --showduplicates | sort -r #yum install docker-ce- systemctl start docker systemctl enable docker groupadd docker gpasswd -a $USER docker systemctl restart docker exit docker run hello-world # # RHEL image # https://access.redhat.com/containers?application_categories_list=Operating%20System#/search/RHEL docker pull registry.access.redhat.com/rhel7/rhel:7.1-24 #docker run -it --rm registry.access.redhat.com/rhel7/rhel:7.1-24 /bin/bash docker run -it --rm -v /vagrant:/vagrant registry.access.redhat.com/rhel7/rhel:7.1-24 /bin/bash cat /etc/redhat-release サブスクリプション登録 http://enakai00.hatenablog.com/entry/20141205/1417759333 https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/launching-ents-tools subscription-manager register --username= --password= subscription-manager list --available subscription-manager attach --pool= #subscription-manager register --username=yuji.k64613@gmail.com --password= #subscription-manager attach --pool=8ecd2d1d-1a42-44bf-a4a5-d9f0063c134b #subscription-manager list https://www.rootlinks.net/2016/04/07/rhel-7-yum-%E3%83%AA%E3%83%9D%E3%82%B8%E3%83%88%E3%83%AA%E3%81%AE%E6%9C%89%E5%8A%B9%EF%BD%A5%E7%84%A1%E5%8A%B9-yum-config-manager/ yum-config-manager --enable rhel-7-server-rpms yum-config-manager --enable rhel-7-server-optional-rpms yum repolist all #subscription-manager list subscription-manager register #subscription-manager list --available subscription-manager attach --auto #subscription-manager list docker commit 4a34304f36da rhel:my docker save rhel:my | gzip > myrhel.tgz docker load -i myrhel.tgz # # oracle # yum install -y unzip yum install -y tar #yum install -y java →OpenJDKをインストールする事で、必要なXのパッケージがインストールされてる # for oracle yum install -y libaio yum install -y libaio-devel yum install -y xterm yum install -y binutils compat-libcap1 libstdc++-devel sysstat gcc-c++ ksh make glibc-devel # # java # #rpm -ivh /vagrant/jdk-8u131-linux-x64.rpm #java -version mkdir /work chmod 777 /work groupadd -g 200 oinstall groupadd -g 201 dba groupadd -g 202 oper useradd -m -g oinstall -G oinstall -u 440 oracle su - oracle cd /work unzip /vagrant/linuxx64_12201_client.zip # xhost + export DISPLAY=192.168.100.54:0.0 /work/client/runInstaller exit /home/oracle/app/oraInventory/orainstRoot.sh #binutils-2.23.52.0.1 #compat-libcap1-1.10 #libstdc++-devel(x86_64)-4.8.2 #sysstat-10.1.5 #gcc-c++-4.8.2 #ksh #make-3.82 #glibc-devel(x86_64)-2.17 #yum install -y binutils compat-libcap1 libstdc++-devel sysstat gcc-c++ ksh make glibc-devel su - oracle cd /work /work/client/runInstaller -silent -waitForCompletion -responseFile /vagrant/client.rsp #/work/client/runInstaller -silent -waitForCompletion -responseFile /vagrant/client.rsp -jreLoc /usr/java/jdk1.8.0_131 exit /home/oracle/app/oraInventory/orainstRoot.sh export ORACLE_BASE=/home/oracle/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/client_1 export ORACLE_SID=orcl export PATH=$ORACLE_HOME:$PATH export NLS_LANG=JAPANESE_JAPAN.UTF8 export LD_LIBRARY_PATH=$ORACLE_HOME sqlplus # # ftp # yum install -y ftp yum install -y vsftpd useradd -m user && echo user | passwd user --stdin sed -i.bak \ -e 's/^#chroot_local_user=YES/chroot_local_user=YES/' \ -e 's/^#chroot_list_enable=YES/chroot_list_enable=YES/' \ -e 's:^#chroot_list_file=/etc/vsftpd/chroot_list:chroot_list_file=/etc/vsftpd/chroot_list:' \ /etc/vsftpd/vsftpd.conf (echo 'userlist_deny=NO' \ && echo 'userlist_file=/etc/vsftpd/user_list' \ && echo 'allow_writeable_chroot=YES' \ && echo 'pasv_enable=YES' \ && echo 'pasv_min_port=60000' \ && echo 'pasv_max_port=60001' \ ) >> /etc/vsftpd/vsftpd.conf echo user >> /etc/vsftpd/user_list echo user >> /etc/vsftpd/chroot_list systemctl enable vsftpd docker run --privileged -d --rm \ -p 20:20 \ -p 21:21 \ -p 60000:60000 \ -p 60001:60001 ftp https://docs.oracle.com/cd/E39368_01/e72559/uek4-czc_xmc_xt.html touch /var/lib/rpm/* https://medium.com/@fkei/docker-rpmdb-checksum-is-invalid-dcdpt-pkg-checksums-xxxx-amzn1-u-%E5%AF%BE%E5%87%A6%E6%B3%95-289b8c58d4a3 rpm --rebuilddb && yum install -y yum-plugin-ovl docker-ce-17.06.0.ce-1.el7 container-selinux >= 2.9 policycoreutils-python audit-libs-python >= 2.1.3-4 checkpolicy libapol.so.4 libqpol.so.1 libsemanage-python >= 2.5-5 python-IPy setools-libs >= 3.3.8-1 libcgroup libltdl.so.7 libseccomp.so.2 rpm -ivh --test *.rpm sudo rpm -ivh *.rpm sudo systemctl start docker sudo docker run hello-world http://rpm.pbone.net/