2016年8月3日 星期三

安裝 CentOS 7

打算安裝 Redmine 來試試,但又沒有多餘的機器,只好安裝在 VirtualBox 內。在安裝的過程中,軟件裝的不好,又要重新來過,於是把過程中用到的指令記錄:
 
  • 跟據畫面顯示安裝最少內容的 CentOS 7
  • 加入 nginx 資源庫
    • vi /etc/yum.repos.d/nginx.repo
    • 輸入以下內容:
      [nginx]
      name=nginx repo
      baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
      gpgcheck=0
      enabled=1
  • 系統更新
    • yum install epel-release
    • wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
    • rpm -ivh mysql-community-release-el7-5.noarch.rpm
    • yum update
    • yum upgrade
  • 關閉 SELinux 及重新啓動
    • vi /etc/selinux/config
    • 設定 “SELINUX=disabled”
    • reboot
  • 關閉防火牆及安裝插件
    • systemctl stop firewalld
    • Install utilities and services
    • yum -y install net-tools yum-utils nmap wget
    • yum -y install httpd sshd nginx mysql mysql-server
    • systemctl start mysqld
    • mysql_secure_installation
  • 更改 nginx 接口
    • vi /etc/nginx/conf.d/default.conf
    • 把 “listen 80;” 改為 “listen 8080;” 並儲存
  • 安裝 PHP5
    • rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    • rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
    • yum -y install php55w php55w-opcache php55w-fpm php55w-opcache
    • php -v
  • 安裝佢其他插件
    • yum -y install nano zip unzip libyaml-devel zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel gcc ruby-devel gcc-c++ make postgresql-devel ImageMagick-devel sqlite-devel perl-LDAP mod_perl perl-Digest-SHA

沒有留言: