---
# System prepended metadata

title: Centos7.6 環境安裝

---

# Centos7.6 環境安裝
[composer 安裝]
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/bin/composer

[samba server]for 內部開發
yum install samba samba-client samba-common -y
mkdir -p /samba/anonymous
systemctl enable smb
systemctl enable nmb
systemctl restart smb
systemctl restart nmb
groupadd smbgrp
usermod -a -G smbgrp [username]
firewall-cmd --zone=public --add-port=445/tcp --permanent
firewall-cmd --zone=public --add-port=137/tcp --permanent
firewall-cmd --zone=public --add-port=138/tcp --permanent
firewall-cmd --zone=public --add-port=139/tcp --permanent
firewall-cmd --reload
[php7.3]
yum install epel-release
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install -y yum-utils
yum-config-manager --disable remi-php54
yum-config-manager --enable remi-php73
yum install php php-fpm php-cli php-bcmath php-gd php-json php-mbstring php-mcrypt php-mysqlnd php-opcache php-pdo php-pecl-crypto php-pecl-mcrypt php-pecl-geoip php-recode  php-soap php-xmll php-posix php-devel php-mbstring
systemctl start php-fpm

[nginx 最新版本]
vim /etc/yum.repos.d/nginx.repo
填入
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
然後
yum update -y
yum install nginx -y
systemctl enable nginx
systemctl start nginx
netstat -lnptu | grep 80
