써리원의 이것저것

centos + mariadb + GitLab + redmine + php70 설치 본문

서버

centos + mariadb + GitLab + redmine + php70 설치

써리_원 2018. 6. 22. 17:04

* yum update


yum install net-tools


yum -y install ORBit2 PyXML a2ps acpid alsa-lib amtu aspell at atk audiofile audit-libs-python autoconf* autofs automake* avahi avahi-glib bc bind bind-chroot bind-libs bind-utils cairo ccid compat-libstdc++-33 conman cpp cpuspeed crash createrepo crypto-utils cryptsetup-luks cups-libs cvs cyrus-sasl-md5 cyrus-sasl-plain db4-devel dbus-python device-mapper-multipath dhcp dhcp-devel dialog dmraid dos2unix dosfstools dump e2fsprogs-devel ed eject elfutils elfutils-libs enscript expat-devel expect expect-devel expectk fetchmail file finger flex fontconfig fontconfig-devel foomatic ftp gcc gcc-c++ gdb gdbm-devel gettext gfs2-utils glib2-devel glibc-devel glibc-headers gmp-devel gnutls gpm gtk2 hal hdparm hesiod hicolor-icon-theme imake iptraf iptstate ipvsadm irqbalance jwhois kernel-devel kernel-headers keyutils-libs-devel kpartx krb5-devel krb5-workstation ksh lcms lftp libICE libSM libX11 libX11-devel libXau libXau-devel libXcursor libXdmcp libXdmcp-devel libXext libXfixes libXft libXi libXinerama libXpm libXpm-devel libXrandr libXrender libXt libXxf86vm libaio libaio-devel libart_lgpl libbonobo libc-client libcurl-devel libdaemon libevent libfontenc libgomp libgssglue libhugetlbfs libhugetlbfs-devel libidn-devel libmng libnl libnl-devel libpcap libselinux-devel libselinux-python libsepol-devel libsmi libstdc++-devel libsysfs libtiff libtool libtool-ltdl libwvstreams libxml2-devel libxml2-python libxslt libxslt-python lksctp-tools logwatch lrzsz lsof m2crypto mailcap mailx make nasm man man-pages man-pages-ko mc mcstrans mdadm memtest86+ mesa-libGL mesa-libGL-devel mgetty microcode_ctl mkbootdisk mlocate mrtg mt-st mtools mtr mutt nc ncurses-devel net-snmp-libs netpbm nfs-utils nfs-utils-lib nmap nscd nss_db ntp ntsysv numactl oddjob openssh-clients openssl-devel pam-devel pam_krb5 pam_passwdqc pam_pkcs11 pango parted parted-devel patch pax pciutils pcsc-lite perl perl-Archive-Tar perl-BSD-Resource perl-Compress-Zlib perl-DBI perl-Digest-HMAC perl-Digest-SHA1 perl-HTML-Parser perl-HTML-Tagset perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-IO-Zlib perl-Net-IP perl-Net-SSLeay perl-Newt perl-Socket6 perl-String-CRC32 perl-URI perl-libwww-perl pkgconfig pm-utils postgresql-libs prelink procmail psacct psutils pulseaudio-esound-compat pyOpenSSL pykickstart pyorbit pyparted python-pyblock pyxf86config quota rdate rdist readahead rmt rpcbind rpm-build rsh rsync rusers rwho samba samba-client samba-common samba-swat sendmail sendmail-cf setools setserial setuptool shared-mime-info sip sos spamassassin squashfs-tools strace stunnel symlinks sysfsutils syslinux sysstat system-config-date system-config-firewall talk tcl tcp_wrappers tcpdump tcsh telnet telnet-server time tk tmpwatch traceroute tree ttmkfdir unix2dos unixODBC unzip usbutils usermode vconfig vim-common vim-enhanced vsftpd wget wireless-tools words xinetd xorg-x11-proto-devel yp-tools ypbind ypserv zip zlib-devel GConf2 ImageMagick ImageMagick-perl avahi-libs bwidget cloog-ppl crda cryptsetup-luks-libs cups db4-cxx deltarpm desktop-file-utils device-mapper-multipath-libs dmidecode dmraid-events docbook-dtds flac foomatic-db foomatic-db-filesystem foomatic-db-ppds ghostscript ghostscript-fonts gnome-doc-utils-stylesheets gnome-python2 gnome-python2-canvas gnome-user-docs gnome-vfs2 gpm-libs groff-perl gstreamer gstreamer-tools hal-info hal-libs html2ps hunspell iw jasper-libs kpathsea lcms-libs libIDL libX11-common libXcomposite libXdamage libXdamage-devel libXext-devel libXfixes-devel libXfont libXres libXtst libXxf86vm-devel libasyncns libcanberra libcanberra-gtk2 libcom_err-devel libcroco libdrm-devel libedit libglade2 libgnomecanvas libgsf libnetfilter_conntrack libnfnetlink libnotify libogg ylibpaper librsvg2 libsamplerate libsndfile libtalloc libtasn1 libtdb libthai libtirpc libusb1 libvorbis libwmf-lite libwnck libxcb libxcb-devel lm_sensors-libs mesa-dri-drivers mozilla-filesystem mpfr mrtg-libs netpbm-progs notification-daemon ntpdate openjpeg-libs pcsc-lite-libs perl-Compress-Raw-Zlib perl-Crypt-OpenSSL-Bignum perl-Crypt-OpenSSL-RSA perl-Crypt-OpenSSL-Random perl-Date-Manip perl-Digest-SHA perl-Encode-Detect perl-ExtUtils-MakeMaker perl-ExtUtils-ParseXS perl-IO-Compress-Base perl-IO-Compress-Zlib perl-Mail-DKIM perl-MailTools perl-Module-Pluggable perl-Net-DNS perl-Net-LibIDN perl-NetAddr-IP perl-Package-Constants perl-Pod-Escapes perl-Pod-Simple perl-SNMP_Session perl-Test-Harness perl-Time-HiRes perl-TimeDate perl-YAML-Syck perl-devel perl-libs perl-version pixman poppler poppler-data poppler-utils portreserve ppl psutils-perl pulseaudio pulseaudio-libs pycairo pygobject2 pygtk2 pygtk2-libglade python-decorator python-deltarpm python-slip python-slip-dbus rarian rarian-compat rtkit samba-winbind-clients setools-console setools-gui setools-libs setools-libs-tcl sgml-common sgpio sound-theme-freedesktop speex startup-notification system-config-date-docs system-config-firewall-tui tex-preview texinfo texinfo-tex texlive texlive-dvips texlive-latex texlive-texmf texlive-texmf-dvips texlive-texmf-errata texlive-texmf-errata-dvips texlive-texmf-errata-fonts texlive-texmf-errata-latex texlive-texmf-fonts texlive-texmf-latex texlive-utils tokyocabinet urlview urw-fonts usermode-gtk xcb-util xml-common xorg-x11-font-utils xulrunner xz xz-lzma-compat yelp lksctp-tools-devel libtool-ltdl-devel gmp mhash mhash-devel gdbm zlib curl g++ openssl bzip2-devel libc-client-devel bison system-config-securitylevel libc-client-devel readline-devel compat-readline43 distcache-devel cmake lynx php-snmp gd-devel glibc-*


yum install httpd

 -> systemctl start httpd

 -> systemctl enable httpd.service

 -> firewall-cmd --permanent --zone=public --add-port=80/tcp

 -> firewall-cmd --reload


yum install mariadb-server mariadby

  -> systemctl start mariadb

  -> systemctl enable mariadb

  -> mysql_secure_installation


* DB 접속 원격 허용

-> mysql -uroot -p


-> SELECT Host,User,Password FROM mysql.user;

-> INSERT INTO mysql.user (host,user,password) VALUES ('%','root',password('패스워드'));

-> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';

-> FLUSH PRIVILEGES;


-> firewall-cmd --permanent --zone=public --add-port=3306/tcp

-> firewall-cmd --reload



* GitLab 설치


firewall-cmd --permanent --add-service=http

firewall-cmd --reload


curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash


yum install gitlab-ce


gitlab-ctl reconfigure


vi /etc/gitlab/gitlab.rb

  -> external_url 'http://192.168.xxx.xxx:8081'


firewall-cmd --zone=public --add-port=8081/tcp --permanent

firewall-cmd --reload


gitlab-ctl reconfigure

gitlab-ctl restart


systemctl restart httpd



* redmine 설치


yum -y groups install "Development Tools"


yum install epel-release


yum --enablerepo=epel -y install gdbm-devel libdb4-devel libffi-devel libyaml libyaml-devel ncurses-devel openssl-devel readline-devel tcl-devel


mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} 


wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz -P rpmbuild/SOURCES


wget https://raw.githubusercontent.com/tjinjin/automate-ruby-rpm/master/ruby22x.spec -P rpmbuild/SPECS


rpmbuild -bb rpmbuild/SPECS/ruby22x.spec


rpm -Uvh rpmbuild/RPMS/x86_64/ruby-2.2.3-1.el7.centos.x86_64.rpm


yum -y install ImageMagick ImageMagick-devel libcurl-devel httpd-devel mariadb-devel ipa-pgothic-fonts


mysql -uroot -p

  -> create database redmine; 

  -> grant all privileges on redmine.* to redmine@'localhost' identified by 'redmine';

  -> flush privileges;

  -> exit;


wget http://www.redmine.org/releases/redmine-3.3.0.tar.gz


tar zxvf redmine-3.3.0.tar.gz 

mv redmine-3.3.0 /var/www/redmine 

cd /var/www/redmine 


vi ./config/database.yml

  -> production:

    adapter: mysql2

    # database name

    database: redmine

    host: localhost

    # database user

    username: redmine

    # password for user above

    password: redmine

    encoding: utf8


gem install bundler --no-rdoc --no-ri 


bundle install --without development test postgresql sqlite3


bundle exec rake generate_secret_token 


bundle exec rake db:migrate RAILS_ENV=production


gem install passenger --no-rdoc --no-ri 


passenger-install-apache2-module


vi /etc/httpd/conf.d/passenger.conf

  ->LoadModule passenger_module /usr/lib64/ruby/gems/2.2.0/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so

     PassengerRoot /usr/lib64/ruby/gems/2.2.0/gems/passenger-5.0.30

     PassengerDefaultRuby /usr/bin/ruby

     NameVirtualHost *:8082

     <VirtualHost *:8082>

     ServerName 192.168.102.224

     DocumentRoot /var/www/redmine/public

     </VirtualHost>

(*) mod_passenger.so 경로 찾아서 확인 필요




chown -R apache. /var/www/redmine

firewall-cmd --zone=public --add-port=8082/tcp --permanent

firewall-cmd --reload



setenforce 0

systemctl restart httpd



xxx  vi /etc/sysconfig/selinux

xxx   -> SELINUX=disabled (x)

xxx   -> SELINUX=enforcing

xxx  reboot



* php 7


rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-7.rpm


yum --enablerepo=remi update remi-release


yum --enablerepo=remi-php70 install -y php php-fpm php-mysql


yum install php70-php-gd php70-php-fpm php70-php-devel php70-php-imap php70-php-json php70-php-ldap php70-php-mbstring php70-php-mcrypt php70-php-pdo php70-php-pdo-dblib php70-php-pear php70-php-soap php70-php-xml php70-php-xmlrpc


cd /etc 

cp -p php.ini php.ini_orgn 

vi php.ini


또는


/etc/opt/remi/php70/php.ini


  ->short_open_tag = On 

      error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED 

      display_errors = On 

      display_startup_errors = On 

      date.timezone = "Asia/Seoul"


vi /etc/httpd/conf/httpd.conf

  ->LoadModule php7_module /usr/lib64/httpd/modules/libphp7.so

     AddType application/x-httpd-php .php .php3 .php4 .php5 .html .htm .inc 

     DirectoryIndex index.html index.htm index.php


     #NameVirtualHost 192.168.102.224:80

     <VirtualHost 192.168.xxx.xxx:80>

     #ServerName 192.168.xxx.xxx:80

     DocumentRoot /home/xxx

     </VirtualHost>

'서버' 카테고리의 다른 글

Sendmail Queue 확인  (0) 2018.07.10
HeidiSQL mysql 외부연결  (0) 2018.06.22
PC 디렉토리에 GIT 백업데이터 연동 방법 (SourceTree)  (0) 2018.06.22
AWS 리눅스 설치  (0) 2018.06.22
리눅스 계정 생성  (0) 2018.06.22
Comments