阿里云ubuntu16 lnmp配置

阿里云服务器 ESC ubuntu16 64位系统安装配置参考文档:http://www.mr-wu.cn/aliyun-ecs-ubuntu/

#!/bin/bash
# Ubuntu 16.04 new system init install script
sudo apt-get update &&  sudo apt-get upgrade -y
sudo apt-get install -y aptitude tmux mosh vim git colordiff supervisor \
bash-completion links redis-server curl httpie monit exiftool \
nmon ncdu slurm util-linux util-linux-locales dstat saidar  \
iptables-persistent apt-transport-https resolvconf libssl-dev \
build-essential libncurses5-dev module-init-tools \
apt-show-versions software-properties-common #ImageMagick libmagickwand-dev zip

# install php (php7.0)
sudo apt-get install -y php php-apcu php-curl php-dev php-fpm php-gd php-geoip php-gmp php-guzzlehttp php-imagick php-intl \
php-json php-mcrypt memcached php-memcache php-mysql \
php-sqlite3 php-xmlrpc php-mbstring php-zip

# install composer
sudo apt-get install -y composer

# install nginx
sudo apt-get install -y nginx
sudo cp fastcgi_params /etc/nginx/
sudo cp php.conf /etc/nginx/
sudo cp php_params.conf /etc/nginx/
sudo cp app.conf /etc/nginx/conf.d/
sudo cp error.conf /etc/nginx/
sudo cp static.conf /etc/nginx/
sudo cp drop.conf /etc/nginx/
#设置日志格式
#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" "$request_filename"'
                      # '"$request_uri" $status $body_bytes_sent "$http_referer" '
                      # '"$http_user_agent" "$http_x_forwarded_for"';
#注释  include /etc/nginx/sites-enabled/*;

# install mysql
sudo apt-get install -y mysql-server

cat >> ~/.bashrc <<EOF
alias ll='ls -l'
alias la='ls -A'
alias l='ls -al'
alias diff='colordiff -u'
alias colordiff='colordiff -u'
alias wip='git commit -a -m WIP'
alias squish='git status && git commit -a --amend -C HEAD'
EOF

# install java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install  -y oracle-java8-installer
sudo apt-get install -y oracle-java8-set-default

# nodejs
# curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash -
curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
sudo apt-get install -y nodejs
©️2020 CSDN 皮肤主题: 编程工作室 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值