【安装环境】
yum -y groupinstall "Development Tools"
yum -y install dstat wget enca dos2unix vim
yum remove php* php-common
#获取epel-release-7-8.noarch.rpm
wget https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
rpm -Uvh *rpm
##如果没有package
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php71w 【yum -y update 】
yum -y --enablerepo=epel install php71w-mbstring php71w-pdo php71w-mysql php71w-xml php71w-devel php71w-fpm
yum -y install php71w-gd*
##composer安装
wget https://getcomposer.org/installer
mv installer composer-setup.php
php composer-setup.php --install-dir=/usr/bin --filename=composer
##安装laravel
composer global require "laravel/installer"
##安装lighttpd (web server)
yum -y install lighttpd lighttpd-fastcgi
mkdir /var/log/lighttpd/ -p
mkdir /data/www/lighttpd/ -p
mkdir /var/run/lighttpd -p
chown -R lighttpd.lighttpd /var/log/lighttpd
chown -R lighttpd.lighttpd /var/run/lighttpd
chown -R lighttpd.lighttpd /data/www/lighttpd
chkconfig --level 2345 lighttpd on
service lighttpd restart
##安装mysql
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum -y install mysql-libs mysql mysql-devel mysql-server
service mysqld start
mysql -u root -p
##软链接
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
##指定版本创建laravel项目bmwdashboard
composer create-project --prefer-dist laravel/laravel bmwdashboard 5.4.*
cd 项目目录
composer update --ignore-platform-reqs
cd ..
chown -R lighttpd:lighttpd bmwdashboard/
cd 项目目录
php artisan key:generate
######################【其他环境】#################
yum -y install memcached
nohup /usr/bin/memcached -l 127.0.0.1 -p 11211 -m 150 -u root
yum install php71w-pecl-memcached -y
##ClamAV
yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd -y
##在两个配置文件/etc/freshclam.conf和/etc/clamd.d/scan.conf中移除“Example”字符
##更新病毒库
freshclam
##http://blog.csdn.net/heiby/article/details/52136340【参看文档】
/etc/clam.d/scan.conf文件开启LocalSocket /var/run/clamd.scan/clamd.sock
/etc/clamd.d/scan.conf【需求开启TCPSocket,TCPAddr,StreamMaxLength设置500m】
systemctl start clamd@scan
systemctl status clamd@scan
【bmw1环境启动/etc/init.d/clamd status /etc/init.d/clamd start】
composer require predis/predis
ln -s /data/www/lighttpd/bmwdashboard-data/storage/ /data/www/lighttpd/bmwdashboard-online/public/storage
##文件名编码转换
yum -y install convmv
convmv -f gbk -t utf-8 region/ -r --notest
##查看文件数
ls -l | grep "^-" | wc -l
【文件同步】
http://blog.csdn.net/U2U22/article/details/76044863
https://bmwdisks513.file.core.chinacloudapi.cn/bmwonlineshare
##安装
yum -y install cifs-utils
##创建共享目录
mkdir /data/www/share
##创建挂载点
mount -t cifs //bmwdisks513.file.core.chinacloudapi.cn/bmwonlineshare /data/www/share -o vers=3.0,username=bmwdisks513,password=RhlfrOoAUQ2BVFeuh/u3vYcEGKZUtMnLLI6PaJORoHCRlxBsoch+47vn+ca+22gcYnKrN9N9SfwhE3Usg9e/Ww==,dir_mode=0777,file_mode=0777,serverino
##查看效果
df -h
mount -t cifs //<Azure存储账户名>.file.core.chinacloudapi.cn/<共享文件名> ./myPoint -o vers=3.0,username=<Azure存储账户名>,password=<以==结尾的密钥>,dir_mode=0777,file_mode=0777,serverino
umount dir
【redis 指定用户启动】
sudo -u redis /usr/bin/redis-server /etc/redis.conf
yum -y groupinstall "Development Tools"
yum -y install dstat wget enca dos2unix vim
yum remove php* php-common
#获取epel-release-7-8.noarch.rpm
wget https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
rpm -Uvh *rpm
##如果没有package
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php71w 【yum -y update 】
yum -y --enablerepo=epel install php71w-mbstring php71w-pdo php71w-mysql php71w-xml php71w-devel php71w-fpm
yum -y install php71w-gd*
##composer安装
wget https://getcomposer.org/installer
mv installer composer-setup.php
php composer-setup.php --install-dir=/usr/bin --filename=composer
##安装laravel
composer global require "laravel/installer"
##安装lighttpd (web server)
yum -y install lighttpd lighttpd-fastcgi
mkdir /var/log/lighttpd/ -p
mkdir /data/www/lighttpd/ -p
mkdir /var/run/lighttpd -p
chown -R lighttpd.lighttpd /var/log/lighttpd
chown -R lighttpd.lighttpd /var/run/lighttpd
chown -R lighttpd.lighttpd /data/www/lighttpd
chkconfig --level 2345 lighttpd on
service lighttpd restart
##安装mysql
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum -y install mysql-libs mysql mysql-devel mysql-server
service mysqld start
mysql -u root -p
##软链接
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
##指定版本创建laravel项目bmwdashboard
composer create-project --prefer-dist laravel/laravel bmwdashboard 5.4.*
cd 项目目录
composer update --ignore-platform-reqs
cd ..
chown -R lighttpd:lighttpd bmwdashboard/
cd 项目目录
php artisan key:generate
######################【其他环境】#################
yum -y install memcached
nohup /usr/bin/memcached -l 127.0.0.1 -p 11211 -m 150 -u root
yum install php71w-pecl-memcached -y
##ClamAV
yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd -y
##在两个配置文件/etc/freshclam.conf和/etc/clamd.d/scan.conf中移除“Example”字符
##更新病毒库
freshclam
##http://blog.csdn.net/heiby/article/details/52136340【参看文档】
/etc/clam.d/scan.conf文件开启LocalSocket /var/run/clamd.scan/clamd.sock
/etc/clamd.d/scan.conf【需求开启TCPSocket,TCPAddr,StreamMaxLength设置500m】
systemctl start clamd@scan
systemctl status clamd@scan
【bmw1环境启动/etc/init.d/clamd status /etc/init.d/clamd start】
composer require predis/predis
ln -s /data/www/lighttpd/bmwdashboard-data/storage/ /data/www/lighttpd/bmwdashboard-online/public/storage
##文件名编码转换
yum -y install convmv
convmv -f gbk -t utf-8 region/ -r --notest
##查看文件数
ls -l | grep "^-" | wc -l
【文件同步】
http://blog.csdn.net/U2U22/article/details/76044863
https://bmwdisks513.file.core.chinacloudapi.cn/bmwonlineshare
##安装
yum -y install cifs-utils
##创建共享目录
mkdir /data/www/share
##创建挂载点
mount -t cifs //bmwdisks513.file.core.chinacloudapi.cn/bmwonlineshare /data/www/share -o vers=3.0,username=bmwdisks513,password=RhlfrOoAUQ2BVFeuh/u3vYcEGKZUtMnLLI6PaJORoHCRlxBsoch+47vn+ca+22gcYnKrN9N9SfwhE3Usg9e/Ww==,dir_mode=0777,file_mode=0777,serverino
##查看效果
df -h
mount -t cifs //<Azure存储账户名>.file.core.chinacloudapi.cn/<共享文件名> ./myPoint -o vers=3.0,username=<Azure存储账户名>,password=<以==结尾的密钥>,dir_mode=0777,file_mode=0777,serverino
umount dir
【redis 指定用户启动】
sudo -u redis /usr/bin/redis-server /etc/redis.conf